fix: support retrieval of stored Responses payloads - #354
Merged
Merged
Conversation
Signed-off-by: Francisco Javier Arceo <arceofrancisco@gmail.com>
franciscojavierarceo
requested review from
bbrowning,
haoshan98,
jiahuei,
leseb,
maralbahari,
noobHappylife,
qandrew and
tjtanaa
as code owners
September 22, 2026 02:54
maralbahari
reviewed
Sep 22, 2026
Signed-off-by: Francisco Javier Arceo <arceofrancisco@gmail.com>
Signed-off-by: Francisco Javier Arceo <arceofrancisco@gmail.com>
maralbahari
approved these changes
Sep 25, 2026
Collaborator
|
@franciscojavierarceo could you please fix the ci and resolve merge conflict? |
Resolve conflicts with current Conversations API refactor. Signed-off-by: Francisco Javier Arceo <arceofrancisco@gmail.com>
Signed-off-by: Francisco Javier Arceo <arceofrancisco@gmail.com>
franciscojavierarceo
force-pushed
the
codex/response-retrieval
branch
from
September 26, 2026 11:52
181ccc1 to
fb25204
Compare
Signed-off-by: Francisco Javier Arceo <arceofrancisco@gmail.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
A response created with
store: truecould be continued throughprevious_response_id, but retrieving it withGET /v1/responses/{response_id}returned 404. Add an authenticated retrieval route backed by a typed terminal response snapshot, persisted atomically with the response history. Retrieval preserves this turn's output, status, usage, and IDs without calling the upstream model.Keep snapshots out of continuation checkpoints and strip request-scoped MCP credentials before persistence. Unknown IDs return a JSON 404; legacy and history-only records return 409 because they lack the original response payload. Document the behavior and expose the endpoint in OpenAPI.
When OIDC is disabled and
OPENAI_API_KEYis nonempty, retrieval validates the supplied bearer token locally before reading storage. Missing or invalid credentials return 401; OIDC authentication takes precedence when enabled. Deployments without either authentication option retain unauthenticated access.Test Plan
cargo clippy --workspace --all-targets -- -D warningsand all pre-commit hooks.