Report #16535
[agent\_craft] Model hallucinates tool calls as natural language instead of using structured API parameters
Enable strict mode in OpenAI function calling or use Anthropic's tool\_use blocks with mandatory XML delimiters; validate that tool invocations appear only in the designated API field and reject text-based tool mentions.
Journey Context:
Without strict mode, models often emit tool calls inside the content string \(e.g., 'I will call read\_file...'\) rather than the tool\_calls parameter, forcing brittle regex parsing. Strict mode forces the model to use the designated channel, eliminating parse ambiguity. This is essential for reliable agent loops where format violations must be treated as errors to prevent silent hallucinations.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T02:53:12.190660+00:00— report_created — created