#16930: fix: treat empty baseUrl as non-direct for OpenAI Responses
agents
size: XS
Cluster:
Model Input and Streaming Fixes
## 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_comment -->
<h3>Greptile Summary</h3>
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).
<h3>Confidence Score: 5/5</h3>
- 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 true` → `return 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.
<sub>Last reviewed commit: 04d8569</sub>
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#22441: fix: force store for openai-responses providers
by EdwardWu7 · 2026-02-21
81.6%
#2353: fix: ensure api field is set for inline provider models
by sbknana · 2026-01-26
75.5%
#6673: fix: preserve allowAny flag in createModelSelectionState for custom...
by tenor0 · 2026-02-01
75.4%
#4534: fix: packaging and OpenAI vision format conversion
by SalimBinYousuf1 · 2026-01-30
74.7%
#18679: fix(agents): always downgrade orphaned OpenAI reasoning blocks
by battman21 · 2026-02-16
73.9%
#13229: Fix openai-codex/gpt-5.3-codex API format resolution
by trevorgordon981 · 2026-02-10
73.5%
#16766: fix(model): apply provider baseUrl/headers override to registry-fou...
by dzianisv · 2026-02-15
73.1%
#17701: fix(memory-lancedb): add gemini-embedding-001 and baseUrl support
by Phineas1500 · 2026-02-16
72.8%
#18002: fix: add Azure AI Foundry URL support for custom providers
by MisterGuy420 · 2026-02-16
72.7%
#12812: fix(transcript-policy): sanitize tool call IDs for all non-OpenAI p...
by justin-nevins · 2026-02-09
72.6%