mirror of
https://github.com/tiennm99/litellm.git
synced 2026-06-24 19:39:12 +00:00
5e70c78b94
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