feat(server): add scoped Responses API support - #219
Conversation
|
Review queued for the next cycle, together with #193. The stateless adapter reusing the chat inference path is the right starting shape; the OpenAI 2.52 event validation is what I will test against first. |
5e01f83 to
0978862
Compare
|
The 2.8.0 refactor moved the request prologue this PR patches (RequestPolicy extraction), so this needs a semantic rebase, not a textual one. I want it in. Rebase onto v2.8.0 and I will run the Codex fixture matrix against it; the reasoning_effort high mapping changed too (now maps up to xhigh), so the _xhigh fixture is the one to re-check. |
1f129a9 to
e105cae
Compare
|
Current-main refresh completed and the PR branch was force-updated as one clean signed-off commit.
The semantic resolution keeps the Responses reasoning metadata in Publication was gated on the frozen The upstream |
867f46c to
ede7180
Compare
|
@youssofal The scoped Responses API branch is mergeable and the current-main integration/validation is complete. The remaining upstream checks are waiting for external-fork approval rather than failing tests. When convenient, please approve the workflows and review the frozen |
|
Sorry for the silence here. The text only stateless scope is the right shape and the single clean commit makes it reviewable. I am not going to rush a merge of this size without reading the frozen head properly, it is next in the review queue after the current release work, and I will approve the workflow runs when I sit down with it. |
ede7180 to
f4ec575
Compare
2382dfd to
8bc4d88
Compare
Add a stateless, text-only Responses adapter over the existing chat runtime. Cover client-executed function, custom, and namespace tools with SDK-backed CI tests and backend-aware reasoning observability. Signed-off-by: Philip John Basile <PBasile@Basilecom.com>
f4ec575 to
c1a4936
Compare
|
Thanks. Of the open API PRs this is the most useful one. A stateless It conflicts with One question for the rebase. Codex sends |
|
Update on the rebase: your 12 files are on the branch for the next release under your authorship, the unit tests pass, and a real Two things on the Codex side decide the first-request question:
A question for you, since you designed the rejection: should the adapter drop hosted tool types it cannot serve and say so (a warning in the response metadata and in the serve log), so Codex works with its defaults? Or keep the 400 and document both settings? The model never sees hosted tools either way. The apps bloat stays a documentation item. |
|
@youssofal Keep the explicit 400 as the default. Dropping hosted tools changes the requested capability set, and a response-metadata warning is not a reliable client acknowledgement. It also cannot preserve an explicitly selected unsupported tool. I would not trade a visible setup error for a successful-looking response that never had the requested capability. I verified the client-side answer against codex -c 'web_search="disabled"' --disable image_generationFor a deliberately minimal local setup, append Results: the default custom-provider capture advertised The tested settings and limitations are now beside Thanks for the 39b78054 integration and real two-tool receipt. These new commits are documentation/validation only, so they can accompany that integration without replacing your rebased runtime code. The adapter stays fail-closed, and the existing context-window guard stays intact. |
|
@youssofal The remaining current-main conflict is resolved in bee434d, an ordinary merge of 21be78b. The semantic resolution preserves both upstream's validated client-turn/client-entry links and the adapter observability return path, with a new regression. The hosted-tool policy remains explicit 400s, and the previously verified Codex settings remain documented. The exact published source passed 484 API/Responses/observability/dashboard/import-boundary tests, Ruff, compilation and diff checks on macOS ARM64: https://github.com/PhilipJohnBasile/MTPLX/actions/runs/34069355260 . GitHub now reports the branch mergeable. Ready for source review and coordination with your separate 39b78054 release integration; this is not a request to land duplicate runtime work. |
Summary
Adds a stateless, text-only
/v1/responsesadapter on the existing chat inference path. Supports structured text input, instructions, streaming/non-streaming output, JSON-schema text formats, client-executed function/custom tools, and namespace-grouped functions. Returned calls preserve their original names and namespaces.Current-main integration complete
Review head:
bee434d2ff386acdec33f0dc3327dcac0d8e8bf4.Merged exact upstream
21be78b3f51820eecef020e5e4855c0715eaf9a5through an ordinary two-parent commit. The request-observability conflict was resolved semantically: upstream's bounded client-turn/client-entry link metadata and the Responses-specific observability return path are both retained. A regression verifies valid request links survive and invalid header values are excluded. Two unused postcommit bookkeeping assignments were removed without changing template normalization or sentinel construction.The previous current-main conflict blocker is addressed. Existing reasoning metadata, namespace handling, footer isolation, logprobs and recovery behavior remain covered.
Validation on the published source
Readiness run 34069355260, macOS ARM64, Python 3.11, real MLX imports:
This is API/source validation, not a newly performed model or packaged-app smoke. Youssof's separate 2.11.3 integration (
39b78054) and real Codex two-tool run remain the maintainer's runtime receipt; this branch must still be coordinated with that release integration rather than merged twice.Hosted-tool decision and verified client setup
Keep explicit
400errors for unsupported hosted tools, rather than silently removing requested capabilities. After configuring the local Responses provider:codex -c 'web_search="disabled"' --disable image_generationOptional
--disable appscreates a deliberately smaller client capability profile; it is not a shell-network policy. Preserve existing provider/credential settings.The exact Codex CLI 0.144.1 loopback capture is documented beside the endpoint in
docs/api.mdanddocs/validation/codex-0.144.1-local-tool-profile.json. Capture run 34064490796 verified defaultweb_searchand hosted-disabled request construction without an account or model. Image generation was enabled but not advertised by that particular model/provider configuration; no universal default-tool or installed-connector size claim is made.Deliberate limits
Hosted search/image/tool/MCP/code-interpreter execution, background jobs, response storage,
previous_response_id, multimodal input and stream obfuscation are outside this route. Unsupported types and requested obfuscation fail explicitly. Clients resend full conversation and tool outputs. Existing Codex 0.146 fixtures are sanitized representative contracts, not raw requests.Ready for source review with the current-main integration and focused tests completed. Maintainer review, required upstream checks and release coordination remain authoritative.