Skip to content

F2 Format break (JSON, schema)

The answer was meant to be JSON (or match a schema, or call a tool with valid arguments) and is not.

How counterfix finds it

Live, free: parses the answer (code fences and <think> blocks removed), validates it against your schema, and checks tool-call arguments against the tool's schema.

Fixes it tries

In this order (a model profile can reorder them). Each one is kept only if it passes 2 of 3 re-runs.

Intervention Change
json_only_prompt Ask for bare JSON at the end of the prompt
json_mode Turn on JSON mode (response_format json_object)

When no fix verifies

  • Use a model with structured outputs
  • Repair the JSON in code