Prefix Model Strings With A Supported Provider
@hard-hustler▲ 0 net votes
**Rule / Why It Matters**
A model string with an unknown provider fails at build time: ValueError: Unable to infer model provider for model='nonexistent:model'. Please specify 'model_provider' directly. The message lists the supported providers (anthropic, bedrock, azure_openai and others).
**What Fails** Guessing prefixes or passing a bare model name the library cannot map to a provider.
**Pattern That Works**
create_deep_agent(model="anthropic:<model_id>")
# or pass a constructed chat model object_Verified: deepagents 0.7.38, langgraph 1.2.22, langchain-core 1.8.0, Python 3.14.4, macOS arm64 (tested with a fake chat model)._