Skip to content

fix(pi): make ftown tool schemas provider-compatible - #60

Merged
fkesheh merged 1 commit into
mainfrom
fix/pi-provider-tool-schemas
Aug 9, 2026
Merged

fix(pi): make ftown tool schemas provider-compatible#60
fkesheh merged 1 commit into
mainfrom
fix/pi-provider-tool-schemas

Conversation

@fkesheh

@fkesheh fkesheh commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Root cause

The multi-operation Pi tools registered root-level anyOf schemas. The existing tests used a permissive registerTool mock, so they never exercised provider schema validation. OpenAI requires function parameters to have a root type: "object" and rejects root combinators.

Fix

  • flatten all five ftown tool schemas to provider-compatible object roots
  • use typed string enums for operation and other enum fields
  • preserve operation-specific required fields with execution-time validation before any bridge request
  • flatten the interval/cron schedule schema for broader provider compatibility
  • bump ftown-bridge to 0.19.9
  • add the proof-based investigation and update presubmit evidence

Verification

  • reproduced the original 0.19.8 failure with Pi 0.83.0 and OpenAI gpt-4.1-mini
  • ran the corrected extension through native Pi with all five ftown tools enabled: OK
  • focused extension tests: 14 passed
  • full bridge suite: 571 passed, 0 failed
  • TypeScript build passed
  • package dry run produced ftown-bridge-0.19.9.tgz

The regression test now rejects any ftown tool without a root object schema or with a forbidden root combinator.

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.
@vercel

vercel Bot commented Aug 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ftown Ready Ready Preview Aug 9, 2026 9:07pm

Request Review

@fkesheh
fkesheh merged commit 0cea112 into main Aug 9, 2026
6 checks passed
@fkesheh
fkesheh deleted the fix/pi-provider-tool-schemas branch August 9, 2026 22:30
@fkesheh

fkesheh commented Aug 9, 2026

Copy link
Copy Markdown
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 deepseek/deepseek-v4-flash and all five ftown tools enabled; it returned OK with exit code 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant