mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-28 00:00:38 +00:00
* fix(llms): send later system items as user turns for models declared system-first * fix(llms): keep a system-first flag on its own deployment and apply it to openai/ Responses on other hosts * fix(responses): treat a continued turn's system items as later ones on system-first openai/ deployments A previous_response_id turn counts system and developer items from the first input item, so a reminder that opens a continued turn folds into instructions instead of answering 400 Removing the last deployment that sets supports_mid_conversation_system true now restores the catalog's value on the shared row, and leaves the row as it is when the catalog declares nothing, so unmarked same-model deployments never become system-first * fix(responses): send a continued turn's system items as user turns on system-first openai/ deployments Fireworks keeps the first turn's system item in the stored response, so folding a continued turn's reminder into instructions still answered 400 there. On the openai/ route a previous_response_id turn now sends every system and developer item as a user turn with the operator note, in place hosted_vllm and native fireworks_ai keep folding, since they fold the first turn's system prompt too and the stored response holds no system item * fix(responses): keep a first turn's system prompt in stored input on system-first openai/ deployments On an openai/ deployment flagged supports_mid_conversation_system false, a first turn without caller instructions now sends the leading system block as one system input item, so a provider that stores input keeps it on previous_response_id turns. With caller instructions the leading block still folds into instructions The flag is no longer enrolled in the shared-only-when-true capability fields, so a deployment's false is shared with same-model deployments that declare nothing, as on main * fix(responses): keep later developer reminders in place on system-first openai/ deployments On a first openai/ turn to a system-first deployment only the leading system block folds into instructions or one leading system item now. Later developer items go out in place as user turns with the operator note, so a resent history keeps a stable prefix for the prompt cache. A lone leading system item next to caller instructions now folds too, since vLLM sends instructions as its own first system message hosted_vllm keeps folding later text developer items into instructions as on main, and the flag readers in utils share one helper --------- Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| chat | ||
| embedding | ||
| image_edit | ||
| responses | ||
| videos | ||
| __init__.py | ||
| test_hosted_vllm_rerank_transformation.py | ||