mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #630] [CLOSED] serve: add opt-in stateless Responses API #2731
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2731
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/630
Author: @CC-David-CC
Created: 10/3/2026
Status: ❌ Closed
Base:
main← Head:work/responses-api📝 Commits (9)
0fc5140responses R0: pin client capture and upstream baseline evidence88a63bcresponses R1: add stateless request boundary and local assembler53c4f9fresponses R2: stream typed events and verify cancellation cleanup5cb5746Support client-owned functions and honest Responses reasoning9609267Qualify the Responses client profile and freeze R4 acceptance46a44c5Record the exact passing R4 checkpoint receiptf262838Preserve literal tool markup in Responses reasoning summaries8258746Distinguish literal tool markers from function call preambles116da0cDocument parser fixes and Responses regression checkpoint📊 Changes
159 files changed (+30244 additions, -7 deletions)
View changed files
📝
.gitignore(+3 -0)📝
README.md(+3 -0)➕
docs/RESPONSES.md(+206 -0)➕
docs/responses-evidence/R0/REPORT.md(+88 -0)➕
docs/responses-evidence/R0/baseline/serve-test_detok.txt(+13 -0)➕
docs/responses-evidence/R0/baseline/serve-test_lifecycle.txt(+25 -0)➕
docs/responses-evidence/R0/baseline/serve-test_mcp.txt(+89 -0)➕
docs/responses-evidence/R0/baseline/serve-test_monitor.txt(+30 -0)➕
docs/responses-evidence/R0/baseline/serve-test_security.txt(+26 -0)➕
docs/responses-evidence/R0/baseline/serve-test_server.txt(+311 -0)➕
docs/responses-evidence/R0/baseline/serve-test_structured.txt(+37 -0)➕
docs/responses-evidence/R0/baseline/test-results.json(+86 -0)➕
docs/responses-evidence/R0/capture-attempt-1.json(+34 -0)➕
docs/responses-evidence/R0/client-profile.json(+34 -0)➕
docs/responses-evidence/R0/codex-capture-output.txt(+6 -0)➕
docs/responses-evidence/R0/codex-profile.toml(+12 -0)➕
docs/responses-evidence/R0/handoff-checks.json(+41 -0)➕
docs/responses-evidence/R0/handoff-pack.txt(+1 -0)➕
docs/responses-evidence/R0/handoff-tests-utf8.txt(+58 -0)➕
docs/responses-evidence/R0/handoff-tests.txt(+78 -0)...and 80 more files
📄 Description
Related to #451.
Adds an experimental stateless
POST /v1/responsesadapter for clients such as Codex. Text, reasoning, function calls and client-owned tool results pass through the existing Strata service. One request-local assembler produces final JSON and typed SSE with stable item IDs, indexes and sequence numbers.This is a bounded compatibility profile. Unsupported behavior is rejected explicitly. This draft needs the accounting and replay-contract follow-ups below before it is ready to merge.
Behavior and ownership
Service.run()directly, consuming semantic parser events. Existing FIFO admission, model execution, authentication, CORS, cancellation and engine-output draining remain in use.store:false, non-strict functions including namespaces, matchingfunction_call_outputitems, visible reasoning, separately generated summaries and authenticated Strata-issued replay tokens./loadand/unloadfix: consume bounded request bodies before replying. The Windows connection-reset failure was also reproduced against the selected upstream base; the R4 report records it.Enablement
Disabled by default. Install
requirements-responses.txt, supply a stableSTRATA_RESPONSES_REPLAY_KEYin the server environment, and start the existing configured server with--experimental-responsesor top-level config"experimental_responses": true. Use the existing API-key configuration. Disabled startup imports no optional crypto dependency and leaves/v1/responsesunavailable.Clients use the ordinary Responses endpoint with explicit
store:false; no experimental request field is needed. The guide describes setup, continuation, the tested Codex profile and capability limits.Validation and its limits
openai==3.23.0: JSON, typed streaming and assembly, namespaced function/result replay, reasoning and authenticated replay. Process-restart checks verify replay with the same deployment key and no stored response files.Hello worldfrom a real Coder IQ1_M model on an RTX 4090 over LAN, including real reasoning and a generated summary. It did not call tools. This validates the combined follow-up configuration, not an isolated native test of this PR. Native receipt.The source audit verifies no native/build changes against upstream
99f3dbd0b21d1401b3769e0c0d963913607f380b. These results cover the recorded client/profile and do not establish compatibility with every Codex version or a complete native coding workflow.Excluded capabilities
No retained-response CRUD,
previous_response_id, background execution/cancel endpoint, compaction, media, hosted tools or WebSockets. Strict/omitted-strict functions, JSON Schema/JSON-object output and custom/Lark tools are rejected. Raw GBNF belongs to a separate native contribution and is not needed to use this adapter. Reasoning summaries require another generation pass and count toward the output allowance.Before merge
encrypted_contentfrom an item that also has raw content and a summary currently rejects the nonempty summary. Full returned-item encrypted replay passes.Reviewed head:
46a44c51782eae4119b85b27c5b3639bc870e0a2onCC-David-CC:work/responses-api. Its R4 implementation is96092670da0dc3c1cfcce99bb90a3e6ca25ae1d9; the tip adds the checkpoint receipt.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.