litellm/tests/litellm_utils_tests
Cesar Garcia 5e70c78b94
fix(cost-tracking): support base_model lookup in litellm_metadata for Responses API (#16778)
Cost tracking was failing for Responses API when using custom deployment names
with base_model configuration. The issue occurred because:

- Chat Completions API stores model_info in 'metadata'
- Responses API stores model_info in 'litellm_metadata'
- Cost calculator only checked 'metadata', missing Responses API costs

Changes:
- Updated _get_base_model_from_metadata() to check both metadata locations
- Added comprehensive unit tests covering all scenarios
- Maintains backward compatibility (metadata takes precedence)

Fixes #16772
2025-11-18 19:53:18 -08:00
..
conftest.py
log.txt
test_aiohttp_handler.py
test_aws_secret_manager.py Add tags and descriptions support to aws secrets manager (#16224) 2025-11-04 16:11:51 -08:00
test_cyberark.py fix cyber ark 2025-11-06 16:26:14 -08:00
test_get_secret.py
test_hashicorp.py [Feat] Secret Manager - Hashicorp, add auth via approle (#16374) 2025-11-07 14:39:33 -08:00
test_health_check.py feat(audio_transcriptions/): calculate duration of audio file for cost calculation + feat (image_generations): cost tracking accuracy improved with output_format, quality, size values fixed per openai model 2025-11-08 16:24:31 -08:00
test_litellm_overhead.py [Feat] LiteLLM Overhead metric tracking - Add support for tracking litellm overhead on cache hits (#15045) 2025-09-29 17:33:27 -07:00
test_logging_callback_manager.py
test_proxy_budget_reset.py
test_secret_manager.py Add tags and descriptions support to aws secrets manager (#16224) 2025-11-04 16:11:51 -08:00
test_utils.py fix(cost-tracking): support base_model lookup in litellm_metadata for Responses API (#16778) 2025-11-18 19:53:18 -08:00
test_validate_tool_choice.py
vertex_key.json