Skip to content

feat(openai): support finite chat continuations - #728

Open
franciscojavierarceo wants to merge 2 commits into
praxis-proxy:mainfrom
franciscojavierarceo:codex/responses-chat-continuation
Open

feat(openai): support finite chat continuations#728
franciscojavierarceo wants to merge 2 commits into
praxis-proxy:mainfrom
franciscojavierarceo:codex/responses-chat-continuation

Conversation

@franciscojavierarceo

Copy link
Copy Markdown
Contributor

Summary

  • Support finite previous_response_id continuations when a Responses API client targets a backend that only implements /v1/chat/completions.
  • Fail closed if stored history was not rehydrated, preventing silent loss of prior turns.
  • Add the required store/rehydrate example pipeline, two-turn functional coverage, and a controlled synthetic inference replay that binds the prior generated response ID.

Related issue

Finite request/response translation follows up on #35. Streaming response conversion remains tracked in #36.

Validation

  • Unit tests: make test
  • Integration or functional tests: make test and make test-inference-fixtures
  • make lint
  • Rustdoc: make doc

Checklist

  • I reviewed every changed line and can explain the change.
  • New capabilities include an example config and functional example test.
  • User-facing behavior and generated documentation are updated.
  • Performance-sensitive changes include appropriate benchmark or load-test evidence. Not applicable: no new buffering, cloning, or hot-path work was added.
  • Commits are signed and include a Signed-off-by trailer.

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_id are unchanged. Streaming continuation response translation remains outside this change and is tracked in #36.

Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
@franciscojavierarceo
franciscojavierarceo requested a balanced review from Copilot August 13, 2026 00:38
@franciscojavierarceo
franciscojavierarceo marked this pull request as ready for review August 13, 2026 00:40
@franciscojavierarceo
franciscojavierarceo requested review from a team and crstrn13 August 13, 2026 00:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread apis/src/openai/responses/responses_to_chat_completions/mod.rs Outdated
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants