feat(openai): support finite chat continuations - #728
Open
franciscojavierarceo wants to merge 2 commits into
Open
feat(openai): support finite chat continuations#728franciscojavierarceo wants to merge 2 commits into
franciscojavierarceo wants to merge 2 commits into
Conversation
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
There was a problem hiding this comment.
Pull request overview
Adds finite stored continuation support when translating OpenAI Responses requests to Chat Completions backends.
Changes:
- Rehydrates prior response history and fails closed when finite history is unavailable.
- Adds response storage to the example pipeline and two-turn integration coverage.
- Extends inference fixtures with dynamic response-ID binding and synthetic replay coverage.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
tests/utils/src/inference_fixture/schema.rs |
Adds previous-response ID binding. |
tests/utils/src/inference_fixture/replay.rs |
Binds IDs during fixture replay. |
tests/utils/src/inference_fixture/record.rs |
Binds IDs during live recording. |
tests/utils/src/inference_fixture/coverage.rs |
Validates new fixture coverage. |
tests/integration/tests/suite/examples/responses_to_chat_completions.rs |
Tests stored continuations and missing history. |
tests/integration/fixtures/inference/scenarios/responses/chat-basic-nonstream.yaml |
Defines a two-turn continuation scenario. |
tests/integration/fixtures/inference/recordings/synthetic/responses/chat-basic-nonstream.json |
Records synthetic continuation behavior. |
tests/integration/fixtures/inference/README.md |
Documents fixture binding and coverage. |
tests/integration/fixtures/inference/coverage.yaml |
Registers translation coverage. |
examples/README.md |
Updates the example description. |
examples/configs/openai/responses/responses-to-chat-completions.yaml |
Adds storage and rehydration filters. |
docs/filters/responses_to_chat_completions.md |
Documents continuation requirements. |
apis/src/openai/responses/responses_to_chat_completions/tests.rs |
Adds translation and fail-closed tests. |
apis/src/openai/responses/responses_to_chat_completions/mod.rs |
Enforces finite-history rehydration. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
previous_response_idcontinuations when a Responses API client targets a backend that only implements/v1/chat/completions.Related issue
Finite request/response translation follows up on #35. Streaming response conversion remains tracked in #36.
Validation
make testmake testandmake test-inference-fixturesmake lintmake docChecklist
Signed-off-bytrailer.Pre-landing review
Claude and Codex reviews found no remaining actionable issues after strengthening the inference fixture to cover a real two-turn stored continuation.
Breaking changes
None. Requests without
previous_response_idare unchanged. Streaming continuation response translation remains outside this change and is tracked in #36.