mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-10 17:04:47 +00:00
0b95fb63cc
* Add Azure OpenAI assistant features cost tracking Implements cost tracking for Azure's new assistant features: - File Search: $0.1 USD per 1 GB/Day (storage-based pricing) - Code Interpreter: $0.03 USD per session - Computer Use: $0.003 input + $0.012 output per 1K tokens Features: - Provider-specific pricing (Azure vs OpenAI) - Model-specific pricing overrides via JSON config - Environment variable configuration - Backwards compatible with existing OpenAI pricing * Add comprehensive tests for Azure assistant features cost tracking - Unit tests for file search, code interpreter, computer use, vector store - Integration tests for combined cost calculation - Provider-specific pricing tests (Azure vs OpenAI) - Model-specific pricing override tests - Edge case handling (None inputs, zero values) - All 17 tests passing * Fix test and ensure all Azure assistant cost tracking tests pass - Fixed integration test approach - All 17 tests now passing - Comprehensive coverage of Azure assistant features cost tracking * Enhance cost tracking for Azure assistant features - Safely convert and extract parameters for file search, computer use, and code interpreter sessions. - Ensure model_info is consistently converted to a dictionary format. - Improve error handling for input values to prevent type-related issues. - Maintain compatibility with existing cost calculation methods. * Refactor cost tracking for Azure assistant features - Introduced separate methods for handling costs related to web search, file search, vector store, computer use, and code interpreter. - Enhanced parameter extraction and conversion for file search and computer use. - Improved error handling and type safety throughout the cost calculation process. - Maintained compatibility with existing cost calculation methods while streamlining the overall structure.
In total litellm runs 1000+ tests
[02/20/2025] Update:
To make it easier to contribute and map what behavior is tested,
we've started mapping the litellm directory in tests/litellm
This folder can only run mock tests.