litellm/tests/integration/messages_endpoint
ryan-crabbe-berri 511afdc8d6
fix(responses): send bridged system prompts too long for instructions as input (#52964)
* test(responses): cover bridged system prompts too long for instructions

Black-box wire tests for chat completions and /v1/messages on a Responses
bridged OpenAI model. A system prompt over the instructions length limit
must reach the upstream in input on truncation auto and on a follow-up
whose stored chain lacks it, while short prompts and prompts the chain
already holds keep today's shape

* fix(responses): send bridged system prompts too long for instructions as input

OpenAI and Azure reject an instructions string over 1,048,576 code points.
The chat completions and /v1/messages bridges still sent long system
prompts there on truncation auto and on follow-ups whose stored chain did
not hold the prompt, so those requests failed with a 400. After the stored
chain check, instructions over the limit now go out as a leading system
input item, and a truncation auto follow-up skips a prompt its stored chain
already holds instead of sending it again

* fix(responses): keep a long system prompt when the caller overrides input in extra_body

A caller's extra_body input replaced the input that carried the moved
system prompt, so the prompt was dropped. The moved prompt now goes into
whichever input the request sends

* ci(unit): run the new instructions length tests in the responses shard
2026-11-20 11:56:47 -08:00
..
chat_bridge fix(anthropic)!: send /v1/messages PDF documents to OpenAI-shaped providers as file parts (#47166) 2026-10-29 08:06:12 -07:00
providers test(integration): stop requiring safeguards calls to wait for the anthropic beta map (#52329) 2026-11-17 11:40:48 -08:00
responses_bridge fix(responses): send bridged system prompts too long for instructions as input (#52964) 2026-11-20 11:56:47 -08:00
safeguards fix(databricks): use the native Anthropic route for Claude /v1/messages (#46091) 2026-10-18 02:44:38 +00:00
test_anthropic_messages_caller_tools_wire.py test(integration): give each owned proxy a private database and Redis by default (#47213) 2026-10-18 03:37:41 +00:00
test_beta_gated_fields_wire.py feat(anthropic): pick the beta allowlist row per deployment and surface input_transformations (#49689) 2026-11-03 01:55:26 +00:00
test_finished_requests_freed_wire.py fix(router): free streamed Responses API requests without waiting for a full gc (#52215) 2026-11-17 15:55:39 -08:00
test_guardrail_block_stream.py fix(proxy): stream a guardrail block on /v1/messages as Anthropic events (#49010) 2026-10-29 05:32:55 -07:00
test_guardrail_long_tool_names_wire.py refactor(anthropic): rename llms/anthropic/pass_through to llms/anthropic/messages (#48510) 2026-10-27 10:08:25 -07:00
test_guardrail_rewrite_keeps_turn_fields_wire.py fix(guardrails): keep tool_result is_error and system row output_config through /v1/messages guardrail rewrites (#52828) 2026-11-19 17:26:35 -08:00
test_message_threads_wire.py feat(anthropic): forward message threads on native /v1/messages (#50976) 2026-11-10 18:33:54 -08:00
test_messages_additional_drop_params_wire.py fix(anthropic-messages): apply additional_drop_params before the unsupported param checks (#50753) 2026-11-10 01:35:35 +00:00
test_tool_result_text_wire.py feat(mistral): add native upstream token counting support (#50652) (#50653) 2026-11-14 03:19:57 -05:00