Skip to content
Trending storyDeveloping

OpenRouter explains three methods for reliable structured LLM output

1 article1 sourcesince Nov 9Last article

Overview

AISummary of 1 article

OpenRouter's blog explains three ways to get structured output from an LLM: a strict JSON Schema, a forced tool call, or a decision model, with the right choice depending on what the model supports.

In a test of 24 messy support messages run on nine structured-output models plus GLM 5.3 FlashX, 209 of 216 replies matched a strict schema, while prompt-only JSON requests failed 18 times because the replies included code fences.

The method applies only when the request sets response_format to json_schema or json_object, and only on requests that are not streamed. It does not cover tool call arguments, and it cannot fix a reply that max_tokens cut off.

Written by AI from the articles below · updated Nov 10, 12:03 PM ET

Check the sources:

Article timeline

The articles in this story. Times are ET.

Nov 9
  1. OpenRouter BlogOfficial
    OpenRouter explains three ways to get reliable structured output from any LLM

    AIOpenRouter says LLM structured output can be obtained with a strict JSON Schema, a forced tool call, or a decision model, depending on the model's support. In a test of 24 messy support messages on nine structured-output models plus GLM 5.3 FlashX, 209 of 216 replies matched a strict schema, while prompt-only JSON requests failed 18 times because of code fences.

Heat Trend

Not enough continuous observations to show a trend yet.