feat(server): add scoped Responses API support - #219
Draft
PhilipJohnBasile wants to merge 1 commit into
Draft
Conversation
Owner
|
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. |
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
/v1/responsesadapter that reuses the existing chat inference pathnameandnamespace, preserve continuations and parallel calls, and validate events against OpenAI 2.52xhighreasoning to the localhighlevel with an observable downgradeScope and limitations
This is Codex Responses compatibility with hosted tools disabled. Codex 0.146 sends
web_searchin its default request; MTPLX intentionally returns a precise 400 unless hosted tools are disabled or removed. Hosted web/tool search, background jobs, server-side Response storage,previous_response_id, and multimodal input are not implemented.The committed fixtures are reduced, sanitized representative contracts from loopback Codex 0.146 captures; they are not complete copies of the raw request.
This addresses the bounded local subset requested in #193 without claiming default hosted-tool Codex compatibility.
Verification
uv run --extra server --extra dev --with openai==2.52.0 pytest -q tests/test_server_openai.py tests/test_server_responses.py— 310 passeduv run --extra server --extra dev ruff check mtplx/server/openai.py mtplx/server/responses.py tests/test_server_openai.py tests/test_server_responses.pypython3 -m compileall -q mtplx/server/openai.py mtplx/server/responses.py tests/test_server_openai.py tests/test_server_responses.pygit diff --check upstream/mainReview history
The first implementation was held after live Codex captures exposed unsupported namespace tools,
xhigh, and incomplete fixture coverage. This revision adds namespace conversion, official SSE/schema validation, duplicate-name rejection, representative fixtures, and explicit scope documentation.