Example Usage
import { DecisionsRequest } from "@openrouter/sdk/models";
let value: DecisionsRequest = {
model: "Fiesta",
questions: {},
state: {
"key": "Virginia",
},
};
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
model | string | :heavy_check_mark: | N/A | |
provider | models.ProviderPreferences | :heavy_minus_sign: | N/A | { “allow_fallbacks”: true } |
questions | Record<string, models.Questions> | :heavy_check_mark: | N/A | |
sessionId | string | :heavy_minus_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. | session-1234 |
state | models.State | :heavy_check_mark: | The content to evaluate: a plain string, or a JSON object or array of related context. | |
trace | models.TraceConfig | :heavy_minus_sign: | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | { “trace_id”: “trace-abc123”, “trace_name”: “my-app-trace” } |
user | string | :heavy_minus_sign: | N/A |