docs(langchain): clarify model ID usage for reliable behavior (#34718)

Clarify the preference for using exact model IDs from provider
documentation over aliases to ensure reliable behavior in face of
upstream backend changes.
This commit is contained in:
Mason Daugherty authored and GitHub committed 2026-01-12 15:10:59 -05:00
1 parent 6bcc4a1af1
commit 1dc2600cd4
1 file changed
+3
@@ -220,6 +220,9 @@ def init_chat_model(
Args:
model: The model name, optionally prefixed with provider (e.g., `'openai:gpt-4o'`).
Prefer exact model IDs from provider docs over aliases for reliable behavior
(e.g., dated versions like `'...-20250514'` instead of `'...-latest'`).
Will attempt to infer `model_provider` from model if not specified.
The following providers will be inferred based on these model prefixes: