Skip to content

fix: treat empty baseUrl as non-direct for OpenAI Responses#16930

Closed
weiguangli-io wants to merge 1 commit intoopenclaw:mainfrom
weiguangli-io:codex/openclaw-fix-empty-baseurl-store-gate
Closed

fix: treat empty baseUrl as non-direct for OpenAI Responses#16930
weiguangli-io wants to merge 1 commit intoopenclaw:mainfrom
weiguangli-io:codex/openclaw-fix-empty-baseurl-store-gate

Conversation

@weiguangli-io
Copy link
Contributor

@weiguangli-io weiguangli-io commented Feb 15, 2026

Summary

Fixes #16914.

isDirectOpenAIBaseUrl() currently treats empty/falsy baseUrl as direct OpenAI, which makes the Responses wrapper force payload.store = true.

For models routed through non-direct providers with empty baseUrl metadata (including the reported openai-codex/gpt-5.3-codex path), this is incorrect and triggers upstream errors.

This PR changes empty baseUrl handling to return false (not direct OpenAI).

Changes

  • src/agents/pi-embedded-runner/extra-params.ts
    • isDirectOpenAIBaseUrl("" | missing) now returns false.
  • src/agents/pi-embedded-runner-extraparams.e2e.test.ts
    • added regression test that verifies empty baseUrl does not force store=true.

Testing

  • pnpm exec vitest run --config vitest.e2e.config.ts src/agents/pi-embedded-runner-extraparams.e2e.test.ts

AI-assisted

AI-assisted: yes. I manually reviewed and validated the final patch and tests.

Greptile Summary

Fixes a bug where isDirectOpenAIBaseUrl() treated empty/falsy baseUrl as direct OpenAI, causing the Responses API wrapper to force payload.store = true for models routed through non-direct providers (e.g., openai-codex/gpt-5.3-codex paths with empty baseUrl metadata). The fix changes the empty baseUrl case to return false, so only explicitly recognized OpenAI URLs (api.openai.com, chatgpt.com) trigger the store=true override.

  • src/agents/pi-embedded-runner/extra-params.ts: One-line change from return true to return false in the early-return guard of isDirectOpenAIBaseUrl. Models with explicit direct OpenAI baseUrl values are unaffected.
  • src/agents/pi-embedded-runner-extraparams.e2e.test.ts: Adds a regression test verifying that empty baseUrl does not force store=true.
  • .github/workflows/formal-conformance.yml: Adds continue-on-error: true to the PR comment step, preventing CI failure when the workflow lacks permissions to post comments (e.g., fork PRs).

Confidence Score: 5/5

  • This PR is safe to merge — it's a minimal, well-scoped bug fix with proper test coverage.
  • The change is a single-line fix (return truereturn false) that corrects incorrect behavior for empty baseUrl values. The function is only called from one place (shouldForceResponsesStore), the change is covered by a new regression test, and the existing test suite confirms that direct OpenAI URLs still correctly force store=true. The CI workflow change is similarly low-risk — continue-on-error: true only affects an informational comment step.
  • No files require special attention.

Last reviewed commit: 04d8569

(2/5) Greptile learns from your feedback when you react with thumbs up/down!

@openclaw-barnacle openclaw-barnacle bot added agents Agent runtime and tooling size: XS labels Feb 15, 2026
@weiguangli-io
Copy link
Contributor Author

Quick note on the current red check: formal_conformance failed because the workflow could not post its informational comment on a fork PR (Resource not accessible by integration, 403).

The code/test checks are green on this branch, and this failure appears to be workflow permission-related rather than a functional regression.

@weiguangli-io
Copy link
Contributor Author

Pushed a small CI-only follow-up to address the red formal_conformance check.

Root cause was not functional code regression: the workflow’s informational PR comment step fails with 403 on fork PRs (Resource not accessible by integration), which marked the job red.

Change made:

  • .github/workflows/formal-conformance.yml
  • added continue-on-error: true on the informational comment step so permission-denied comment attempts do not fail the job.

