litellm/tests/integration/translation/chat_completions
zoveki e6220e82b8
fix(responses): replay phase on the azure route and tag streamed text deltas with phase (#51059)
* fix(responses): replay phase on the azure route and tag streamed text deltas with phase

* test(integration): expect phase and replay on azure responses bridge chat cases

* test(responses): expect phase and the replay record in the Azure translation cases

Azure now joins the replay path, so its bridged tool turns carry phase and openai_responses_replay. Follow-up requests replay the previous turn without its record, and the streamed_phases docstring names the event that sets it

* fix(responses): label each cached stream chunk with its own message's phase

A cache hit replayed as a stream put the whole message's phase on the first
text chunk and none on the rest. The replay now splits the cached content by
the replay record's message lengths, so each chunk carries its message's phase
like a fresh stream. The undefined-phase tests also run on Azure now.

* fix(responses): carry each stream chunk's phase at chunk level so the OpenAI SDK keeps one phase

The OpenAI SDK's client.chat.completions.stream() joins every string in a delta, so a phase on every text delta assembled as "commentarycommentary..." and LiteLLM rejected the next turn. The phase now goes in the chunk's own provider_specific_fields on live and cached streams, and the final chunk's delta carries the turn's phase and replay record once, as on main

* fix(responses): build the replay chunk's empty default with a factory so the module imports on Python 3.11

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-11-17 21:54:33 +00:00
..
bases fix(responses): replay phase on the azure route and tag streamed text deltas with phase (#51059) 2026-11-17 21:54:33 +00:00
basic test(translation): add claude-haiku-5-5 vertex ai cases (#47136) 2026-10-17 17:53:59 +00:00
cross_model fix(responses): replay phase on the azure route and tag streamed text deltas with phase (#51059) 2026-11-17 21:54:33 +00:00
prompt_caching test(translation): share rich fixtures across Claude, GPT and Gemini providers (#46585) 2026-10-14 19:53:09 -07:00
reasoning fix(gemini): send reasoning_effort xhigh as thinkingLevel xhigh for gemini-4-hydrogen (#52060) 2026-11-16 10:51:21 -08:00
response_format fix(bedrock)!: keep Claude's thinking when response_format json_schema is set (#49696) 2026-11-05 04:07:11 +00:00
sampling test: update stale integration and guardrail e2e tests to intended behavior (#48665) 2026-10-28 01:11:25 +00:00
streaming fix(bedrock)!: keep Claude's thinking when response_format json_schema is set (#49696) 2026-11-05 04:07:11 +00:00
__init__.py test(integration): anthropic-route basic translation cases for six Claude models on messages, chat completions and responses (#44607) 2026-10-05 18:24:01 +00:00
templates.py test: compare coding-agent response contracts across model tiers (#46597) 2026-10-15 06:04:06 +00:00