LLM ROUTING

Use OpenRouter require_parameters to make feature support explicit

In this article
THE QUICK TAKE

Requiring parameter support narrows eligible providers; it does not prove the semantic correctness of the generated result or create support in an incapable model.

A parameter that an application treats as mandatory should not be casually ignored along a fallback route. OpenRouter’s provider-selection documentation includes require_parameters for requests that need support for their supplied parameters. The distinction matters when a shared API exposes options that are not implemented identically by every endpoint behind a model.

Identify the truly required feature

For a hypothetical invoice extractor, a JSON Schema may be necessary because the next service expects a specific object shape. A stylistic sampling preference may be less important. Separate those needs before choosing a route. An optional preference should not unnecessarily remove useful capacity, while a mandatory output contract should not be treated as a suggestion merely because the endpoint accepts the field syntactically.

Use the provider eligibility control

The documented raw request field is provider.require_parameters. Enabling it restricts routing to providers that support the parameters supplied in the request. Use the field shape for the chosen HTTP API; an SDK may expose a differently styled property name. The application should consult current capability metadata rather than maintaining a permanent claim that a particular provider supports every parameter.

Distinguish model support from provider support

A model must also be suitable for the feature. Provider eligibility cannot turn a text-only model into an image-understanding system or make every model enforce a strict schema. For the invoice extractor, inspect the model’s supported inputs and structured-output capability, then constrain eligible provider routes. These checks address different layers and should remain distinct in a deployment’s compatibility record.

Understand fallback tradeoffs

A stricter eligibility pool can reduce the routes available during an outage or capacity shortage. That is a consequence of preserving the contract, not automatically a routing defect. Decide how the application reports an unavailable compatible route. Silently dropping the required schema to obtain any answer changes the product’s behavior and should not happen as an undocumented fallback behind a parser that expects structured data.

Validate the result after routing

Even a supported schema does not establish that the extracted invoice amount matches the source. Parse the actual completed output, validate its shape and check domain requirements. Distinguish refusal, truncation and execution errors from a valid invoice object. The complete workflow combines capability discovery, eligible routing and result validation, allowing the application to explain which layer failed without pretending that one provider flag guarantees correctness.

Documentation and further study

Related engineering guides: Structured output through OpenRouter: when to use a JSON schema; OpenRouter provider routing: the difference between only and order.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles