Skip to main content

strip_unsupported_tools

Function strip_unsupported_tools 

Source
pub fn strip_unsupported_tools(body: &mut Value, ctx: &ModelContext)
Expand description

Remove tools and tool_choice when the resolved model cannot use them.

No-op for tool-capable models, for unresolved (passthrough) contexts, and for requests that carry no tools.