mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-28 00:00:38 +00:00
* fix(anthropic): map /v1/messages fields onto OpenAI Responses equivalents or reject them The Responses bridge for /v1/messages dropped several Anthropic fields and still answered 200. disable_parallel_tool_use now sets parallel_tool_calls false, speed fast asks for the priority service tier, mcp_servers become Responses mcp tools with their toolset allowlist, web_search keeps its domain filters, user_location, and max_uses, a json_schema output format goes up strict, and a 1h cache_control mark asks OpenAI for its 12h breakpoint TTL A field with no Responses equivalent (container, allowed_callers, an unknown speed, a toolset denylist, defer_loading, max_uses next to another built-in tool) answers 400 UnsupportedParamsError naming every such field, and drop_params drops them instead strict_json_schema moves to base_utils so the Codex harness, the chat-completions bridge, and the Responses bridge share one walker, which now leaves property names and enum, const, and examples values alone * fix(openai): keep the 1h cache ttl to the Responses API, since Chat Completions rejects a breakpoint ttl * test(openai): expect the 12h breakpoint ttl a 1h cache mark now sends on the Responses wire * refactor(anthropic): read the new /v1/messages fields through typed views * fix(anthropic): keep schema refs and maps in strict output, and answer 400 for a container id The bridge goes back to the strict-schema helper from #51337, so a root $ref keeps its $defs and a map keeps its value schema on every provider. A container id string and a malformed mcp_servers entry now answer 400, or are dropped under drop_params, instead of a 500 * fix(anthropic): leave out speed and container when additional_drop_params lists them * fix(anthropic): reject or map the remaining /v1/messages fields on the OpenAI bridge and redact the MCP authorization top_k and inference_geo have no Responses equivalent, so they now answer 400 like container unless drop_params or additional_drop_params drops them, instead of a silent 200. An mcp_toolset that names no mcp_servers entry answers 400 the same way. The error says to set drop_params: true in the model's litellm_params or under litellm_settings. A forwarded service_tier of auto no longer beats speed fast, since auto asks for nothing specific. A top-level cache_control marks the last block of the conversation the way Anthropic caches it, and an mcp_call output comes back as mcp_tool_use and mcp_tool_result blocks that replay on the next turn. The server token goes out as the Responses mcp tool's authorization field, so both redactors now scrub a value under a quoted authorization key in JSON or a Python repr. A value litellm already masked, like the Authorization header in the JSON debug log, keeps its hint, and an Authorization header name is left alone. * fix(anthropic): leave the top-level cache mark off when the deployment drops cache_control * fix(proxy): count mcp_servers by name in the /v1/messages tool allowlist * fix(logging): redact MCP server tokens from logged model parameters The standard logging payload copied tools and mcp_servers into model_parameters as sent, so an MCP server's authorization or authorization_token reached every logging callback in plain text. * fix(anthropic): keep the Messages container field read-only Mark AnthropicMessagesRequestOptionalParams.container ReadOnly and pass it when the Responses adapter builds its request instead of setting it afterwards * fix(anthropic): send open schemas non-strict, guard MCP blocks, and narrow the authorization log pattern OpenAI strict structured outputs reject a map or a free-form object, so a Messages output schema that leaves an object open now goes to the Responses API with strict false instead of answering 400. Guardrails on /v1/messages now read mcp_tool_use input and mcp_tool_result text in requests and replies, and write a masked result back, the way they already handle tool_use and tool_result. That covers replayed history too. The quoted authorization log pattern now needs a word boundary and skips null, None and booleans, so keys like requires_authorization log as sent. * fix(anthropic): pair a replayed MCP result with its use by id and keep a top-level cache mark before a prefill * fix(redaction): redact an MCP authorization value that only starts with null or a boolean The exception for a literal null, None, true or false authorization value now needs the whole value to be that literal, so a token such as null-<rest> is redacted in Python and Rust * fix(anthropic): send a structured output schema non-strict when OpenAI strict mode would reject it * fix(anthropic): resend a web search without domain filters when OpenAI refuses them under drop_params --------- Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| _experimental | ||
| a2a | ||
| agent_endpoints | ||
| alerting_endpoints | ||
| analytics_endpoints | ||
| anthropic_endpoints | ||
| auth | ||
| batches_endpoints | ||
| client | ||
| common_utils | ||
| config_resolvers | ||
| container_endpoints | ||
| control_plane | ||
| credential_endpoints | ||
| db | ||
| decisions_endpoints | ||
| deps | ||
| discovery_endpoints | ||
| enterprise_billing | ||
| example_config_yaml | ||
| fine_tuning_endpoints | ||
| google_endpoints | ||
| guardrails | ||
| health_endpoints | ||
| hooks | ||
| image_endpoints | ||
| list_api | ||
| logging_endpoints | ||
| management | ||
| management_endpoints | ||
| management_helpers | ||
| mcp_server | ||
| memory | ||
| middleware | ||
| ocr_endpoints | ||
| openai_files_endpoint | ||
| pass_through_endpoints | ||
| policy_engine | ||
| prompts | ||
| proxy_server | ||
| public_endpoints | ||
| rag_endpoints | ||
| realtime_endpoints | ||
| rerank_endpoints | ||
| response_api_endpoints | ||
| response_polling | ||
| roi_calculator | ||
| rust_forward | ||
| search_endpoints | ||
| shutdown | ||
| spend_tracking | ||
| telemetry | ||
| test_configs | ||
| types_utils | ||
| ui_crud_endpoints | ||
| utils | ||
| vector_store_endpoints | ||
| vector_store_files_endpoints | ||
| video_endpoints | ||
| __init__.py | ||
| _prisma.py | ||
| conftest.py | ||
| proxy_server_config.yaml | ||
| router_entry_point_stubs.py | ||
| rust_auth_stores.py | ||
| skill_submission_rows.py | ||
| spend_counters_ledger_twin.py | ||
| test__lazy_features.py | ||
| test__types.py | ||
| test_admin_mcp.py | ||
| test_aiohttp_cleanup_closed.py | ||
| test_aiohttp_session_recovery.py | ||
| test_api_key_masking_in_errors.py | ||
| test_aproxy_startup.py | ||
| test_audio_speech_prometheus_hooks.py | ||
| test_batch_expiry.py | ||
| test_batch_metadata_none_fix.py | ||
| test_batch_retrieve_bedrock.py | ||
| test_batch_x_litellm_model_encoding.py | ||
| test_blocked_response_usage.py | ||
| test_body_snapshot_callback_params.py | ||
| test_budget_reservation.py | ||
| test_budget_reservation_ledger.py | ||
| test_budget_reservation_rust.py | ||
| test_budget_reservation_rust_ledger.py | ||
| test_bug_report_config.py | ||
| test_caching_routes.py | ||
| test_chat_completion_metadata.py | ||
| test_claude_code_marketplace.py | ||
| test_collector.py | ||
| test_common_request_processing.py | ||
| test_component_allowlists.py | ||
| test_conftest.py | ||
| test_cors_config.py | ||
| test_credential_slot_registry.py | ||
| test_custom_callback_input.py | ||
| test_custom_logger_s3_gcs.py | ||
| test_custom_proxy.py | ||
| test_custom_tokenizer_bug.py | ||
| test_db_schema_changes.py | ||
| test_dev_reload.py | ||
| test_dynamic_mcp_route.py | ||
| test_empty_model_list.py | ||
| test_enforce_user_param.py | ||
| test_fallback_management_endpoints.py | ||
| test_fastapi_offline_routes.py | ||
| test_filter_models_by_team_access_group.py | ||
| test_get_favicon.py | ||
| test_get_image.py | ||
| test_health_check_functions.py | ||
| test_health_check_max_tokens.py | ||
| test_init_litellm_callbacks.py | ||
| test_langfuse_passthrough_security.py | ||
| test_lazy_openapi_snapshot.py | ||
| test_litellm_pre_call_utils.py | ||
| test_max_budget_env_var.py | ||
| test_mcp_asgi_response.py | ||
| test_model_based_routing_files_batches.py | ||
| test_model_deprecations_endpoint.py | ||
| test_model_dump_with_preserved_fields.py | ||
| test_model_id_header_propagation.py | ||
| test_model_info_default_limits.py | ||
| test_model_level_guardrails.py | ||
| test_model_list_aliases.py | ||
| test_model_list_callback_filter.py | ||
| test_model_list_discoverable.py | ||
| test_model_list_healthy_only.py | ||
| test_modify_response_streaming_passthrough.py | ||
| test_moyai_endpoints.py | ||
| test_native_compaction.py | ||
| test_openai_ws_passthrough_routes.py | ||
| test_openapi_schema_validation.py | ||
| test_plugin_routes.py | ||
| test_pointfive_dashboard_config.py | ||
| test_pointfive_ui_callback.py | ||
| test_pricing_currency.py | ||
| test_pricing_field_strip.py | ||
| test_prisma_client_backoff_retry.py | ||
| test_prisma_engine_watchdog.py | ||
| test_prisma_migration.py | ||
| test_prometheus_cleanup.py | ||
| test_prometheus_metrics_server.py | ||
| test_prompt_test_endpoint.py | ||
| test_provider_url_destination_guard.py | ||
| test_proxy_cli.py | ||
| test_proxy_config_unit_test.py | ||
| test_proxy_custom_auth.py | ||
| test_proxy_logging_hook_detection.py | ||
| test_proxy_reject_logging.py | ||
| test_proxy_server.py | ||
| test_proxy_server_custom_logger.py | ||
| test_proxy_server_endpoints_and_startup.py | ||
| test_proxy_server_endpoints_and_startup_ledger.py | ||
| test_proxy_server_exception_mapping.py | ||
| test_proxy_setting_guardrails.py | ||
| test_proxy_token_counter.py | ||
| test_proxy_types.py | ||
| test_proxy_utils.py | ||
| test_proxy_utils_model_creation_and_error_logging.py | ||
| test_pyroscope.py | ||
| test_read_model_list.py | ||
| test_redis_auth_cache_flag.py | ||
| test_reducto_ocr_route.py | ||
| test_response_model_sanitization.py | ||
| test_response_polling_pre_call_checks.py | ||
| test_route_a2a_models.py | ||
| test_route_llm_request.py | ||
| test_route_priority.py | ||
| test_sensitive_route_auth.py | ||
| test_server_listener.py | ||
| test_server_root_path.py | ||
| test_shared_health_check.py | ||
| test_spend_log_cleanup.py | ||
| test_swagger_chat_completions.py | ||
| test_team_member_update.py | ||
| test_team_org_move.py | ||
| test_tools_allowlist_enforcement.py | ||
| test_ui_path_detection.py | ||
| test_unit_test_proxy_hooks.py | ||
| test_update_llm_router_resilience.py | ||
| test_update_spend.py | ||
| test_v2_hook_routing.py | ||
| test_v2_proxy_fields.py | ||
| test_zero_cost_model_budget_bypass.py | ||
| test_zerobus_dashboard_config.py | ||
| vector_store_access_group_state.py | ||
| vertex_key.json | ||