Schema comparison
OpenAI vs Gemini function calling schema differences
Compare strictness, supported schema subsets, nullable fields, and active-tool design for OpenAI and Gemini.
The wrappers look similar, but OpenAI strict and Gemini function declarations have different portability edges. Large or deeply nested Gemini declarations may be rejected, and unsupported keywords should not be passed through silently.
Read the schema and its provider wrapper as one contract. APITC distinguishes target requirements from portable JSON Schema, applies mechanical repairs only when intent is recoverable, and identifies transformations that can change meaning.
Diagnostic procedure
Repair the schema, then recompile.
- 01
Compile, do not rename keys
A wrapper-only conversion misses schema subset and nullability differences.
- 02
Trim active tools
Expose only tools relevant to the current turn to improve selection quality.
- 03
Keep descriptions operational
State when to call each function and what each argument means.
OpenAI optional: {"type":["string","null"]} + requiredGemini portable: {"type":"string","nullable":true}$.inputSchemaClose this objectOpenAI strict requires additionalProperties: false on every object.
$.inputSchemaRequired array is incompleteStrict mode requires every property in required. APITC will make limit nullable.
No account · no upload · no endpoint calledOpen the full tool schema compiler and operating notes →
FAQ
Before you ship
Does APITC upload my schema?
No. Parsing, diagnostics, and compilation run in your browser tab.
Is the compiled result guaranteed to preserve meaning?
Safe repairs are deterministic. When either provider cannot express a source constraint, APITC labels the transform as lossy instead of hiding it.
Protocol behavior checked against the Gemini function calling guide. Recheck your pinned provider/API version before production deployment.