-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Closed as not planned
Closed as not planned
Copy link
Labels
Description
What happened?
When Calling a remote Ollama server, LiteLLM makes a call to localhost in order to compute cost. I don't expect LiteLLM to call localhost if I'm running with non-localhost ollama server.
Related to #9602. When passing api_base to completion() it is not fully taken into account, Thus calling localhost.
Relevant log output
INFO:httpx:HTTP Request: POST http://my_remote_server:11434/api/generate "HTTP/1.1 200 OK"
19:42:06 - LiteLLM:INFO: utils.py:1211 - Wrapper: Completed Call, calling success_handler
INFO:LiteLLM:Wrapper: Completed Call, calling success_handler
19:42:06 - LiteLLM:INFO: cost_calculator.py:655 - selected model name for cost calculation: ollama/qwen3:0.6b
INFO:LiteLLM:selected model name for cost calculation: ollama/qwen3:0.6b
INFO:httpx:HTTP Request: POST http://localhost:11434/api/show "HTTP/1.1 404 Not Found"
19:42:06 - LiteLLM:INFO: cost_calculator.py:655 - selected model name for cost calculation: qwen3:0.6b
INFO:LiteLLM:selected model name for cost calculation: qwen3:0.6b
INFO:httpx:HTTP Request: POST http://localhost:11434/api/show "HTTP/1.1 404 Not Found"
INFO:httpx:HTTP Request: POST http://localhost:11434/api/show "HTTP/1.1 404 Not Found"
19:42:06 - LiteLLM:INFO: cost_calculator.py:655 - selected model name for cost calculation: ollama/qwen3:0.6b
INFO:LiteLLM:selected model name for cost calculation: ollama/qwen3:0.6b
INFO:httpx:HTTP Request: POST http://localhost:11434/api/show "HTTP/1.1 404 Not Found"
19:42:06 - LiteLLM:INFO: cost_calculator.py:655 - selected model name for cost calculation: qwen3:0.6b
INFO:LiteLLM:selected model name for cost calculation: qwen3:0.6b
INFO:httpx:HTTP Request: POST http://localhost:11434/api/show "HTTP/1.1 404 Not Found"
INFO:httpx:HTTP Request: POST http://localhost:11434/api/show "HTTP/1.1 404 Not Found"Are you a ML Ops Team?
No
What LiteLLM version are you on ?
V1.70.0
Twitter / LinkedIn details
No response
averev and brian316