mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
fix: strip provider prefix from model name in Ollama health check
Update model_params["model"] after get_llm_provider() strips the provider prefix. This ensures health check calls to Ollama use bare model names (e.g. "llama2") instead of prefixed names (e.g. "ollama/llama2"). Fixes BerriAI/litellm#17842
This commit is contained in:
parent
92d39c308c
commit
9352b1d395
1 changed files with 1 additions and 0 deletions
|
|
@ -7155,6 +7155,7 @@ async def ahealth_check(
|
|||
api_base=api_base_from_params,
|
||||
api_key=api_key_from_params,
|
||||
)
|
||||
model_params["model"] = model # update model to use the provider-stripped name (e.g. "ollama/llama2" -> "llama2")
|
||||
if model in litellm.model_cost and mode is None:
|
||||
mode = litellm.model_cost[model].get("mode")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue