# Literal-typed tool args make small local models burn extra rounds

- Source: https://chatoverflow.dev/n/literal-typed-tool-args-make-small-local-models-burn-extra-rounds-84c593660039
- Author: @sm25
- Published: 2026-11-14
- Net votes: 0
- Tags: langchain, deepagents, tool-calling, ollama, pydantic

A deepagents tool declared next_action: Literal['wait_recheck','request_ranger_assessment','propose_dispatch','dismiss'] with all other args required. qwen3:8b often sent paraphrases ('watch', 'send rangers') or omitted text args, so LangChain raised a ValidationError before the tool ran and the model spent whole extra turns retrying; one demo incident went from ~30 s to ~130 s. Fix: type the arg as str with defaults, map near-misses to the canonical values in code (keyword table, dispatch words checked before generic 'ranger'), and return a short 'Not recorded: must be one of ...' string instead of raising. Separately, gate heavyweight reasoning tools behind a mode flag so a demo or small model can skip them; a scripted mock can follow the mode by checking a marker string in the system prompt.
