Skip to content

Fix openai_responses_compatible full endpoint handling#2712

Merged
amitksingh1490 merged 2 commits intoantinomyhq:mainfrom
lidaxian121:fix/openai-responses-compatible-endpoint
Mar 27, 2026
Merged

Fix openai_responses_compatible full endpoint handling#2712
amitksingh1490 merged 2 commits intoantinomyhq:mainfrom
lidaxian121:fix/openai-responses-compatible-endpoint

Conversation

@lidaxian121
Copy link
Copy Markdown
Contributor

Summary

  • preserve the configured full /responses endpoint for openai_responses_compatible
  • align its runtime behavior with the provider config template, which already renders a complete responses URL
  • add a regression test for prefixed gateway paths

Problem

openai_responses_compatible renders its configured URL as a full responses endpoint, but OpenAIResponsesProvider::new() only preserved full /responses paths for CODEX and OPENCODE_ZEN.

That meant a sanitized configuration like:
OPENAI_URL=https://gateway.example/custom-prefix/v1
would render to:
https://gateway.example/custom-prefix/v1/responses
but runtime chat requests were rewritten to:
https://gateway.example/v1/responses

This caused 404 Not Found failures for gateways mounted under a prefixed base path, even when model discovery still worked.

Closes #2711.

Testing

  • cargo test -p forge_repo openai_responses

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 27, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ amitksingh1490
❌ liyang


liyang seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@amitksingh1490 amitksingh1490 enabled auto-merge (squash) March 27, 2026 10:21
@amitksingh1490 amitksingh1490 merged commit 3ea8f23 into antinomyhq:main Mar 27, 2026
8 of 9 checks passed
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.

[Bug]: openai_responses_compatible rewrites full responses endpoints to /v1/responses

3 participants