Completions.ToolTool definition for function calling and OpenRouter server-side tools. Server tools (web search, web fetch, datetime, image generation) are executed by OpenRouter on your behalf and their results fed back to the model — no local function dispatch required.
module Function : sig ... endmodule Web_search : sig ... endmodule Web_fetch : sig ... endmodule Image_generation : sig ... endmodule Search_models : sig ... endtype t = | Function of Function.t| Web_search of Web_search.t| Web_fetch of Web_fetch.t| Datetime| Image_generation of Image_generation.t| Search_models of Search_models.tval function_ :
name:string ->
?description:string ->
?parameters:Jsonaf.t ->
?strict:bool ->
unit ->
tval web_search :
?engine:string ->
?max_results:int ->
?max_total_results:int ->
?search_context_size:string ->
?allowed_domains:string list ->
?blocked_domains:string list ->
unit ->
tval web_fetch :
?engine:string ->
?max_uses:int ->
?max_content_tokens:int ->
?allowed_domains:string list ->
?blocked_domains:string list ->
unit ->
tval datetime : tval image_generation :
?model:string ->
?prompt:string ->
?parameters:(string * Jsonaf.t) list ->
unit ->
tval search_models : ?max_results:int -> unit -> t