litellm/tests/test_litellm/llms/openrouter
Chesars 09ef5e67e5 refactor: move native OpenRouter check to get_llm_provider before strip
The previous check in _get_openai_compatible_provider_info() ran after
the model name was already split, so it never caught the second
get_llm_provider() call from the anthropic_messages bridge.

Moved the check to get_llm_provider() before the provider-list
stripping, using a pattern-based approach (custom_llm_provider ==
"openrouter" and model.startswith("openrouter/")) instead of a
hardcoded set. This covers all current and future native OpenRouter
models.

Updated tests to verify the bridge double-call scenario with
custom_llm_provider passed through.
2026-03-02 16:55:34 -03:00
..
chat Support Deepseek 3.2 with Reasoning (#17384) 2025-12-02 22:00:19 -08:00
image_generation Add tests for openrouter 2026-01-14 10:17:01 +05:30
test_openrouter_embedding_transformation.py OpenRouter embeddings API support (#18391) 2026-01-08 00:57:31 +05:30
test_openrouter_provider_routing.py refactor: move native OpenRouter check to get_llm_provider before strip 2026-03-02 16:55:34 -03:00