mirror of
https://github.com/BerriAI/litellm.git
synced 2026-12-02 01:28:38 +00:00
* fix(completion): send prompt_cache_retention to OpenAI instead of silently dropping it litellm.completion(), Router.completion() and the proxy's /v1/chat/completions accepted prompt_cache_retention and listed it as a supported OpenAI param, but completion() never handed it to get_optional_params, and the leftover-kwargs paths skip known OpenAI params, so it never reached the request body. Make it a named argument of completion() and acompletion() like prompt_cache_key and pass it on. A unit guard sends every OpenAI body param through completion() and fails when a param added to OPENAI_CHAT_COMPLETION_PARAMS has no case proving it reaches the wire, the same hole store and prompt_cache_key fell into in #33184. Live e2e tests capture the body OpenAI receives for the proxy, the SDK and the Router on both openai/gpt-5.5 and openai/responses/gpt-5.5. * chore(completion): type the param-forwarding unit test and keep the basedpyright count flat Every new completion() kwarg adds one unknown-argument error at each call site that splats an untyped dict into it; typing print_verbose's argument and Chat's params removes more than prompt_cache_retention added. * test: freeze the outbound-body model and read captured requests from the mock Addresses review: the e2e body model is frozen, the backend params are a tuple, and the unit test reads the request from the respx route instead of appending to a list. |
||
|---|---|---|
| .. | ||
| fixtures | ||
| realtime | ||
| conftest.py | ||
| conversational_matrix.py | ||
| LLM_TRANSLATION_COVERAGE_MATRIX.md | ||
| passthrough_client.py | ||
| responses_helpers.py | ||
| sdk_clients.py | ||
| structured_output.py | ||
| test_anthropic_completion_e2e.py | ||
| test_audio_speech_e2e.py | ||
| test_audio_transcriptions_e2e.py | ||
| test_bedrock_converse_redacted_thinking_e2e.py | ||
| test_bedrock_guardrail_config_e2e.py | ||
| test_bedrock_kimi_k3_messages_e2e.py | ||
| test_bedrock_mantle_output_limit_e2e.py | ||
| test_bedrock_native_e2e.py | ||
| test_bedrock_provider_matrix_e2e.py | ||
| test_bedrock_web_search_server_tool_e2e.py | ||
| test_cache_control.py | ||
| test_cache_control_injection_tool_calls_e2e.py | ||
| test_chat_completion_prediction_e2e.py | ||
| test_chat_completions_contract_e2e.py | ||
| test_chat_completions_regression_e2e.py | ||
| test_chat_mid_conversation_system_e2e.py | ||
| test_chat_stream_contract_e2e.py | ||
| test_chat_tool_round_trip_e2e.py | ||
| test_completions_endpoint_e2e.py | ||
| test_containers_e2e.py | ||
| test_conversational_matrix_e2e.py | ||
| test_count_tokens_source_e2e.py | ||
| test_credential_messages_e2e.py | ||
| test_custom_pricing_e2e.py | ||
| test_deepseek_reasoning_e2e.py | ||
| test_embeddings_endpoint_e2e.py | ||
| test_files_batches_contract_e2e.py | ||
| test_gemini_url_context_e2e.py | ||
| test_google_interactions_e2e.py | ||
| test_google_native_e2e.py | ||
| test_image_edits_e2e.py | ||
| test_image_generation_e2e.py | ||
| test_messages_azure_foundry_e2e.py | ||
| test_messages_bedrock_e2e.py | ||
| test_messages_beta_headers_e2e.py | ||
| test_messages_count_tokens_bedrock_e2e.py | ||
| test_messages_e2e.py | ||
| test_messages_mid_conversation_system_e2e.py | ||
| test_messages_mid_conversation_system_native_providers_e2e.py | ||
| test_messages_prompt_caching_and_tool_search_e2e.py | ||
| test_moderations_e2e.py | ||
| test_ocr_rust_e2e.py | ||
| test_ollama_e2e.py | ||
| test_passthrough_e2e.py | ||
| test_passthrough_headers_e2e.py | ||
| test_provider_features_e2e.py | ||
| test_realtime_http_e2e.py | ||
| test_reasoning_effort_e2e.py | ||
| test_rerank_e2e.py | ||
| test_responses_bridge_streaming_e2e.py | ||
| test_responses_e2e.py | ||
| test_responses_retrieve_e2e.py | ||
| test_sagemaker_nova_e2e.py | ||
| test_sail_e2e.py | ||
| test_together_ai_e2e.py | ||
| test_token_counter_gemini_contents_e2e.py | ||
| test_vector_stores_e2e.py | ||
| test_vertex_capabilities_e2e.py | ||
| test_vertex_passthrough_e2e.py | ||