﻿# Use OpenRouter require_parameters to make feature support explicit

Use OpenRouter require_parameters to constrain provider eligibility when structured output or another supported request parameter is mandatory for an application.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/learn-openrouter-required-parameters/
Language: en

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

- [Provider Routing - Smart Multi-Provider Request Management](https://openrouter.ai/docs/guides/routing/provider-selection).

- [OpenRouter API Reference - Complete Documentation](https://openrouter.ai/docs/api-reference/overview).

- [Tool & Function Calling - Use Tools with OpenRouter](https://openrouter.ai/docs/guides/features/tool-calling).

Related engineering guides: [Structured output through OpenRouter: when to use a JSON schema](/journal/openrouter-json-schema/); [OpenRouter provider routing: the difference between only and order](/journal/openrouter-provider-only-order/).
