litellm/tests/test_litellm/proxy
Krish Dholakia 039c8a922c
Azure api_version="preview" support + Bedrock cost tracking via Anthropic /v1/messages (#13072)
* fix(azure/chat/gpt_transformation.py): support api_version="preview"

Fixes https://github.com/BerriAI/litellm/issues/12945

* Fix anthropic passthrough logging handler model fallback for streaming requests (#13022)

* fix: anthropic passthrough logging handler model fallback for streaming requests

- Add fallback logic to retrieve model from logging_obj.model_call_details when request_body.model is empty
- Fixes issue #12933 where streaming requests to anthropic passthrough endpoints would crash due to missing model field
- Ensures downstream logging and cost calculation work correctly for all streaming scenarios
- Maintains backwards compatibility with existing non-streaming requests

* test: add minimal tests for anthropic passthrough logging handler model fallback

- Add unit tests for the model fallback logic in _handle_logging_anthropic_collected_chunks
- Test existing behavior when request_body.model is present
- Test fallback logic when request_body.model is empty but logging_obj.model_call_details has model
- Test edge cases where both sources are empty or missing
- Ensure backwards compatibility and graceful degradation

* fix(anthropic_passthrough_logging_handler.py): add provider to model name (accurate cost tracking)

* fix(anthropic_passthrough_logging_handler.py): don't reset custom llm provider, if already set

* fix: fix check

---------

Co-authored-by: Haggai Shachar <haggai.shachar@backline.ai>
2025-07-29 08:13:55 -07:00
..
_experimental/mcp_server [MCP Gateway] Litellm mcp multi header propagation (#13003) 2025-07-26 11:45:14 -07:00
anthropic_endpoints test fixes 2025-06-25 18:42:06 -07:00
auth UI SSO - fix reset env var when ui_access_mode is updated (#13011) 2025-07-26 11:42:41 -07:00
client Add "keys import" command to CLI (#12620) 2025-07-15 20:14:43 -07:00
common_utils [Bug Fix] Add swagger docs for LiteLLM /chat/completions, /embeddings, /responses (#12618) 2025-07-15 13:37:22 -07:00
db
experimental/mcp_server
guardrails GuardrailsAI: use validatedOutput to allow usage of "fix" guards. Previously "fix" guards had no effect in llmOutput mode. (#12891) 2025-07-24 22:07:06 -07:00
health_endpoints
hooks test_pre_call_hook_team_rpm_limits 2025-07-11 15:52:21 -07:00
image_endpoints
management_endpoints test: update logic to fix for unit tests 2025-07-28 07:38:58 -07:00
management_helpers [MCP Gateway] access group UI object permission fix (#12523) 2025-07-11 18:25:40 -07:00
middleware
openai_files_endpoint fix(proxy): Add managed_files hook to test_mock_create_audio_file 2025-06-26 10:42:25 -06:00
pass_through_endpoints Azure api_version="preview" support + Bedrock cost tracking via Anthropic /v1/messages (#13072) 2025-07-29 08:13:55 -07:00
spend_tracking fix: Handle circular references in spend tracking metadata JSON serialization (#12643) 2025-07-16 07:24:41 -07:00
test_configs
ui_crud_endpoints Litellm encrypt admin UI values (#12675) 2025-07-17 22:24:58 -07:00
vector_store_endpoints [Feat] LLM API Endpoint - Expose OpenAI Compatible /vector_stores/{vector_store_id}/search endpoint (#12749) 2025-07-18 18:18:53 -07:00
test_caching_routes.py [Bug Fix] Ensure /redis/info works on GCP Redis (#11732) 2025-06-14 15:35:09 -07:00
test_common_request_processing.py
test_custom_proxy.py
test_health_check_functions.py Implement health check backend API and storage functionality - fix ci/cd (#11852) 2025-06-18 06:57:08 -07:00
test_litellm_pre_call_utils.py Request Headers - support x-litellm-num-retries + Usage - support usage by model group (#12890) 2025-07-22 23:09:36 -07:00
test_proxy_cli.py Health check app on separate port (#12718) 2025-07-18 11:17:15 -07:00
test_proxy_server.py [FEAT] Model-Guardrails: Add on UI (#13006) 2025-07-26 11:42:03 -07:00
test_proxy_types.py Litellm dev 06 06 2025 p1 (#11496) 2025-06-07 09:12:16 -07:00
test_proxy_utils.py [Security Bug Fix] Ensure only LLM API route fails get logged on Langfuse (and other loggers) (#12308) 2025-07-04 14:42:42 -07:00
test_route_llm_request.py Update mistral 'supports_response_schema' field + Fix ollama embedding (#12024) 2025-06-25 07:20:13 -07:00
test_spend_log_cleanup.py
test_team_member_update.py fix mapped tests (#12320) 2025-07-04 10:04:43 -07:00