Files
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
..
2025-11-06 16:26:14 -08:00