Repository navigation
fix(v2): pin strict:false on function tools that omit it - #295
Conversation
The Codex backend reads an omitted strict flag as strict-mode structured output: every declared schema property becomes required, so the model fabricates values for optional args like the task tool's sessionID and fresh subagent calls die with "Subagent session not found". Closes #293
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 39 minutes. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to No actionable merge-blocking risk is identified; the change is mergeable after normal checks. Pre-merge checks |
|
|
Shipping verdict: PASS — verified independently against head 1c3c3a5 with CI green and no unresolved threads. |
Summary
strict:falseonto function tools that don't declarestrict, before@ai-sdk/openaiserializes them into the Responses request body. Explicitstrictvalues are preserved.strictwhen a tool declares it, and the Codex backend treats an omitted flag as strict-mode structured output: every declared schema property becomes required. OpenCode'stasktool markssessionIDoptional, so the model fabricates one and fresh subagent calls die withSubagent session not found. Reported against OpenCode 2.0.24 + plugin 6.28.0; the reporter verified a localstrict:falsepatch restores subagent round-trips.Testing
npm run lintnpm run buildnpm run typechecknpm testnpm test -- test/doc-parity.test.tsNot applicable
Before: new
it.each(doGenerate, doStream)case fails — the captured Responses body serializestaskwith nostrictfield:strict:falseon the unmarked tool and keepsstrict:trueon an explicitly-strict tool:Note on
npm test: this Windows dev box shows 25 pre-existing failures in storage/paths/installer/stress suites (POSIX mode bits, FIFOs,ADMINI~18.3 realpath, fsync/lock semantics). Reproduced identically on cleanmain— unrelated to this diff. The touched suite is fully green.Docs and Governance Checklist
docs/getting-started.mdupdated (if onboarding flow changed)docs/tools-and-cli.mdupdated (if thecodex-*tool or CLI surface changed)docs/configuration.md/docs/development/CONFIG_FIELDS.mdupdated (if config keys or env vars changed)docs/upgrade.mdupdated (if migration or rename behavior changed)SECURITY.mdandCONTRIBUTING.mdreviewed for alignmentNo docs touched — internal request-shaping fix, no user-visible surface change beyond the bug being gone.
Compliance Confirmation
Notes
Merge Danger
Door: two-way — a one-line default inside the existing options transform; revert restores prior behavior.
Blast Radius: V2 function-tool serialization only. V1 path untouched; tools that explicitly set
strictkeep their value; provider-defined tools are passed through unmodified.Summary by CodeRabbit
note: greptile review for oc-chatgpt-multi-auth. cite files like
lib/foo.ts:123. confirm regression tests + windows concurrency/token redaction coverage.
Confidence Score: 5/5
the pr appears safe to merge; the previous coverage gap is addressed.Summary
the v2 adapter adds
strict:falseto function tools that omit it. explicit values stay unchanged, and provider tools pass through.Reviews (2) · Last reviewed commit: "test(v2): cover explicit strict:false an..." · Reviewed by Greptile