pi-t3-tool-schema-compat0.1.0
Adapt T3 Code tool parameter schemas for strict chat-completions gateways.
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
Pi T3 Tool Schema Compat
A Pi extension for T3 Code sessions on OpenAI-compatible gateways that reject certain JSON Schema unions in tool declarations. It adapts four tool declarations immediately before sending a request. The tool implementations keep their original argument validators.
Install
Install from npm:
pi install npm:pi-t3-tool-schema-compat
Alternatively, install the GitHub version with pi install https://github.com/nightsu/pi-t3-tool-schema-compat.
In the Pi agent directory (normally ~/.pi/agent), create t3-tool-schema-compat.json and use the exact Pi provider and outgoing model IDs:
{"targets":[{"provider":"my-gateway","model":"my-model-id"}]}
Start a new Pi process or reload extensions. With no configuration the extension is inactive. Each device needs its own target configuration.
Schema changes
The three attachment tools receive simplified integer size ranges, and the upload tool receives a string MIME type. These changes preserve the accepted values of the original fields. The schedule filter exposes its operators and value types and describes their relationship in text. The gateway-facing schema consequently permits some invalid operator/value combinations. T3 still handles the original tool call and enforces its own constraints.