mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-21 00:21:49 +00:00
* 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. |
||
|---|---|---|
| .. | ||
| caching | ||
| completion_extras/litellm_responses_transformation | ||
| enterprise/enterprise_callbacks | ||
| experimental_mcp_client | ||
| google_genai | ||
| integrations | ||
| litellm_core_utils | ||
| llms | ||
| passthrough | ||
| proxy | ||
| responses | ||
| router_strategy | ||
| router_utils | ||
| secret_managers | ||
| types | ||
| vector_stores | ||
| __init__.py | ||
| conftest.py | ||
| log.txt | ||
| readme.md | ||
| test_constants.py | ||
| test_cost_calculation_log_level.py | ||
| test_cost_calculator.py | ||
| test_logging.py | ||
| test_main.py | ||
| test_router.py | ||
| test_utils.py | ||
Testing for litellm/
This directory 1:1 maps the the litellm/ directory, and can only contain mocked tests.
The point of this is to:
- Increase test coverage of
litellm/ - Make it easy for contributors to add tests for the
litellm/package and easily run tests without needing LLM API keys.
File name conventions
litellm/proxy/test_caching_routes.pymaps tolitellm/proxy/caching_routes.pytest_<filename>.pymaps tolitellm/<filename>.py