feat(langchain): Infer o3 modelstrings passed to init_chat_model as OpenAI (#29743)

This commit is contained in:
Jacob Lee
2025-02-11 16:51:41 -08:00
committed by GitHub
parent 9f3bcee30a
commit f4e3e86fbb

View File

@@ -464,7 +464,7 @@ _SUPPORTED_PROVIDERS = {
def _attempt_infer_model_provider(model_name: str) -> Optional[str]:
if any(model_name.startswith(pre) for pre in ("gpt-3", "gpt-4", "o1")):
if any(model_name.startswith(pre) for pre in ("gpt-3", "gpt-4", "o1", "o3")):
return "openai"
elif model_name.startswith("claude"):
return "anthropic"