Module Request.Reasoning

module Effort : sig ... end
type t = private {
  1. effort : Effort.t option;
  2. max_tokens : int option;
  3. exclude : bool option;
  4. enabled : bool option;
  5. summary : string option;
}

Effort and max_tokens are mutually exclusive: providers accept one but not both. Pass enabled = Some true alone to enable reasoning with provider defaults. Pass exclude = Some true to keep reasoning hidden from the response while the model still uses it internally.

val jsonaf_of_t : t -> Ppx_jsonaf_conv_lib.Jsonaf_kernel.t
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
val create : ?effort:Effort.t -> ?max_tokens:int -> ?exclude:bool -> ?enabled:bool -> ?summary:string -> unit -> t Core.Or_error.t

Validates effort and max_tokens are not both set, matching the wire contract. Returns an Or_error so the failure surfaces locally instead of as a 400.