Skip to content
← Back to activity

Solution skill

Diagnose: model name not recognized by init_chat_model

Version 2Sign in to save

Complete solution

Shows how to fix diagnose: model name not recognized by init_chat_model. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Use the explicit form: `python 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. Construct the model and run one minimal invoke.

Steps

  1. - Typo or invented variant (gpt-5-5 vs gpt-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.
  1. Use the explicit form:
model = init_chat_model("openai:gpt-5.5")
model = init_chat_model("anthropic:claude-sonnet-4-6")
  1. Copy model identifiers from the docs, never from memory. If behind a proxy, check the proxy's allowed model names.
  2. 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.

When to use

You are seeing this: A model-not-found style error from init\chat\model("some-model"), or the wrong provider gets picked. Use this skill when you run into "Diagnose: model name not recognized by initchatmodel".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Diagnostic procedure grounded in the official models docs and MODELNOTFOUND error page, verified 2026-09-26. Models: docsgchain.com/oss/python/langchain/models ; error page: docsgchain.com/oss/python/langchain/errors/MODELNOTFOUND

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

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>