Repository navigation
Don't attach a conversation to stateless /v1/responses requests - #3191
Conversation
A /v1/responses request with store=false and no conversation or
previous_response_id comes from a stateless client that resends the full
history as input on every request (e.g. a Chat Completions to Responses
proxy). lightspeed-stack still auto-created a conversation and passed it
to Llama Stack, which then copied the entire input into the conversation
after the response. Llama Stack adds those items with a single
AddItemsRequest, which is limited to 20 items, so once the history grew
past that every request failed after streaming the output:
1 validation error for AddItemsRequest
items
List should have at most 20 items after validation, not 22
For such requests, set omit_conversation so the conversation parameter
isn't sent to Llama Stack, and skip topic summary generation, whose
result is only used when the turn is stored.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
/ok-to-test |
7058821
into
lightspeed-core:konflux/references/release/0.6
|
🤖 Finished Retro · ✅ Success · Started 9:36 AM UTC · Completed 9:49 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $4.58 |
Retro: PR #3191 — Backport bug fix for stateless
|
See #3190 for
mainbranch - this is a 0.6 backportDescription
A /v1/responses request with store=false and no conversation or previous_response_id comes from a stateless client that resends the full history as input on every request (e.g. a Chat Completions to Responses proxy). lightspeed-stack still auto-created a conversation and passed it to OGX, which then copied the entire input into the conversation after the response. OGX adds those items with a single AddItemsRequest, which is limited to 20 items, so once the history grew past that every request failed after streaming the output:
For such requests, set omit_conversation so the conversation parameter isn't sent to OGX, and skip topic summary generation, whose result is only used when the turn is stored.
Note:
store: truethat add more than 20 items at once. That would be a separate thing, and would require a change to OGX.conversationoptional in many places.Type of change
Tools used to create PR
Identify any AI code assistants used in this PR (for transparency and review context)
Checklist before requesting a review
Testing
test_stateless_request_omits_conversation_and_topic_summary(tests/unit/app/endpoints/test_responses.py). Existing unit tests pass.
store: false, noconversation/previous_response_id,and 20+ input items (e.g. a user message plus 10 function_call/function_call_output pairs)
1 validation error for AddItemsRequest ... at most 20 items;after:
response.completed