mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +00:00
A proxy on the default remote cost map never produced a prompt cache breakpoint: the published map has the gpt-5.6 entries without supports_prompt_cache_breakpoint, so the model-map gate returned False for every listed model and only LITELLM_LOCAL_MODEL_COST_MAP=True (the repo .env, hence the passing unit tests) made the feature work. The hook now honors the flag when the entry carries one, True or False, and otherwise applies the GPT-5.6+ version rule to the model name, so a map that lags the flag still gets the OpenAI dialect. The model-map tests pin litellm.model_cost to the bundled backup map and a new test drives the hook against an unflagged gpt-5.6 entry. completion() and acompletion() take base_url as an alias for api_base that only lands on api_base after the cache control hook ran, so a GPT-5.6 call at a non-OpenAI gateway given through base_url still got the dialect. Both seed calls and the unstamped request-params read now look at base_url too. ResponsesAPIRequestUtils.merge_prompt_management_input reshaped hook output in place, retyping text parts to input_text on the caller's own message objects. The merge now shapes a copy of each message as it emits it, so the identity-based merge keeps working on the hook's objects and nothing the hook or the client owns is mutated. |
||
|---|---|---|
| .. | ||
| litellm_completion_transformation | ||
| mcp | ||
| test_custom_tool_call.py | ||
| test_metadata_codex_callback.py | ||
| test_no_duplicate_spend_logs.py | ||
| test_null_test_fix.py | ||
| test_responses_api_bridge_flag.py | ||
| test_responses_api_request_body.py | ||
| test_responses_prompt_management.py | ||
| test_responses_router_cooldown.py | ||
| test_responses_streaming_iterator.py | ||
| test_responses_utils.py | ||
| test_responses_websocket_all_providers.py | ||
| test_rust_bridge_websocket.py | ||
| test_sse_output_recovery.py | ||
| test_streaming_iterator.py | ||
| test_streaming_iterator_error_events.py | ||
| test_text_format_conversion.py | ||