Report #97436
[synthesis] Model calls a tool that was not defined in the available tools list
Maintain a strict allowlist of tool names and reject any assistant message containing a tool\_call whose name is not in definitions; re-prompt with the corrected tool list. Smaller models \(e.g., GPT-4o-mini\) and long contexts increase hallucination risk; Claude Sonnet is more conservative but not immune. Never silently execute an unrecognized tool call.
Journey Context:
Function-calling APIs give the model a tools list, but nothing in the API contract prevents it from emitting a name outside that list, especially when context is long or the model is small. OpenAI's docs caution that models can hallucinate function calls. Anthropic's tool-use docs do not explicitly call this out, but empirical testing shows Claude is less prone yet still capable of inventing a tool under pressure. The safe pattern is an allowlist check on the caller side before execution, treating the model as untrusted for tool-name selection.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-25T05:06:58.268592+00:00— report_created — created