Documentation
¶
Overview ¶
Package jsonschema contains JSON Schema helpers shared by Genkit provider plugins.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnforceStrict ¶
EnforceStrict returns a deep copy of schema with additionalProperties: false set on every object subschema, recursing through "properties" and "items". This is the shape OpenAI and Anthropic require for strict tool schemas.
The input is not mutated. If the schema is not JSON-marshalable, the original map is returned unchanged.
func ReflectConfigSchema ¶ added in v1.12.0
ReflectConfigSchema reflects an SDK request-params struct into the JSON schema map a model advertises as its config. The provider SDKs wrap optional primitives in generic Opt types that marshal as bare values but reflect as objects, so those are mapped to their wire shapes; overrides adds SDK-specific mappings by type name (e.g. inline unions) that take precedence.
Types ¶
This section is empty.