Do I still need this classifier if my model's structured output mode is already on?

Usually, yes. A model’s structured output or function-calling mode makes a schema violation less likely, it doesn’t make one impossible. That guarantee is enforced upstream of your code, by the model provider, and it isn’t available or reliable on every call site in a larger system; if it’s ever misconfigured, absent on a fallback path, or simply not supported for one call site’s setup, nothing else in the pipeline notices until something downstream breaks on a field that isn’t there.

malformed_output doesn’t care what generated the output or what mode was on when it did. It captures the schema the call site declared and validates every response against it, on every trace, regardless of upstream guarantees. That makes it a backstop, not a replacement: a well-configured structured-output mode should mean the classifier rarely fires, and if it starts firing on a call site that’s supposed to be covered, that’s itself worth looking at.

keep reading

More on this.

Send us the traces you already emit.