fix: make all-optional tool args schemas compatible with OpenAI strict function calling#4467
Open
hanakokoizumi wants to merge 1 commit into
Open
fix: make all-optional tool args schemas compatible with OpenAI strict function calling#4467hanakokoizumi wants to merge 1 commit into
hanakokoizumi wants to merge 1 commit into
Conversation
…t function calling
Contributor
|
All contributors have signed the CLA. Thank you! ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
code-yeongyu
pushed a commit
that referenced
this pull request
May 26, 2026
code-yeongyu
requested changes
Jun 4, 2026
code-yeongyu
left a comment
Owner
There was a problem hiding this comment.
I can’t approve this while the PR still references forbidden deprecated GPT models and is DIRTY against current dev.
The PR body lists verification against github-copilot/gpt-5.2-codex. Repository policy now forbids GPT-5.2/GPT-5.3 usage and references; please update the verification note to a GPT-5.5-era model, rebase/merge current dev, and rerun the relevant tool-schema tests before requesting review again.
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
"None is not of type 'array'"— the JSON Schema serializer outputsrequired: nullinstead ofrequired: []for such tools.requiredin each of the 4 affected tools so the schema always has a validrequiredarray.Changes
background_cancel:all(boolean) promoted to required; moved beforetaskId. Callers must now explicitly passall=falsewhen cancelling by ID. UpdatedBackgroundCancelArgsinterface to match.session_list:limitpromoted to required. Pass0to mean "no limit". Updated description andSessionListArgsinterface to match.team_create:leadSessionIdpromoted to required and moved first. Pass""to use the current session. Added empty-string fallback inexecute:(leadSessionId && leadSessionId.length > 0 ? leadSessionId : undefined) ?? runtimeContext.sessionID.team_list:scopepromoted to required. Callers must now pass"user","project", or"all"explicitly. Removed?? "all"fallback fromexecutesince the value is always present.Testing
Verified by running against an OpenAI-compatible proxy (
new-api/gpt-5.5,github-copilot/gpt-5.2-codex) that previously rejected these tool schemas with theNone is not of type 'array'error. All 4 tools now pass schema validation and execute correctly.Summary by cubic
Fixes schema incompatibility with OpenAI strict function calling by ensuring tool arg schemas never have all-optional parameters. One parameter is now required in
background_cancel,session_list,team_create, andteam_list, while preserving runtime behavior via fallbacks.background_cancel:allis required. Set true to cancel all tasks; set false and providetaskIdto cancel one.session_list:limitis required. Use 0 for no limit.team_create:leadSessionIdis required. Pass "" to use the current session.team_list:scopeis required. Passuser,project, orall.Written for commit 40cb283. Summary will update on new commits. Review in cubic