Type Alias IGeminiSchema

Type schema info for Gemini function calling.

IGeminiSchema is a type schema info for Gemini function calling, implemented according to the official Gemini guide documentation specification.

IGeminiSchema basically follows the JSON schema definition of the OpenAPI v3.1 specification; OpenApiV3_1.IJsonSchema. Although Gemini had significant limitations in earlier versions (prior to 2025-11-05), it now supports nearly all JSON schema features including union types, reference types, and various constraint properties.

In earlier versions, Gemini blocked virtually all JSON schema specifications such as anyOf, $ref, format, maxItems, making function calling practically impossible. However, these limitations have been removed in recent updates.

IGeminiSchema provides a type definition that strictly follows the Gemini official specification.

Here is the list of how IGeminiSchema is different with the OpenAPI v3.1 JSON schema:

Compared to OpenApi.IJsonSchema, the emended JSON schema specification:

For reference, if you compose the IGeminiSchema type with the IGeminiSchema.IConfig.reference false option (default is false), only recursively named types are archived into the IGeminiSchema.IParameters.$defs, and others are escaped from the IGeminiSchema.IReference type.

Jeongho Nam - https://github.com/samchon

Specified not only by the official documentation, but also by experimental validation. Therefore, definitions may be inaccurate or change in the future. If you find wrong or outdated definitions, please report via issue.