Skip to content

feat(responses): route /v1/responses to ARGO's native Responses endpoint - #185

Open
caidao22 wants to merge 2 commits into
Oaklight:masterfrom
caidao22:feature/native-responses-routing
Open

caidao22 wants to merge 2 commits into
Oaklight:masterfrom
caidao22:feature/native-responses-routing

Conversation

@caidao22

@caidao22 caidao22 commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

What

/v1/responses is converted down to Chat Completions and back, which drops
things the Chat schema has no place for. ARGO serves the Responses API
natively for GPT models, so for those this PR forwards to ARGO's own
Responses endpoint instead — as config only, no handler, no new module.
Every non-embedding OpenAI-family model gets both providers and
prefer_same_format picks the one matching the client's wire format.

Auth fix

ARGO treats a body-level user as an override of the bearer, so the
same-format route (which carries the body through, unlike the conversion
path that dropped the field) would let a client authenticate as someone
else. _apply_identity overwrites it with the resolved user.

Impact: under username-passthrough this closes body-based impersonation —
the bearer now always wins. Otherwise it kills the bogus-user-returns-200-
with-warning-text failure mode. Cost: clients using OpenAI's user for
end-user attribution get it silently replaced with the ARGO username.

Blocked on llm-rosetta 0.14

Needs the argo--openai_responses shim, .done tool arguments, and
prefer_same_format — all on master, none released (PyPI is 0.13.0, where
this raises KeyError: 'provider' at startup). The floor is already
>=0.14, so installs fail loudly until the release lands.

84 tests pass, no skips.

@caidao22 caidao22 changed the title feat(responses): route /v1/responses to ARGO's native endpoint via prefer_same_format feat(responses): route /v1/responses to ARGO's native Responses endpoint Oct 4, 2026
All GPT models serve ARGO's Responses API natively, so give them both
OpenAI providers and enable prefer_same_format: /v1/responses reaches
ARGO unconverted instead of round-tripping through Chat Completions.

Requires llm-rosetta>=0.14 (argo--openai_responses shim and
server.prefer_same_format).
ARGO treats a body-level user as an override of the bearer, so a
client-supplied one is replaced, not defaulted.
@caidao22
caidao22 force-pushed the feature/native-responses-routing branch from d46448e to 9e70fc4 Compare October 4, 2026 01:45

This branch has not been deployed

No deployments
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.

1 participant