forked from phoenix/litellm-mirror
(feat) mock_response set custom_llm_provider in hidden param
This commit is contained in:
parent
5807718a69
commit
982cb04764
1 changed files with 7 additions and 0 deletions
|
@ -348,6 +348,13 @@ def mock_completion(
|
||||||
prompt_tokens=10, completion_tokens=20, total_tokens=30
|
prompt_tokens=10, completion_tokens=20, total_tokens=30
|
||||||
)
|
)
|
||||||
|
|
||||||
|
try:
|
||||||
|
_, custom_llm_provider, _, _ = litellm.utils.get_llm_provider(model=model)
|
||||||
|
model_response._hidden_params["custom_llm_provider"] = custom_llm_provider
|
||||||
|
except:
|
||||||
|
# dont let setting a hidden param block a mock_respose
|
||||||
|
pass
|
||||||
|
|
||||||
return model_response
|
return model_response
|
||||||
|
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue