mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-21 19:15:47 +00:00
OpenAI removed the /backend-api/responses alias on chatgpt.com server-side.
The OpenAI SDK appends /responses to the configured baseUrl, so OpenClaw's
current baseUrl ("https://chatgpt.com/backend-api") now resolves to
/backend-api/responses and hits a Cloudflare HTML 403 block page. The
provider's 403+HTML error classifier then surfaces this as an auth-scope
failure, triggering fruitless OAuth re-login loops for every GPT-5.4
sub-agent call.
- Point OPENAI_CODEX_BASE_URL at https://chatgpt.com/backend-api/codex
(both the catalog constant and the sibling local constant in the provider).
- Extend isOpenAICodexBaseUrl to accept the new /codex segment while keeping
the legacy path recognized so pre-existing user configs and persisted
model metadata still round-trip through the normalizer correctly.
- Add positive-case test coverage for the new base URL; update existing
normalization tests whose expected canonical output now includes /codex.
Verified with live curl using the exact OAuth access token stored by
OpenClaw: the /codex/responses path returns HTTP 200 with streaming SSE,
while the old /responses alias returns HTTP 403 HTML regardless of auth
headers. Scoped tests (base-url, openai-codex-provider, transport-policy,
openai-provider, index) pass; pnpm tsgo and pnpm build are clean.
|
||
|---|---|---|
| .. | ||
| test-support | ||
| api.ts | ||
| base-url.test.ts | ||
| base-url.ts | ||
| cli-backend.ts | ||
| default-models.test.ts | ||
| default-models.ts | ||
| embedding-batch.ts | ||
| embedding-provider.ts | ||
| image-generation-provider.test.ts | ||
| image-generation-provider.ts | ||
| index.test.ts | ||
| index.ts | ||
| media-understanding-provider.test.ts | ||
| media-understanding-provider.ts | ||
| memory-embedding-adapter.ts | ||
| openai-codex-auth-identity.test.ts | ||
| openai-codex-auth-identity.ts | ||
| openai-codex-catalog.ts | ||
| openai-codex-cli-auth.test.ts | ||
| openai-codex-cli-auth.ts | ||
| openai-codex-cli-bridge.test.ts | ||
| openai-codex-cli-bridge.ts | ||
| openai-codex-provider.runtime.ts | ||
| openai-codex-provider.test.ts | ||
| openai-codex-provider.ts | ||
| openai-codex-shared.ts | ||
| openai-provider.live.test.ts | ||
| openai-provider.test.ts | ||
| openai-provider.ts | ||
| openai.live.test.ts | ||
| openclaw.plugin.json | ||
| package.json | ||
| plugin-registration.contract.test.ts | ||
| prompt-overlay.ts | ||
| provider-auth.contract.test.ts | ||
| provider-catalog.contract.test.ts | ||
| provider-contract-api.ts | ||
| provider-policy-api.ts | ||
| provider-runtime.contract.test.ts | ||
| realtime-provider-shared.ts | ||
| realtime-transcription-provider.test.ts | ||
| realtime-transcription-provider.ts | ||
| realtime-voice-provider.test.ts | ||
| realtime-voice-provider.ts | ||
| register.runtime.ts | ||
| replay-policy.ts | ||
| setup-api.ts | ||
| shared.ts | ||
| speech-provider.test.ts | ||
| speech-provider.ts | ||
| test-api.ts | ||
| transport-policy.test.ts | ||
| transport-policy.ts | ||
| tsconfig.json | ||
| tts.test.ts | ||
| tts.ts | ||
| video-generation-provider.test.ts | ||
| video-generation-provider.ts | ||