litellm/tests/unit/decisions
izzybn 603b30f556
fix(ollama): send model-info lookups to the call's api_base with its key and retry failed ones (#53830)
* fix(ollama): send model-info lookups to the call's api_base with its key

* fix(decisions): read only the cost map for a model's catalog mode

* test(ollama): wait for each call's success logging before counting lookups

* fix(ollama): retry failed model-info lookups and send every lookup to the call's api_base with its key

* fix(ollama): send the request's Authorization bearer token on model-info lookups before api_key

* fix(ollama): retry failed lookups once a minute, strip Lemonade's chat path, and key the cache on api_base only where the lookup reads it

* fix(ollama): withhold keys behind non-Bearer auth headers and keep get_model_info returning dicts

Lookups send no key when the call carries a non-Bearer Authorization header. Public get_model_info on the Ollama and Lemonade configs returns a dict again, with failures kept for the per-call path through look_up_model_info. A direct keyed litellm.get_model_info call stays uncached as before, and Ollama embeddings record the call target without firing pre-call callbacks

* fix(ollama): keep slow lookup failures, look up max tokens and cache hits at the call target

* test(ocr): register test prices instead of stubbing the model info lookup

* fix(ollama): send the caller key only with the call's own api_base and keep keyed get_model_info uncached

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-11-24 08:51:25 -08:00
..
__init__.py feat(decisions): add unified /v1/decisions endpoint for Jev-compatible providers (#44236) 2026-10-03 17:38:38 +00:00
test_call.py fix(decisions): forward OpenAI prompt cache fields (#51457) 2026-11-18 03:25:09 +00:00
test_main.py fix(ollama): send model-info lookups to the call's api_base with its key and retry failed ones (#53830) 2026-11-24 08:51:25 -08:00