Repository navigation
fix(runtime): explicitly disable Responses strict mode when unsupported - #2454
Merged
vastsa merged 2 commits intoNov 20, 2026
Merged
Conversation
Custom Responses adapters disable strict sampling by default, but the shared converter omitted strict instead of explicitly opting out. This can let endpoints compile ordinary tool schemas as strict and reject constraints such as scheduled weekday uniqueness. Preserve schemas and existing strict-capable behavior while emitting strict:false for disabled compatibility. Cover current and replayed tools through provider requests and a sidecar model-switch workflow. Refs vastsa#2213
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary / 概要
Custom Responses adapters default
supportsStrictModetofalse, butconvertResponsesToolsomitted thestrictfield in that branch. An endpoint that defaults an omitted field to strict schema compilation can reject the unchanged scheduled-tooluniqueItemsconstraint before a turn starts.Extend the existing pi-ai 1.5.2 dependency patch to emit
strict: falseexplicitly when strict support is disabled. The shared converter covers current function declarations and historicaladditional_tools/tool_search_outputdeclarations. Preserve canonical schemas and local argument validation, strict-capable sampling, Codex'sstrict: null, and custom grammar tools. The lockfile changes only the generated pi-ai patch hash.This differs from closed #2214: no keyword stripping or provider wrapper is introduced. Its successful
strict: false/nullrequests are consistent with this change; the affected branch omittedstrictentirely.Reproduction and local acceptance
An installed Windows PI-Desktop 0.23.0 custom Responses route produced this real error twice after the upgrade:
The installed adapter and converter still contained the omission. The equivalent one-expression local patch was verified, the application was completely restarted, and the user confirmed normal operation recovered. The new process and installed bytes were independently checked. The application log did not retain a provider request ID or full outbound request; recovery is user-confirmed, not a claim of independent raw gateway trace capture or universal OpenAI/Azure acceptance.
Verification
strict: falsewas absent from current and replayed declarations; all 9 passed after the patch.pnpm.cjsentry.ScheduledTaskUpdate, execute exactly one fixture Host update, and return the final confirmation (4 HTTP requests, 1 Host tool call). No real scheduled task is executed by this test.An independent read-only review found no defects in the final six-file change.
The existing
scripts/pi-patch-hash.test.mjsintegration fixtures hit WindowsEPERMwhen creating directory symlinks; its two pure hash-parser cases and both audits against the actual installed dependencies pass. Full desktop/Electron/Rust builds were not run for this dependency converter fix. No paid provider call was made by the automated tests.Requirement link / 需求关联