Repository navigation
fix(coding-agent): support OpenAI tool schemas - #61
Merged
Merged
Conversation
Pepps233
approved these changes
Aug 15, 2026
Pepps233
left a comment
Contributor
There was a problem hiding this comment.
lgtm; tested with deepseek & codex auth
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
This PR fixes OpenAI Responses requests that reject
update_planandagent_actionbecause their parameter schemas useanyOfat the object root. Both tools now publish plain object schemas that remain valid after OpenAI payload conversion.Reasoning
OpenAI does not accept composition keywords at the function-parameter root, so the schemas cannot express operation unions there. Plain object properties preserve provider compatibility, while runtime validation continues to enforce the exclusive update-or-clear and message-or-interrupt contracts.
Checking the serialized OpenAI payload and every built-in schema root covers the provider boundary where the failures occurred without making a real provider request or requiring credentials.
Changes
anyOfschema with a plain object containing optionalplan,clear, andexplanationproperties.agent_actionunion with a plain object schema and preserved message and interrupt semantics in runtime validation.Testing
node ../../node_modules/vitest/dist/cli.js --run test/update-plan-tool.test.ts test/tool-schema-compat.test.ts test/suite/subagent-actions.test.tsnpm run check