fix: use codex-responses transport for openai-codex gpt-5.4 fallback#38736
fix: use codex-responses transport for openai-codex gpt-5.4 fallback#38736steipete merged 1 commit intoopenclaw:mainfrom
Conversation
Greptile SummaryThis PR fixes a transport misconfiguration bug where Key changes:
Confidence Score: 4/5
Last reviewed commit: 8082894 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 80828948dd
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const nextBaseUrl = | ||
| !params.model.baseUrl || isOpenAIApiBaseUrl(params.model.baseUrl) | ||
| ? OPENAI_CODEX_BASE_URL |
There was a problem hiding this comment.
Restrict Codex base URL rewrite to Codex-compatible APIs
nextBaseUrl is rewritten to https://chatgpt.com/backend-api whenever baseUrl is empty or points to api.openai.com, even if the model API is not converted to openai-codex-responses. This creates mismatched transport/base URL pairs (for example, models.providers.openai-codex.api: "openai-completions", which is allowed by the model API schema) and can route non-Codex requests to a Codex-only endpoint. The rewrite should be gated on APIs that actually use the Codex transport, not just on the base URL shape.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in commit 428c855 — gated Codex baseUrl rewrite to Codex-compatible transport only, and added regression coverage for openai-completions + api.openai.com/v1 (no rewrite).
|
fix |
428c855 to
63f82e0
Compare
|
Landed via temp rebase onto main.
Thanks @0xsline! |
… paths After openclaw#38736, openai-codex/gpt-5.4 still timed out in some paths because model discovery, media tools, and image understanding used the stale openai-responses transport instead of openai-codex-responses. Hoist normalizeResolvedProviderModel to a shared module and apply it at model discovery (Proxy wrapper on ModelRegistry), media tool resolution, and image understanding model lookup. Fixes openclaw#41282
… paths After openclaw#38736, openai-codex/gpt-5.4 still timed out in some paths because model discovery, media tools, and image understanding used the stale openai-responses transport instead of openai-codex-responses. Hoist normalizeResolvedProviderModel to a shared module and apply it at model discovery (Proxy wrapper on ModelRegistry), media tool resolution, and image understanding model lookup. Fixes openclaw#41282
… paths After openclaw#38736, openai-codex/gpt-5.4 still timed out in some paths because model discovery, media tools, and image understanding used the stale openai-responses transport instead of openai-codex-responses. Hoist normalizeResolvedProviderModel to a shared module and apply it at model discovery (Proxy wrapper on ModelRegistry), media tool resolution, and image understanding model lookup. Fixes openclaw#41282
Summary
Testing
Fixes #38706