mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix(main.py): revert model alias map change
This commit is contained in:
parent
ab2986290e
commit
b991a35ebe
2 changed files with 4 additions and 6 deletions
|
@ -356,7 +356,10 @@ def completion(
|
||||||
if model_list is not None:
|
if model_list is not None:
|
||||||
deployments = [m["litellm_params"] for m in model_list if m["model_name"] == model]
|
deployments = [m["litellm_params"] for m in model_list if m["model_name"] == model]
|
||||||
return batch_completion_models(deployments=deployments, **args)
|
return batch_completion_models(deployments=deployments, **args)
|
||||||
|
if litellm.model_alias_map and model in litellm.model_alias_map:
|
||||||
|
model = litellm.model_alias_map[
|
||||||
|
model
|
||||||
|
] # update the model to the actual value if an alias has been passed in
|
||||||
model_response = ModelResponse()
|
model_response = ModelResponse()
|
||||||
|
|
||||||
if kwargs.get('azure', False) == True: # don't remove flag check, to remain backwards compatible for repos like Codium
|
if kwargs.get('azure', False) == True: # don't remove flag check, to remain backwards compatible for repos like Codium
|
||||||
|
|
|
@ -2246,11 +2246,6 @@ def get_llm_provider(model: str, custom_llm_provider: Optional[str] = None, api_
|
||||||
dynamic_api_key = None
|
dynamic_api_key = None
|
||||||
# check if llm provider provided
|
# check if llm provider provided
|
||||||
|
|
||||||
if litellm.model_alias_map and model in litellm.model_alias_map:
|
|
||||||
model = litellm.model_alias_map[
|
|
||||||
model
|
|
||||||
] # update the model to the actual value if an alias has been passed in
|
|
||||||
|
|
||||||
if custom_llm_provider:
|
if custom_llm_provider:
|
||||||
return model, custom_llm_provider, dynamic_api_key, api_base
|
return model, custom_llm_provider, dynamic_api_key, api_base
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue