litellm/tests/unit/llms/base_llm
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
..
audio_transcription test: make 38 legacy live base-class translation tests offline (#45351) 2026-10-08 23:18:25 +00:00
auth ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
batches fix(bedrock): derive the web identity session policy per AWS caller (#50592) 2026-11-08 19:13:53 +00:00
chat feat(sarvam): send a litellm User-Agent on chat requests (#52012) 2026-11-17 23:52:53 +00:00
decisions 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
embedding fix(embeddings): unwrap extra_body for providers with their own embedding handlers (#51335) 2026-11-12 15:41:50 -08:00
files test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
guardrail_translation fix(anthropic): skip a stream data line that is not a JSON object (#53393) 2026-11-22 22:54:02 +00:00
harness feat: add litellm.agent() to run claude code, codex, opencode and deep agents through the ai gateway (#43885) 2026-10-01 22:27:49 +00:00
realtime test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
rerank test: make 38 legacy live base-class translation tests offline (#45351) 2026-10-08 23:18:25 +00:00
responses fix(router): prevent Responses fallback from replaying delivered tool calls (#51683) 2026-11-13 11:43:03 -08:00
search test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
vector_store test: migrate legacy unit dirs and unrun folders into tests/unit, tests/integration and tests/e2e (#45940) 2026-10-11 06:24:57 -07:00
__init__.py test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
test_base_managed_resource.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_base_model_iterator.py fix(streaming): exact-match the SSE [DONE] marker in BaseModelResponseIterator (#47832) 2026-10-28 05:21:31 -07:00
test_base_utils.py fix(llms): move later developer messages for models declared system-first (#48897) 2026-10-29 04:12:13 -07:00
test_managed_resource_isolation.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_managed_resources_utils.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00