mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-24 22:09:56 +00:00
* fix(responses)!: reject previous_response_id on chat completions and Messages Chat completions and Messages requests that LiteLLM serves through the Responses API accepted `previous_response_id` and forwarded it. The caller still resends the system prompt on every turn, so LiteLLM read the stored chain before each follow-up to avoid billing it twice, and on Bedrock, which has no route to read a stored chain, the follow-up was billed for the prompt twice and never cached Both endpoints now answer 400 for the field and name `/v1/responses` as the place to continue a stored response. The Messages token count answers the same 400. The stored chain lookup is removed. `/v1/responses` is unchanged * fix(responses): keep the chat bridge rejection endpoint-neutral for bridged Messages calls * fix(responses): refuse previous_response_id on every translated Messages token count The Messages token count only refused the field when OpenAI served the count, so a Bedrock GPT model still answered 200 with a local estimate. The check now runs in the proxy count path for every Messages route the gateway translates An empty string is refused too. It used to reach the provider, which answered its own 400 --------- Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| litellm_responses_transformation | ||
| __init__.py | ||
| test_litellm_responses_transformation_transformation.py | ||
| test_responses_bridge_provider_propagation.py | ||