This keeps drift detection/reporting behavior while preventing false-red CI on forks.

@weiguangli-io
Copy link
Contributor Author

Quick check update on the current red CI:

  • checks (node, test, pnpm canvas:a2ui:bundle && pnpm test) failed on extensions/mattermost/src/mattermost/monitor-websocket.test.ts with a timeout in dispatches reaction events to the reaction handler.
  • The same run also showed Node OOM traces during the large test matrix (heap out of memory), which points to an environment/runtime instability rather than the PR diff.
  • checks-windows logs show a full test pass summary (335 passed, 1 skipped), but the overall job still exited non-zero from the aggregated run.

This PR only changes:

  • src/agents/pi-embedded-runner/extra-params.ts
  • src/agents/pi-embedded-runner-extraparams.e2e.test.ts

Given the failure signatures and touched paths, this looks unrelated to the PR changes. Could a maintainer rerun the failed checks once?

@weiguangli-io
Copy link
Contributor Author

Quick follow-up data point:

I ran the previously failing Mattermost test locally on this branch:

pnpm vitest run extensions/mattermost/src/mattermost/monitor-websocket.test.ts

Result: pass (2 passed).

So the current CI red status still looks consistent with a runner/environment instability in that large matrix run rather than a deterministic regression in this PR.

@weiguangli-io weiguangli-io force-pushed the codex/openclaw-fix-empty-baseurl-store-gate branch from 7dfbfd2 to f947032 Compare February 17, 2026 09:00
steipete added a commit that referenced this pull request Feb 27, 2026
, #22441, #25088)

Landed from contributor PRs #16930, #22441, and #25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
@steipete
Copy link
Contributor

Landed on main as 8da3a9a92d9c2c6db6fa6caa881e9310d1792e93.

Rewrite summary:

SHA notes:

  • Original PR commit: f947032b8dc7d5e69555e2c09211572999f44b42
  • Landed commit: 8da3a9a92d9c2c6db6fa6caa881e9310d1792e93

Thanks @OiPunk.

@steipete steipete closed this Feb 27, 2026
execute008 pushed a commit to execute008/openclaw that referenced this pull request Feb 27, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
r4jiv007 pushed a commit to r4jiv007/openclaw that referenced this pull request Feb 28, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
xiexikang pushed a commit to cclawd007/cclawd that referenced this pull request Feb 28, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
mylukin pushed a commit to mylukin/openclaw that referenced this pull request Feb 28, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
(cherry picked from commit c38be8f)
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
(cherry picked from commit c38be8f)
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
(cherry picked from commit c38be8f)
vincentkoc pushed a commit to Sid-Qin/openclaw that referenced this pull request Feb 28, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
vincentkoc pushed a commit to rylena/rylen-openclaw that referenced this pull request Feb 28, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
newtontech pushed a commit to newtontech/openclaw-fork that referenced this pull request Feb 28, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Mar 1, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Mar 1, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
steipete added a commit to Sid-Qin/openclaw that referenced this pull request Mar 2, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
safzanpirani pushed a commit to safzanpirani/clawdbot that referenced this pull request Mar 2, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
steipete added a commit to Sid-Qin/openclaw that referenced this pull request Mar 2, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
venjiang pushed a commit to venjiang/openclaw that referenced this pull request Mar 2, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
robertchang-ga pushed a commit to robertchang-ga/openclaw that referenced this pull request Mar 2, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
dorgonman pushed a commit to kanohorizonia/openclaw that referenced this pull request Mar 3, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
sachinkundu pushed a commit to sachinkundu/openclaw that referenced this pull request Mar 6, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <codingpunk@gmail.com>
Co-authored-by: EdwardWu7 <wuzhiyuan7@gmail.com>
Co-authored-by: MoerAI <friendnt@g.skku.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

openai-codex/gpt-5.3-codex fails with "Store must be set to false" - isDirectOpenAIBaseUrl() treats empty baseUrl as direct OpenAI

2 participants