ModelReasoning - TypeScript SDK

ModelReasoning type definition

The TypeScript SDK and docs are currently in beta. Report issues on GitHub.

Reasoning effort configuration. Omitted for non-reasoning models and dynamic router models.

Example Usage

1import { ModelReasoning } from "@openrouter/sdk/models";
2
3let value: ModelReasoning = {
4 mandatory: false,
5};

Fields

FieldTypeRequiredDescriptionExample
defaultEffortmodels.DefaultEffortN/Amedium
defaultEnabledbooleanDefault reasoning enabled state when the client does not set reasoning.enabled.
mandatoryboolean✔️When true, reasoning cannot be disabled and effort “none” is rejected.
supportedEffortsmodels.ReasoningEffort[]Allowed reasoning effort values for this model, in descending effort order (highest first). Null means no allowlist — all gateway effort values are accepted.
supportsMaxTokensbooleanPresent and true when the model accepts reasoning.max_tokens in requests (Anthropic-style) instead of or in addition to reasoning.effort. Omitted otherwise.