Function: createAutoToolCallParser()
ts
function createAutoToolCallParser(
parsers?: Partial<
Record<Exclude<ToolCallParserName, "auto" | "none">, ToolCallParserFn>
>,
order?: readonly (
| "gemma"
| "hermes"
| "gpt_oss"
| "pythonic"
| "bare_pythonic"
| "loose_keyed"
| "llama3_json"
| "mistral"
| "qwen3_coder"
| "phi"
)[],
): ToolCallParserFn;Defined in: src/batteries/llm/chat_common/tool_parsers.ts:1092
Compose an 'auto' parser: run each family parser in order until one returns a non-empty calls array; that result wins. Returns no-match if none claim the text.
Parameters
| Parameter | Type | Default value |
|---|---|---|
parsers | Partial<Record<Exclude<ToolCallParserName, "auto" | "none">, ToolCallParserFn>> | BUNDLED_TOOL_CALL_PARSERS |
order | readonly ( | "gemma" | "hermes" | "gpt_oss" | "pythonic" | "bare_pythonic" | "loose_keyed" | "llama3_json" | "mistral" | "qwen3_coder" | "phi")[] | DEFAULT_TOOL_CALL_PARSER_ORDER |