What shipped

"Constraint Tax in Open-Weight LLMs: An Empirical Study of Tool Calling Suppression Under Structured Output Constraints" (arXiv:2606.25605) investigates a production failure the author first hit in deployment: an open-weight agent with both tool calling and JSON Schema output enabled stopped invoking tools entirely, and only on the schema toggle. The paper defines this as Tool Suppression and measures it with Tool Invocation Rate (TIR) and Suppression Rate (SR = 1 - TIRconstrained / TIRbaseline).

The experiments ran three conditions: T1 (tools on, schema off), T2 (tools on, schema on), T3 (tools off, schema on). Seven open-weight models were tested across SGLang and vLLM: Qwen3.6-35B-A3B, Qwen3.5-122B-A10B, GPT-OSS-20B, Nemotron 3 Super, Qwen3.5-397B-A17B, and Qwen3-VL-235B-Thinking. Under T1 every model invoked tools at 100% TIR. Under T2 every open-weight model's TIR dropped to 0, with suppression rate 100%. Under T3 schema compliance stayed high (mostly 100%, 80% for Qwen3.6 on vLLM). The closed-source reference, GPT-5.4-mini, held 100% TIR under all three conditions.

The root cause is mechanical, not behavioral. The author traced the SGLang 0.5.9 stack from the responseformat parameter through xgrammar.compilegrammar() to the vocabulary bitmask, where logits with bit 0 are set to negative infinity. Inspecting the FSM states for the JSON Schema in the T2 condition showed that token < (the first character of Qwen's XML-style <toolcall> format), <toolcall>, </tool_call>, and websearch are unreachable in every generation state. The tool-call syntax cannot be produced because the grammar forbids the characters it starts with. The penalty is exact: tool capabilities that work in isolation become unreachable by construction when both constraints are on.

Beyond the token-exclusion mechanism, the paper proposes the Constraint Priority Inversion (CPI) hypothesis as a behavioral interpretation: schema satisfaction dominates action selection under multiple simultaneous constraints. The author is explicit that CPI is a hypothesis consistent with the evidence, not a verified internal mechanism. A taxonomy (TS-A through TS-E) classifies suppression patterns by tool awareness, execution, and fallback content strategy.

The mitigation is Transparent Two-Pass Execution: decouple tool execution from schema-constrained response generation (run the tool-calling pass without the schema constraint, then apply the schema-constrained pass for the final response). Per the abstract, this restored tool invocation while preserving structured-output guarantees, without model retraining. Code, data, and docs are promised at github.com/Fzsama/Constrain-Tax-26-06.git.

Why it matters

The practical danger of this failure is its shape. The agent does not crash; it produces perfectly schema-compliant JSON containing an answer hallucinated from its parameters. Every downstream check passes. A monitoring dashboard shows valid format and zero tool calls, which reads like a well-behaved model choosing not to browse. Teams can ship this regression for weeks if their evals measure output validity rather than tool execution.

It also reframes a common design decision. Enabling responseformat with jsonschema on an OpenAI-compatible endpoint feels like a reliability improvement, and for text-only generation it is. In an agent loop it can be the single change that deletes the tool layer. The fact that the closed reference model was unaffected while all seven open-weight models suppressed completely suggests the behavior lives in the interaction between grammar masking and XML-style tool syntax, not in model competence.

The CPI framing matters for how teams debug the subtler cases where token exclusion is partial. When suppression does not reach 100%, the mask explanation alone will not cover it, and the two-pass split still applies: anything the schema pass can starve, the tool pass should never have needed.

Adoption / Practical steps

  1. Add a tool-execution regression test to any agent that uses grammar-constrained output: run one task with a known required tool, tools on and schema on, and assert TIR. A test that only checks schema validity will pass through this bug unchanged.
  2. If you see tool calls vanish after enabling responseformat or guidedjson, suspect the grammar mask before tuning prompts. Log which tokens the constraint compiles into, and check whether your model's tool-call syntax (especially XML-style tags) survives the mask.
  3. Implement the two-pass split in the agent loop: let the model decide and issue tool calls without the schema constraint active, then run the schema-constrained generation once, on the final synthesis step, with tool results already in context.
  4. Prefer API-layer format guidance or post-hoc schema validation over grammar masking during execution steps; reserve hard constrained decoding for the final response where no further tool tokens are needed.

References