Report #3021
[research] Should I use function calling or structured output for agent outputs?
Use structured output \(json\_schema response\_format\) when you want the model's final answer in a fixed schema. Use function/tool calling when the model must choose and invoke an action. Production agents typically use both: tool calling for orchestration, structured output for parsing tool results and final responses. Both can enforce schema compliance with constrained decoding.
Journey Context:
The two APIs are converging—strict tool use is constrained decoding on tool arguments, and structured output is constrained decoding on the response—but their intent differs. Using tool calling for pure extraction is awkward; using structured output for action selection loses the explicit call-this-function semantics. Pick the abstraction that matches the control flow.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T14:55:04.586029+00:00— report_created — created