Skip to content

Commit 0891ac9

Browse files
lchoquelclaude
andcommitted
Improve ModelNotFoundError message to point at stale local deck
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent d459f5d commit 0891ac9

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

pipelex/cogt/models/model_deck.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -861,11 +861,14 @@ def get_required_inference_model(self, model_handle: str, model_type: ModelType)
861861
inference_model = self.get_optional_inference_model(model_handle=model_handle, model_type=model_type)
862862
if inference_model is None:
863863
msg = (
864-
f"Model handle '{model_handle}' was not found in the model deck. "
865-
"Make sure it's defined in one of the model decks '.pipelex/inference/deck/*.toml'. "
866-
"If the model handle is indeed in the deck, make sure the required backend for this model to run is enabled in "
867-
"'.pipelex/inference/backends.toml' and that you have the necessary credentials. "
868-
"To find what backend is required for this model, look at the routing profile in '.pipelex/inference/routing_profiles.toml' "
864+
f"Model handle '{model_handle}' was not found in the model deck.\n"
865+
"The most likely cause is that your local model deck is out of date: new aliases and presets are added to Pipelex "
866+
"over time and existing '.pipelex/inference/deck/*.toml' files are not automatically refreshed (yet). "
867+
"To pick up the latest definitions, delete your local deck files under '.pipelex/inference/deck/' "
868+
"(or the whole '.pipelex/inference/' directory) and run 'pipelex init inference' to regenerate them.\n"
869+
"If that doesn't resolve it: make sure the handle is defined in one of '.pipelex/inference/deck/*.toml', "
870+
"that the backend it routes to (see '.pipelex/inference/routing_profiles.toml') is enabled in "
871+
"'.pipelex/inference/backends.toml', and that you have the necessary credentials. "
869872
"Learn more about the inference backend system in the Pipelex documentation: "
870873
f"{URLs.backend_provider_docs}"
871874
)

0 commit comments

Comments
 (0)