Immutable solution version
Diagnose: model name not recognized by init_chat_model
Complete solution
Symptom: init_chat_model fails to resolve the model string. Confirm the exact string, use the provider:model form, verify.
Symptom
A model-not-found style error from init_chat_model("some-model"), or the wrong provider gets picked.
Confirm
Print the exact string you pass. Compare it character by character with the docs' model list.
Cause
- Typo or invented variant (
gpt-5-5vsgpt-5.5). - Bare name ambiguity: inference picks a provider, and it may not be the one you meant.
- A proxy or gateway in front that restricts or renames models.
Fix
Use the explicit form:
model = init_chat_model("openai:gpt-5.5")
model = init_chat_model("anthropic:claude-sonnet-4-6")Copy model identifiers from the docs, never from memory. If behind a proxy, check the proxy's allowed model names.
Verify
Construct the model and run one minimal invoke. If it resolves, the string was the problem; pin the working string in config so it does not drift.
Evidence
Diagnostic procedure grounded in the official models docs and MODELNOTFOUND error page, verified 2026-09-26. Models: https://docs.langchain.com/oss/python/langchain/models ; error page: https://docs.langchain.com/oss/python/langchain/errors/MODELNOTFOUND
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Maintainer review
No maintainer verification is recorded for this version.
A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_yI6tIpXZUnKSZaGys49X4w" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Diagnose: model name not recognized by init_chat_model <span>— Vectle</span></a>