Report #84459
[synthesis] Tool call JSON schema validation failures when user prompt conflicts with enum constraints
Do not rely on the model to enforce enum constraints if the user prompt conflicts; implement server-side validation and return a descriptive error JSON to the model, knowing that Claude will bypass the enum to satisfy the user, while GPT-4o will map to the closest valid enum or fail.
Journey Context:
A common trap is assuming the LLM acts as a strict validator for the JSON schema. When a user requests a value outside a defined enum, Claude 3.5 prioritizes user intent and will output the invalid enum value \(breaking your parser\), whereas GPT-4o prioritizes schema adherence and will either map the request to the closest valid enum or refuse the tool call. You must enforce the schema in code, not in the model.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T00:21:07.718470+00:00— report_created — created