PulseAugur
EN
LIVE 16:43:24

Anthropic API bug causes contradictory outputs with structured generation

A bug in Anthropic's Messages API, specifically when using structured generation with `tools[].strict = true`, causes the model to output contradictory information. When a tool's `input_schema` references a subschema using `"$ref"`, the constrained decoder can produce outputs that conflict with the model's own reasoning within the same tool call, without any error indication. A user provided a GitHub repository to reproduce the issue and suggested inlining subschemas as a fix, also recommending refunds for affected customers due to the corrupted context. AI

IMPACT This bug could lead to unreliable outputs for applications relying on Anthropic's structured generation, potentially impacting data integrity and user trust.

RANK_REASON Bug report about a specific feature in a commercial API.

Read on r/Anthropic →

AI-generated summary · Google Gemini · from 1 sources. How we write summaries →

Anthropic API bug causes contradictory outputs with structured generation

COVERAGE [1]

  1. r/Anthropic TIER_1 English(EN) · /u/Nearby_Yam286 ·

    Anthropic Structured Generation broken with $ref when strict=true

    <!-- SC_OFF --><div class="md"><p>Anthropic's Messages API, <code>tools[].strict = true</code>. When a tool's <code>input_schema</code> puts a subschema behind <code>{&quot;$ref&quot;: &quot;#/$defs/…&quot;}</code>, the constrained decoder emits values that contradict the model's…