mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +00:00
fix get llm provider logic
This commit is contained in:
parent
9ed4dad5ac
commit
4599a0ffd3
1 changed files with 9 additions and 7 deletions
|
|
@ -55,13 +55,15 @@ def handle_cohere_chat_model_custom_llm_provider(
|
|||
if custom_llm_provider == "cohere" and model in litellm.cohere_chat_models:
|
||||
return model, "cohere_chat"
|
||||
|
||||
_custom_llm_provider, _model = model.split("/", 1)
|
||||
if (
|
||||
_custom_llm_provider
|
||||
and _custom_llm_provider == "cohere"
|
||||
and _model in litellm.cohere_chat_models
|
||||
):
|
||||
return _model, "cohere_chat"
|
||||
if "/" in model:
|
||||
_custom_llm_provider, _model = model.split("/", 1)
|
||||
if (
|
||||
_custom_llm_provider
|
||||
and _custom_llm_provider == "cohere"
|
||||
and _model in litellm.cohere_chat_models
|
||||
):
|
||||
return _model, "cohere_chat"
|
||||
|
||||
return model, custom_llm_provider
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue