Module Ai_provider.ModeSource

Generation mode -- controls the shape of model output.

Sourcetype json_schema = {
  1. name : string;
  2. schema : Yojson.Basic.t;
}
Sourcetype t =
  1. | Regular
  2. | Object_json of json_schema option
  3. | Object_tool of {
    1. tool_name : string;
    2. schema : json_schema;
    }
Sourceval fallback_json_tool_name : string

Tool name used by providers that don't natively enforce JSON Schema: they synthesise a tool by this name with the caller's schema as inputSchema, force tool_choice to it, and decode the result from the tool_use args. Matches the upstream Vercel AI SDK convention.