mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-05 02:41:56 +00:00
* refactor: remove api-key conversion logic for Azure Anthropic Co-authored-by: Erdem Halil <erdemhalil@users.noreply.github.com> * fix(passthrough): pass custom_llm_provider to completion_cost for Azure AI Anthropic The passthrough logging for Anthropic was failing when using Azure AI Anthropic because the completion_cost function was not receiving the custom_llm_provider parameter, causing it to fail with "LLM Provider NOT provided" error. This fix: - Retrieves custom_llm_provider from logging_obj.model_call_details - Prepends provider prefix to model name for cost calculation - Passes both formatted model and custom_llm_provider to completion_cost - Centralizes provider prefix logic in _create_anthropic_response_logging_payload This ensures cost calculation works correctly for Azure AI Anthropic requests with models like azure_ai/claude-sonnet-4-5_gb_20250929. Co-authored-by: Erdem Halil <erdemhalil@users.noreply.github.com> * test: add unit tests for Azure AI Anthropic fixes - Add tests for custom_llm_provider cost calculation in passthrough logging - Add tests for ProviderConfigManager returning AzureAnthropicMessagesConfig - Update existing tests to reflect removal of api-key to x-api-key conversion Co-authored-by: Erdem Halil <erdemhalil@users.noreply.github.com> --------- Co-authored-by: Erdem Halil <erdemhalil@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| _experimental/mcp_server | ||
| agent_endpoints | ||
| anthropic_endpoints | ||
| auth | ||
| client | ||
| common_utils | ||
| db | ||
| discovery_endpoints | ||
| experimental/mcp_server | ||
| google_endpoints | ||
| guardrails | ||
| health_endpoints | ||
| hooks | ||
| image_endpoints | ||
| management_endpoints | ||
| management_helpers | ||
| middleware | ||
| openai_files_endpoint | ||
| pass_through_endpoints | ||
| prompts | ||
| public_endpoints | ||
| response_api_endpoints | ||
| spend_tracking | ||
| test_configs | ||
| ui_crud_endpoints | ||
| vector_store_endpoints | ||
| __init__.py | ||
| test_batch_metadata_none_fix.py | ||
| test_caching_routes.py | ||
| test_common_request_processing.py | ||
| test_custom_proxy.py | ||
| test_enforce_user_param.py | ||
| test_fastapi_offline_routes.py | ||
| test_health_check_functions.py | ||
| test_litellm_pre_call_utils.py | ||
| test_model_id_header_propagation.py | ||
| test_proxy_cli.py | ||
| test_proxy_server.py | ||
| test_proxy_types.py | ||
| test_proxy_utils.py | ||
| test_route_llm_request.py | ||
| test_shared_health_check.py | ||
| test_spend_log_cleanup.py | ||
| test_swagger_chat_completions.py | ||
| test_team_member_update.py | ||