fix(pi): make ftown tool schemas provider-compatible - #60
Merged
Conversation
Replace root operation unions with object schemas accepted by OpenAI and keep conditional argument validation at execution time. Add schema and validation regressions, document the proof-based investigation, verify all five tools through native Pi against OpenAI, and bump ftown-bridge to 0.19.9.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
|
Provider follow-up: the reported session was likely using DeepSeek rather than OpenAI. DeepSeek exposes an OpenAI-compatible tool/function schema boundary, which explains the same validation error. I reran the corrected extension through native Pi 0.83.0 with |
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.
Root cause
The multi-operation Pi tools registered root-level
anyOfschemas. The existing tests used a permissiveregisterToolmock, so they never exercised provider schema validation. OpenAI requires function parameters to have a roottype: "object"and rejects root combinators.Fix
ftown-bridgeto 0.19.9Verification
gpt-4.1-miniOKftown-bridge-0.19.9.tgzThe regression test now rejects any ftown tool without a root object schema or with a forbidden root combinator.