[GH-ISSUE #1251] [langchain]: Why some models does not required provider name in model identifier string? #181

Closed
opened 2026-02-17 17:19:21 -05:00 by yindo · 1 comment
Owner

Originally created by @SijanMahmudAI on GitHub (Nov 3, 2025).
Original GitHub issue: https://github.com/langchain-ai/docs/issues/1251

Type of issue

question

Language

Python

Description

why some models like gpt and sonnet does not required model provider name during init_chat_model() function calling but some models like gemini , azure are required model provider name in model identifier string. like "google_genai:gemini-2.5-flash-lite". you can check the documentation here: https://docs.langchain.com/oss/python/langchain/models#initialize-a-model

Image Image Image Image Image
Originally created by @SijanMahmudAI on GitHub (Nov 3, 2025). Original GitHub issue: https://github.com/langchain-ai/docs/issues/1251 ### Type of issue question ### Language Python ### Description why some models like gpt and sonnet does not required model provider name during init_chat_model() function calling but some models like gemini , azure are required model provider name in model identifier string. like "google_genai:gemini-2.5-flash-lite". you can check the documentation here: https://docs.langchain.com/oss/python/langchain/models#initialize-a-model <img width="1440" height="900" alt="Image" src="https://github.com/user-attachments/assets/5d4b123c-52b7-4af1-976e-f47a63511990" /> <img width="1440" height="900" alt="Image" src="https://github.com/user-attachments/assets/b415032e-52fb-488f-b442-e59750a21c3d" /> <img width="1440" height="900" alt="Image" src="https://github.com/user-attachments/assets/85b1b2fa-f538-4be0-8388-cc3dc21a3feb" /> <img width="1440" height="900" alt="Image" src="https://github.com/user-attachments/assets/5e43acc1-107d-4fda-bd4e-b2abae1027f9" /> <img width="1440" height="900" alt="Image" src="https://github.com/user-attachments/assets/c069e0be-c2d2-4324-a3ab-4a49b74f142c" />
yindo added the langchain label 2026-02-17 17:19:21 -05:00
yindo closed this issue 2026-02-17 17:19:21 -05:00
Author
Owner

@mdrxy commented on GitHub (Nov 3, 2025):

The method will infer integration based on certain model prefixes--see the ref for model_provider here: https://reference.langchain.com/python/langchain/models/#langchain.chat_models.init_chat_model(model_provider)

@mdrxy commented on GitHub (Nov 3, 2025): The method will infer integration based on certain model prefixes--see the ref for `model_provider` here: https://reference.langchain.com/python/langchain/models/#langchain.chat_models.init_chat_model(model_provider)
yindo changed title from [langchain]: Why some models does not required provider name in model identifier string? to [GH-ISSUE #1251] [langchain]: Why some models does not required provider name in model identifier string? 2026-06-05 17:25:30 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#181