Skip to content

A self-improving RLM agent for coding workflows and long-running autonomous tasks.

Rust

feat(ai): derive reasoning levels from provider metadata (#1258)

Seth Karten91977ebf065d
diff --git a/packages/agent/src/agent.ts b/packages/agent/src/agent.ts
index 49156e001a..cdef2db467 100644
--- a/packages/agent/src/agent.ts
+++ b/packages/agent/src/agent.ts
@@ -472,7 +472,7 @@ export class Agent {
let skipInitialSteeringPoll = options.skipInitialSteeringPoll === true;
return {
model: this._state.model,
- reasoning: this._state.thinkingLevel === "off" ? undefined : this._state.thinkingLevel,
+ reasoning: this._state.thinkingLevel,
serviceTier: this._state.serviceTier,
sessionId: this.sessionId,
onPayload: this.onPayload,
diff --git a/packages/agent/test/agent.test.ts b/packages/agent/test/agent.test.ts
index 4bbe248d6c..2474a203bd 100644
--- a/packages/agent/test/agent.test.ts
+++ b/packages/agent/test/agent.test.ts
@@ -80,6 +80,23 @@ describe("Agent", () => {
expect(agent.state.errorMessage).toBeUndefined();
});
+ it("passes an explicit off reasoning selection to providers", async () => {
+ let reasoning: AgentLoopConfig["reasoning"];
+ const agent = new Agent({
+ streamFn: (_model, _context, options) => {
+ reasoning = options?.reasoning;
+ const stream = new MockAssistantStream();
+ queueMicrotask(() => {
+ stream.push({ type: "done", reason: "stop", message: createAssistantMessage("ok") });
+ });
+ return stream;
+ },
+ });
+
+ await agent.prompt("hello");
+ expect(reasoning).toBe("off");
+ });
+
it("should create an agent instance with custom initial state", () => {
const customModel = getModel("openai", "gpt-4o-mini");
const agent = new Agent({
diff --git a/packages/ai/README.md b/packages/ai/README.md
index 9e45724243..a35c679302 100644
--- a/packages/ai/README.md
+++ b/packages/ai/README.md
@@ -464,7 +464,7 @@ if (model.reasoning) {
const response = await completeSimple(model, {
messages: [{ role: 'user', content: 'Solve: 2x + 5 = 13' }]
}, {
- reasoning: 'medium' // 'minimal' | 'low' | 'medium' | 'high' | 'xhigh'
+ reasoning: 'medium' // 'off' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max'
});
// Access thinking and text blocks
@@ -839,7 +839,7 @@ const response = await stream(ollamaModel, context, {
Some OpenAI-compatible servers do not understand the `developer` role used for reasoning-capable models. For those providers, set `compat.supportsDeveloperRole` to `false` so the system prompt is sent as a `system` message instead. If the server also does not support `reasoning_effort`, set `compat.supportsReasoningEffort` to `false` too.
-Use model-level `thinkingLevelMap` to describe model-specific thinking controls. Keys are Prime Agent thinking levels (`off`, `minimal`, `low`, `medium`, `high`, `xhigh`). Missing keys use provider defaults, string values are sent to the provider, and `null` marks a level unsupported.
+Use model-level `thinkingLevelMap` to describe model-specific thinking controls. Keys are Prime Agent thinking levels (`off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`). Missing keys use provider defaults, string values are sent to the provider, and `null` marks a level unsupported.
This commonly applies to Ollama, vLLM, SGLang, and similar OpenAI-compatible servers. You can set `compat` at the provider level or per model.
diff --git a/packages/ai/scripts/generate-models.ts b/packages/ai/scripts/generate-models.ts
index 27f1ac519f..b9d1b28cbe 100644
--- a/packages/ai/scripts/generate-models.ts
+++ b/packages/ai/scripts/generate-models.ts
@@ -5,6 +5,7 @@ import { homedir } from "os";
import { dirname, join } from "path";
import { fileURLToPath } from "url";
import { getAnthropicCacheCosts } from "../src/cache-pricing.js";
+import { getOpenRouterReasoningCapabilities } from "../src/openrouter-reasoning.js";
import {
CLOUDFLARE_AI_GATEWAY_ANTHROPIC_BASE_URL,
CLOUDFLARE_AI_GATEWAY_COMPAT_BASE_URL,
@@ -88,6 +89,7 @@ const DEEPSEEK_V4_THINKING_LEVEL_MAP = {
medium: null,
high: "high",
xhigh: "max",
+ max: null,
} as const;
const KIMI_K3_THINKING_LEVEL_MAP = {
@@ -324,7 +326,7 @@ function applyThinkingLevelMetadata(model: Model<any>): void {
mergeThinkingLevelMap(model, DEEPSEEK_V4_THINKING_LEVEL_MAP);
}
const kimiK3Id = model.id.toLowerCase();
- if (/^k3(-|$)/.test(kimiK3Id) || /(^|\/)kimi-k3(-|$)/.test(kimiK3Id)) {
+ if (!model.thinkingLevelMap && (/^k3(-|$)/.test(kimiK3Id) || /(^|\/)kimi-k3(-|$)/.test(kimiK3Id))) {
mergeThinkingLevelMap(model, KIMI_K3_THINKING_LEVEL_MAP);
}
if (isGoogleThinkingApi(model) && isGemini3ProModel(model.id)) {
@@ -592,6 +594,8 @@ interface PrimeInferenceOpenRouterMetadata {
maxTokens?: number;
vision: boolean;
reasoning: boolean;
+ thinkingLevelMap?: Model<"openai-completions">["thinkingLevelMap"];
+ supportsReasoningEffort?: boolean;
}
function buildPrimeInferenceOpenRouterIndex(catalog: unknown[]): Map<string, PrimeInferenceOpenRouterMetadata> {
@@ -604,6 +608,7 @@ function buildPrimeInferenceOpenRouterIndex(catalog: unknown[]): Map<string, Pri
const architecture = isRecord(item.architecture) ? item.architecture : {};
const modalities = Array.isArray(architecture.input_modalities) ? architecture.input_modalities : [];
const supportedParameters = Array.isArray(item.supported_parameters) ? item.supported_parameters : [];
+ const reasoningCapabilities = getOpenRouterReasoningCapabilities(item);
index.set(item.id.toLowerCase(), {
contextWindow: getOptionalNumber(item.context_length) ?? getOptionalNumber(topProvider.context_length),
maxTokens: getOptionalNumber(topProvider.max_completion_tokens),
@@ -612,6 +617,12 @@ function buildPrimeInferenceOpenRouterIndex(catalog: unknown[]): Map<string, Pri
// `reasoning` object over-reports (e.g. qwen3-max carries one despite
// not accepting reasoning params).
reasoning: supportedParameters.includes("reasoning"),
+ ...(reasoningCapabilities?.thinkingLevelMap
+ ? { thinkingLevelMap: reasoningCapabilities.thinkingLevelMap }
+ : {}),
+ ...(reasoningCapabilities?.supportsReasoningEffort === false
+ ? { supportsReasoningEffort: false }
+ : {}),
});
}
return index;
@@ -692,6 +703,7 @@ function createPrimeInferenceModel(
entry.maxTokens ?? override?.maxTokens ?? openRouter?.maxTokens ?? PRIME_INFERENCE_DEFAULT_MAX_TOKENS,
contextWindow,
);
+ const compat = getPrimeInferenceCompat(entry.id);
return {
id: entry.id,
...(PRIME_INFERENCE_FEATURED_MODELS.has(entry.id.toLowerCase()) ? { featured: true } : {}),
@@ -700,6 +712,7 @@ function createPrimeInferenceModel(
provider: "prime-inference",
baseUrl: PRIME_INFERENCE_BASE_URL,
reasoning: isPrimeInferenceReasoningModel(entry.id, entry.reasoning ?? openRouter?.reasoning),
+ ...(openRouter?.thinkingLevelMap ? { thinkingLevelMap: openRouter.thinkingLevelMap } : {}),
input: vision ? ["text", "image"] : ["text"],
cost: {
input: entry.input,
@@ -708,7 +721,15 @@ function createPrimeInferenceModel(
},
contextWindow,
maxTokens,
- compat: getPrimeInferenceCompat(entry.id),
+ compat: {
+ ...compat,
+ ...(openRouter?.supportsReasoningEffort === false
+ ? {
+ supportsReasoningEffort: false,
+ ...(!compat.thinkingFormat ? { thinkingFormat: "openrouter" as const } : {}),
+ }
+ : {}),
+ },
};
}
@@ -752,6 +773,7 @@ async function fetchOpenRouterModels(): Promise<Model<any>[]> {
const outputCost = Math.max(0, parseFloat(model.pricing?.completion || "0")) * 1_000_000;
const cacheReadCost = Math.max(0, parseFloat(model.pricing?.input_cache_read || "0")) * 1_000_000;
const cacheWriteCost = Math.max(0, parseFloat(model.pricing?.input_cache_write || "0")) * 1_000_000;
+ const reasoningCapabilities = getOpenRouterReasoningCapabilities(model);
const normalizedModel: Model<any> = {
id: modelKey,
@@ -760,6 +782,12 @@ async function fetchOpenRouterModels(): Promise<Model<any>[]> {
baseUrl: "https://openrouter.ai/api/v1",
provider,
reasoning: model.supported_parameters?.includes("reasoning") || false,
+ ...(reasoningCapabilities?.thinkingLevelMap
+ ? { thinkingLevelMap: reasoningCapabilities.thinkingLevelMap }
+ : {}),
+ ...(reasoningCapabilities?.supportsReasoningEffort === false
+ ? { compat: { supportsReasoningEffort: false } }
+ : {}),
input,
cost: {
input: inputCost,
diff --git a/packages/ai/src/models.generated.ts b/packages/ai/src/models.generated.ts
index 517d5843a3..aef5451787 100644
--- a/packages/ai/src/models.generated.ts
+++ b/packages/ai/src/models.generated.ts
@@ -9910,7 +9910,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.7999999999999999,
@@ -9927,7 +9929,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 3,
@@ -9944,7 +9948,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.7,
@@ -9961,7 +9967,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.3,
@@ -10064,7 +10072,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"off":null,"xhigh":"xhigh","max":"max"},
+ thinkingLevelMap: {"off":null,"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 10,
@@ -10081,7 +10089,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 1,
@@ -10098,7 +10108,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 15,
@@ -10115,7 +10127,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 15,
@@ -10132,7 +10146,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 5,
@@ -10150,7 +10166,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":null,"max":"max"},
input: ["text", "image"],
cost: {
input: 5,
@@ -10168,7 +10184,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 5,
@@ -10186,7 +10202,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 30,
@@ -10204,7 +10220,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 5,
@@ -10222,7 +10238,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 10,
@@ -10240,7 +10256,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 5,
@@ -10258,7 +10274,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 10,
@@ -10275,7 +10291,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 3,
@@ -10292,7 +10310,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 3,
@@ -10310,7 +10330,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":null,"max":"max"},
input: ["text", "image"],
cost: {
input: 3,
@@ -10328,7 +10348,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 2,
@@ -10345,7 +10365,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.22,
@@ -10396,7 +10418,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.25,
@@ -10413,7 +10437,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.075,
@@ -10431,6 +10457,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"minimal":"minimal","low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.25,
@@ -10448,6 +10475,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"minimal":"minimal","low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.09999999999999999,
@@ -10498,7 +10526,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0,
@@ -10549,7 +10579,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.25,
@@ -10566,7 +10598,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.7,
@@ -10583,7 +10617,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.5,
@@ -10600,7 +10636,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.27,
@@ -10617,7 +10655,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.26899999999999996,
@@ -10634,7 +10674,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.27,
@@ -10653,7 +10695,7 @@ export const MODELS = {
baseUrl: "https://openrouter.ai/api/v1",
compat: {"requiresReasoningContentOnAssistantMessages":true,"thinkingFormat":"deepseek"},
reasoning: true,
- thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"max"},
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"max","max":null},
input: ["text"],
cost: {
input: 0.14,
@@ -10672,7 +10714,7 @@ export const MODELS = {
baseUrl: "https://openrouter.ai/api/v1",
compat: {"requiresReasoningContentOnAssistantMessages":true,"thinkingFormat":"deepseek"},
reasoning: true,
- thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"max"},
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"max","max":null},
input: ["text"],
cost: {
input: 0.09,
@@ -10691,7 +10733,7 @@ export const MODELS = {
baseUrl: "https://openrouter.ai/api/v1",
compat: {"requiresReasoningContentOnAssistantMessages":true,"thinkingFormat":"deepseek"},
reasoning: true,
- thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"max"},
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"max","max":null},
input: ["text"],
cost: {
input: 0.435,
@@ -10708,7 +10750,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.3,
@@ -10725,7 +10769,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.09999999999999999,
@@ -10742,7 +10788,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 1.25,
@@ -10759,7 +10807,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 1.25,
@@ -10776,7 +10826,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 1.25,
@@ -10794,6 +10846,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"minimal":"minimal","low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.5,
@@ -10810,7 +10863,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 2,
@@ -10828,6 +10883,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"minimal":"minimal","low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.25,
@@ -10845,6 +10901,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"minimal":"minimal","low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.25,
@@ -10862,6 +10919,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 2,
@@ -10879,6 +10937,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 2,
@@ -10896,6 +10955,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":"minimal","low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 1.5,
@@ -10913,6 +10973,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":"minimal","low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.3,
@@ -10930,6 +10991,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":"minimal","low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 1.5,
@@ -10980,7 +11042,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.07,
@@ -10997,7 +11061,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0,
@@ -11014,7 +11080,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.09999999999999999,
@@ -11031,7 +11099,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0,
@@ -11066,6 +11136,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.25,
@@ -11134,6 +11205,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"xhigh","max":null},
input: ["text"],
cost: {
input: 0.075,
@@ -11201,7 +11273,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.3,
@@ -11304,6 +11378,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":"minimal","low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":null},
input: ["text", "image"],
cost: {
input: 1.25,
@@ -11320,7 +11395,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.55,
@@ -11337,7 +11414,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.255,
@@ -11354,7 +11433,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.3,
@@ -11371,7 +11452,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.15,
@@ -11388,7 +11471,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.25,
@@ -11405,7 +11490,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.3,
@@ -11559,6 +11646,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 1.5,
@@ -11627,6 +11715,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.15,
@@ -11728,7 +11817,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.6,
@@ -11745,7 +11836,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.41,
@@ -11762,7 +11855,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.6,
@@ -11779,7 +11874,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.73,
@@ -11797,7 +11894,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":null,"xhigh":null,"max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":null,"high":"high","xhigh":null,"max":"max"},
input: ["text", "image"],
cost: {
input: 3,
@@ -11814,7 +11911,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.024999999999999998,
@@ -11831,7 +11930,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.25,
@@ -11848,7 +11949,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.049999999999999996,
@@ -11865,7 +11968,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0,
@@ -11882,7 +11987,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0,
@@ -11900,6 +12007,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":null,"xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.08499999999999999,
@@ -11917,6 +12025,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":null,"xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0,
@@ -11934,6 +12043,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.6,
@@ -11951,6 +12061,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0,
@@ -11967,7 +12078,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0,
@@ -11984,7 +12097,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0,
@@ -12257,6 +12372,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":"minimal","low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 1.25,
@@ -12274,6 +12390,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":"minimal","low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.25,
@@ -12291,6 +12408,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":"minimal","low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.049999999999999996,
@@ -12308,6 +12426,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 15,
@@ -12325,6 +12444,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 1.25,
@@ -12342,6 +12462,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 1.25,
@@ -12359,6 +12480,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":null},
input: ["text", "image"],
cost: {
input: 1.25,
@@ -12376,6 +12498,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.25,
@@ -12393,7 +12516,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":null},
input: ["text", "image"],
cost: {
input: 1.75,
@@ -12429,7 +12552,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh"},
+ thinkingLevelMap: {"off":null,"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":null},
input: ["text", "image"],
cost: {
input: 1.75,
@@ -12447,7 +12570,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh"},
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":"medium","high":"high","xhigh":"xhigh","max":null},
input: ["text", "image"],
cost: {
input: 21,
@@ -12483,7 +12606,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":null},
input: ["text", "image"],
cost: {
input: 1.75,
@@ -12501,7 +12624,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":null},
input: ["text", "image"],
cost: {
input: 2.5,
@@ -12519,7 +12642,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":null},
input: ["text", "image"],
cost: {
input: 0.75,
@@ -12537,7 +12660,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":null},
input: ["text", "image"],
cost: {
input: 0.19999999999999998,
@@ -12555,7 +12678,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh"},
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":"medium","high":"high","xhigh":"xhigh","max":null},
input: ["text", "image"],
cost: {
input: 30,
@@ -12573,7 +12696,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":null},
input: ["text", "image"],
cost: {
input: 5,
@@ -12591,7 +12714,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh"},
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":"medium","high":"high","xhigh":"xhigh","max":null},
input: ["text", "image"],
cost: {
input: 30,
@@ -12609,7 +12732,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh","minimal":null,"max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 0.09999999999999999,
@@ -12627,7 +12750,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh","minimal":null,"max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 0.09999999999999999,
@@ -12645,7 +12768,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh","minimal":null,"max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 5,
@@ -12663,7 +12786,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh","minimal":null,"max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 5,
@@ -12681,7 +12804,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh","minimal":null,"max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 1.0000000000000002,
@@ -12699,7 +12822,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh","minimal":null,"max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 1.0000000000000002,
@@ -12768,6 +12891,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.037,
@@ -12785,6 +12909,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.03,
@@ -12802,6 +12927,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0,
@@ -12818,7 +12944,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.075,
@@ -12835,7 +12963,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 15,
@@ -12852,7 +12982,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 2,
@@ -12869,7 +13001,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 1.1,
@@ -12887,6 +13021,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 1.1,
@@ -12903,7 +13038,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 20,
@@ -12920,7 +13057,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 1.1,
@@ -12938,6 +13077,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 1.1,
@@ -13005,7 +13145,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.09,
@@ -13022,7 +13164,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0,
@@ -13039,7 +13183,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.06,
@@ -13056,7 +13202,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0,
@@ -13141,7 +13289,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.39999999999999997,
@@ -13158,7 +13308,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.22749999999999998,
@@ -13175,7 +13327,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.45499999999999996,
@@ -13209,7 +13363,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.22999999999999998,
@@ -13226,7 +13382,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.12,
@@ -13260,7 +13418,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.19999999999999998,
@@ -13277,7 +13437,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.08,
@@ -13294,7 +13456,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.117,
@@ -13413,7 +13577,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.78,
@@ -13447,7 +13613,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.15,
@@ -13481,7 +13649,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.39999999999999997,
@@ -13515,7 +13685,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.19999999999999998,
@@ -13566,7 +13738,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.18,
@@ -13583,7 +13757,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.26,
@@ -13600,7 +13776,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.195,
@@ -13617,7 +13795,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.14,
@@ -13634,7 +13814,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.39,
@@ -13651,7 +13833,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.09999999999999999,
@@ -13668,7 +13852,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.065,
@@ -13685,7 +13871,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.26,
@@ -13702,7 +13890,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.3,
@@ -13719,7 +13909,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.3,
@@ -13736,7 +13928,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.14,
@@ -13753,7 +13947,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.1875,
@@ -13770,7 +13966,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 1.0270000000000001,
@@ -13787,7 +13985,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.325,
@@ -13804,7 +14004,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.03,
@@ -13821,7 +14023,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 1.475,
@@ -13838,7 +14042,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.32,
@@ -13890,6 +14096,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 5,
@@ -13923,7 +14130,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.09999999999999999,
@@ -13941,6 +14150,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.19999999999999998,
@@ -13958,6 +14168,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.13199999999999998,
@@ -13975,6 +14186,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.063,
@@ -14009,6 +14221,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"minimal":"minimal","low":"low","medium":"medium","high":"high","xhigh":null,"max":"max"},
input: ["text", "image"],
cost: {
input: 1,
@@ -14026,6 +14239,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"minimal":"minimal","low":"low","medium":"medium","high":"high","xhigh":null,"max":"max"},
input: ["text", "image"],
cost: {
input: 0.5,
@@ -14042,7 +14256,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.15,
@@ -14059,7 +14275,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 1.25,
@@ -14077,6 +14295,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 1.25,
@@ -14094,6 +14313,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 2,
@@ -14110,7 +14330,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 1,
@@ -14127,7 +14349,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.14,
@@ -14144,7 +14368,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.435,
@@ -14161,7 +14387,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.6,
@@ -14178,7 +14406,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.13,
@@ -14195,7 +14425,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.6,
@@ -14212,7 +14444,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.5,
@@ -14229,7 +14463,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.3,
@@ -14246,7 +14482,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.39999999999999997,
@@ -14263,7 +14501,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.06,
@@ -14280,7 +14520,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.6,
@@ -14297,7 +14539,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 1.2,
@@ -14314,7 +14558,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.966,
@@ -14332,6 +14578,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"xhigh","max":null},
input: ["text"],
cost: {
input: 0.2842,
@@ -14348,7 +14595,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 1.2,
@@ -14366,6 +14615,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 10,
@@ -14382,7 +14632,9 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
+ compat: {"supportsReasoningEffort":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 1,
@@ -14400,6 +14652,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 5,
@@ -14417,6 +14670,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 2,
@@ -14435,7 +14689,7 @@ export const MODELS = {
baseUrl: "https://openrouter.ai/api/v1",
compat: {"requiresReasoningContentOnAssistantMessages":true,"thinkingFormat":"deepseek"},
reasoning: true,
- thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"max"},
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"max","max":null},
input: ["text"],
cost: {
input: 0.09,
@@ -14453,6 +14707,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":"minimal","low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 1.5,
@@ -14470,6 +14725,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 2,
@@ -14487,6 +14743,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":null,"high":"high","xhigh":null,"max":"max"},
input: ["text", "image"],
cost: {
input: 2.9000000000000004,
@@ -14504,6 +14761,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 5,
@@ -14521,6 +14779,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":null},
input: ["text", "image"],
cost: {
input: 0.75,
@@ -14538,6 +14797,7 @@ export const MODELS = {
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 2,
@@ -14558,7 +14818,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
- thinkingLevelMap: {"off":null,"xhigh":"xhigh","max":"max"},
+ thinkingLevelMap: {"off":null,"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 10,
@@ -14576,8 +14836,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 1,
@@ -14595,8 +14856,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 15,
@@ -14613,8 +14875,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 5,
@@ -14633,7 +14896,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
- thinkingLevelMap: {"max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":null,"max":"max"},
input: ["text", "image"],
cost: {
input: 5,
@@ -14653,7 +14916,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 5,
@@ -14673,7 +14936,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 5,
@@ -14693,7 +14956,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 5,
@@ -14710,8 +14973,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 3,
@@ -14728,8 +14992,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 3,
@@ -14749,7 +15014,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
- thinkingLevelMap: {"max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":null,"max":"max"},
input: ["text", "image"],
cost: {
input: 3,
@@ -14769,7 +15034,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 2,
@@ -14823,8 +15088,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.56,
@@ -14841,8 +15107,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.45,
@@ -14859,8 +15126,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.28,
@@ -14878,8 +15146,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.28,
@@ -14898,7 +15167,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false,"requiresReasoningContentOnAssistantMessages":true,"thinkingFormat":"deepseek"},
reasoning: true,
- thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"max"},
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"max","max":null},
input: ["text"],
cost: {
input: 0.14,
@@ -14918,7 +15187,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false,"requiresReasoningContentOnAssistantMessages":true,"thinkingFormat":"deepseek"},
reasoning: true,
- thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"max"},
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"max","max":null},
input: ["text"],
cost: {
input: 0.14,
@@ -14937,7 +15206,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false,"requiresReasoningContentOnAssistantMessages":true,"thinkingFormat":"deepseek"},
reasoning: true,
- thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"max"},
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"max","max":null},
input: ["text"],
cost: {
input: 2.1,
@@ -14955,8 +15224,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.3,
@@ -14973,8 +15243,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.1,
@@ -14991,8 +15262,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 1.25,
@@ -15011,6 +15283,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":"minimal","low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.5,
@@ -15029,6 +15302,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 2,
@@ -15047,6 +15321,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":"minimal","low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 1.5,
@@ -15065,6 +15340,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":"minimal","low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 1.5,
@@ -15171,8 +15447,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.3,
@@ -15189,8 +15466,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.6,
@@ -15207,8 +15485,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.3,
@@ -15264,6 +15543,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.1875,
@@ -15316,8 +15596,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.6,
@@ -15334,8 +15615,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.95,
@@ -15352,8 +15634,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 1.0925,
@@ -15373,7 +15656,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
- thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":null,"xhigh":null,"max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":null,"high":"high","xhigh":null,"max":"max"},
input: ["text", "image"],
cost: {
input: 3,
@@ -15391,8 +15674,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.05,
@@ -15412,6 +15696,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":null,"xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.3,
@@ -15521,6 +15806,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":"minimal","low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 1.25,
@@ -15539,6 +15825,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":"minimal","low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.25,
@@ -15557,6 +15844,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":"minimal","low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.05,
@@ -15575,6 +15863,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 1.25,
@@ -15593,7 +15882,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":null},
input: ["text", "image"],
cost: {
input: 1.75,
@@ -15631,7 +15920,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh"},
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":"medium","high":"high","xhigh":"xhigh","max":null},
input: ["text", "image"],
cost: {
input: 21,
@@ -15650,7 +15939,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":null},
input: ["text", "image"],
cost: {
input: 1.75,
@@ -15670,7 +15959,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":null},
input: ["text", "image"],
cost: {
input: 2.5,
@@ -15690,7 +15979,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":null},
input: ["text", "image"],
cost: {
input: 0.75,
@@ -15710,7 +15999,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":null},
input: ["text", "image"],
cost: {
input: 0.2,
@@ -15729,7 +16018,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh"},
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":"medium","high":"high","xhigh":"xhigh","max":null},
input: ["text", "image"],
cost: {
input: 30,
@@ -15749,7 +16038,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":null},
input: ["text", "image"],
cost: {
input: 5,
@@ -15788,7 +16077,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh","minimal":null,"max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 1,
@@ -15807,7 +16096,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh","minimal":null,"max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 1,
@@ -15826,7 +16115,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh","minimal":null,"max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 5,
@@ -15845,7 +16134,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh","minimal":null,"max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 5,
@@ -15864,7 +16153,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh","minimal":null,"max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 2.5,
@@ -15883,7 +16172,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
- thinkingLevelMap: {"xhigh":"xhigh","minimal":null,"max":"max"},
+ thinkingLevelMap: {"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},
input: ["text", "image"],
cost: {
input: 2.5,
@@ -15902,6 +16191,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.15,
@@ -15920,6 +16210,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.07,
@@ -15936,8 +16227,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.1,
@@ -15954,8 +16246,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.065,
@@ -16009,8 +16302,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.117,
@@ -16101,8 +16395,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 1,
@@ -16156,8 +16451,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.3125,
@@ -16174,8 +16470,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.6,
@@ -16192,8 +16489,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.6,
@@ -16210,8 +16508,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.3,
@@ -16228,8 +16527,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.03,
@@ -16248,6 +16548,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":"minimal","low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":null},
input: ["text", "image"],
cost: {
input: 2,
@@ -16265,8 +16566,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 2,
@@ -16286,6 +16588,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
reasoning: true,
+ thinkingLevelMap: {"off":null,"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":null},
input: ["text", "image"],
cost: {
input: 2,
@@ -16303,8 +16606,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text", "image"],
cost: {
input: 0.4,
@@ -16321,8 +16625,9 @@ export const MODELS = {
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
- compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"maxTokensField":"max_tokens","supportsStrictMode":false},
+ compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"openrouter"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 1,
@@ -16341,6 +16646,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"zai"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.6,
@@ -16359,6 +16665,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"zai"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.2,
@@ -16377,6 +16684,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"zai"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.6,
@@ -16395,6 +16703,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"zai"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.6,
@@ -16413,6 +16722,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"zai"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 0.1,
@@ -16431,6 +16741,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"zai"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 1.2,
@@ -16450,6 +16761,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"zai"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},
input: ["text"],
cost: {
input: 1.75,
@@ -16469,6 +16781,7 @@ export const MODELS = {
baseUrl: "https://api.pinference.ai/api/v1",
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false,"maxTokensField":"max_tokens","supportsStrictMode":false,"thinkingFormat":"zai"},
reasoning: true,
+ thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"xhigh","max":null},
input: ["text"],
cost: {
input: 1.68,
diff --git a/packages/ai/src/openrouter-reasoning.ts b/packages/ai/src/openrouter-reasoning.ts
new file mode 100644
index 0000000000..b0e93fc507
--- /dev/null
+++ b/packages/ai/src/openrouter-reasoning.ts
@@ -0,0 +1,75 @@
+import type { ThinkingLevel, ThinkingLevelMap } from "./types.js";
+
+const THINKING_LEVELS: readonly ThinkingLevel[] = ["minimal", "low", "medium", "high", "xhigh", "max"];
+
+export interface OpenRouterReasoningCapabilities {
+ /** Exact local-to-provider effort map. null entries are unsupported. */
+ thinkingLevelMap?: ThinkingLevelMap;
+ /** Whether the model exposes effort selection, rather than only an enabled toggle. */
+ supportsReasoningEffort: boolean;
+ /** Whether the model rejects attempts to disable reasoning. */
+ mandatory: boolean;
+}
+
+function isRecord(value: unknown): value is Record<string, unknown> {
+ return typeof value === "object" && value !== null && !Array.isArray(value);
+}
+
+function enabledOnlyCapabilities(mandatory: boolean): OpenRouterReasoningCapabilities {
+ // The model supports reasoning as an on/off capability, but does not expose
+ // effort selection. Represent that as one generic active level in the UI.
+ return {
+ thinkingLevelMap: {
+ ...(mandatory ? { off: null } : {}),
+ minimal: null,
+ low: null,
+ medium: null,
+ high: "high",
+ xhigh: null,
+ max: null,
+ },
+ supportsReasoningEffort: false,
+ mandatory,
+ };
+}
+
+/**
+ * Normalize the reasoning capability metadata published by OpenRouter.
+ *
+ * The top-level reasoning object is only trusted after supported_parameters
+ * confirms that the route accepts reasoning controls. An omitted
+ * supported_efforts field means the route exposes an enabled toggle but no
+ * effort selector; null means every gateway effort is accepted.
+ */
+export function getOpenRouterReasoningCapabilities(model: unknown): OpenRouterReasoningCapabilities | undefined {
+ if (!isRecord(model)) return undefined;
+ const supportedParameters = Array.isArray(model.supported_parameters) ? model.supported_parameters : [];
+ if (!supportedParameters.includes("reasoning") || !isRecord(model.reasoning)) return undefined;
+
+ const mandatory = model.reasoning.mandatory === true;
+ const rawEfforts = model.reasoning.supported_efforts;
+ if (rawEfforts === null) {
+ const thinkingLevelMap: ThinkingLevelMap = {};
+ if (mandatory) thinkingLevelMap.off = null;
+ for (const level of THINKING_LEVELS) thinkingLevelMap[level] = level;
+ return { thinkingLevelMap, supportsReasoningEffort: true, mandatory };
+ }
+
+ if (Array.isArray(rawEfforts) && rawEfforts.length > 0) {
+ const supportedEfforts = new Set(
+ rawEfforts.filter(
+ (effort): effort is ThinkingLevel =>
+ typeof effort === "string" && THINKING_LEVELS.includes(effort as ThinkingLevel),
+ ),
+ );
+ if (supportedEfforts.size === 0) return enabledOnlyCapabilities(mandatory);
+ const thinkingLevelMap: ThinkingLevelMap = {};
+ if (mandatory) thinkingLevelMap.off = null;
+ for (const level of THINKING_LEVELS) {
+ thinkingLevelMap[level] = supportedEfforts.has(level) ? level : null;
+ }
+ return { thinkingLevelMap, supportsReasoningEffort: true, mandatory };
+ }
+
+ return enabledOnlyCapabilities(mandatory);
+}
diff --git a/packages/ai/src/providers/amazon-bedrock.ts b/packages/ai/src/providers/amazon-bedrock.ts
index aa8624f02e..3de36f60eb 100644
--- a/packages/ai/src/providers/amazon-bedrock.ts
+++ b/packages/ai/src/providers/amazon-bedrock.ts
@@ -321,7 +321,7 @@ export const streamSimpleBedrock: StreamFunction<"bedrock-converse-stream", Simp
options?: SimpleStreamOptions,
): AssistantMessageEventStream => {
const base = buildBaseOptions(model, options, undefined);
- if (!options?.reasoning) {
+ if (!options?.reasoning || options.reasoning === "off") {
return streamBedrock(model, context, { ...base, reasoning: undefined } satisfies BedrockOptions);
}
diff --git a/packages/ai/src/providers/anthropic.ts b/packages/ai/src/providers/anthropic.ts
index 9e8a8a2d4c..0f3232dc0f 100644
--- a/packages/ai/src/providers/anthropic.ts
+++ b/packages/ai/src/providers/anthropic.ts
@@ -812,7 +812,7 @@ export const streamSimpleAnthropic: StreamFunction<"anthropic-messages", SimpleS
}
const base = buildBaseOptions(model, options, apiKey);
- if (!options?.reasoning) {
+ if (!options?.reasoning || options.reasoning === "off") {
return streamAnthropic(model, context, { ...base, thinkingEnabled: false } satisfies AnthropicOptions);
}
diff --git a/packages/ai/src/providers/google-vertex.ts b/packages/ai/src/providers/google-vertex.ts
index b6e0bbe84f..d48a8f4580 100644
--- a/packages/ai/src/providers/google-vertex.ts
+++ b/packages/ai/src/providers/google-vertex.ts
@@ -307,7 +307,7 @@ export const streamSimpleGoogleVertex: StreamFunction<"google-vertex", SimpleStr
options?: SimpleStreamOptions,
): AssistantMessageEventStream => {
const base = buildBaseOptions(model, options, undefined);
- if (!options?.reasoning) {
+ if (!options?.reasoning || options.reasoning === "off") {
return streamGoogleVertex(model, context, {
...base,
thinking: { enabled: false },
diff --git a/packages/ai/src/providers/google.ts b/packages/ai/src/providers/google.ts
index 05914f687f..f43c54f23b 100644
--- a/packages/ai/src/providers/google.ts
+++ b/packages/ai/src/providers/google.ts
@@ -295,7 +295,7 @@ export const streamSimpleGoogle: StreamFunction<"google-generative-ai", SimpleSt
}
const base = buildBaseOptions(model, options, apiKey);
- if (!options?.reasoning) {
+ if (!options?.reasoning || options.reasoning === "off") {
return streamGoogle(model, context, { ...base, thinking: { enabled: false } } satisfies GoogleOptions);
}
diff --git a/packages/ai/src/providers/openai-completions.ts b/packages/ai/src/providers/openai-completions.ts
index 155c5a0703..ecd16b4f7a 100644
--- a/packages/ai/src/providers/openai-completions.ts
+++ b/packages/ai/src/providers/openai-completions.ts
@@ -78,6 +78,8 @@ function isImageContentBlock(block: { type: string }): block is ImageContent {
export interface OpenAICompletionsOptions extends StreamOptions {
toolChoice?: "auto" | "none" | "required" | { type: "function"; function: { name: string } };
reasoningEffort?: "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
+ /** Explicit reasoning toggle. undefined preserves the provider/model default. */
+ reasoningEnabled?: boolean;
}
interface OpenAICompatCacheControl {
@@ -430,13 +432,16 @@ export const streamSimpleOpenAICompletions: StreamFunction<"openai-completions",
}
const base = buildBaseOptions(model, options, apiKey);
- const clampedReasoning = options?.reasoning ? clampThinkingLevel(model, options.reasoning) : undefined;
+ const requestedReasoning = options?.reasoning;
+ const reasoningSpecified = requestedReasoning !== undefined;
+ const clampedReasoning = reasoningSpecified ? clampThinkingLevel(model, requestedReasoning) : undefined;
const reasoningEffort = clampedReasoning === "off" ? undefined : clampedReasoning;
const toolChoice = (options as OpenAICompletionsOptions | undefined)?.toolChoice;
return streamOpenAICompletions(model, context, {
...base,
reasoningEffort,
+ reasoningEnabled: reasoningSpecified ? clampedReasoning !== "off" : undefined,
toolChoice,
} satisfies OpenAICompletionsOptions);
};
@@ -577,22 +582,27 @@ function buildParams(
model.thinkingLevelMap?.[options.reasoningEffort] ?? options.reasoningEffort;
}
} else if (compat.thinkingFormat === "openrouter" && model.reasoning) {
- // OpenRouter normalizes reasoning across providers via a nested reasoning object.
- const openRouterParams = params as typeof params & { reasoning?: { effort?: string } };
- if (options?.reasoningEffort) {
+ // OpenRouter distinguishes an omitted reasoning preference (use the model
+ // default), an explicit toggle, and an explicit effort selection.
+ const openRouterParams = params as typeof params & { reasoning?: { enabled?: boolean; effort?: string } };
+ if (options?.reasoningEffort && compat.supportsReasoningEffort) {
openRouterParams.reasoning = {
effort: model.thinkingLevelMap?.[options.reasoningEffort] ?? options.reasoningEffort,
};
- } else if (model.thinkingLevelMap?.off !== null) {
- openRouterParams.reasoning = { effort: model.thinkingLevelMap?.off ?? "none" };
+ } else if (options?.reasoningEnabled === true) {
+ openRouterParams.reasoning = { enabled: true };
+ } else if (options?.reasoningEnabled === false && model.thinkingLevelMap?.off !== null) {
+ openRouterParams.reasoning = compat.supportsReasoningEffort
+ ? { effort: model.thinkingLevelMap?.off ?? "none" }
+ : { enabled: false };
}
} else if (options?.reasoningEffort && model.reasoning && compat.supportsReasoningEffort) {
// OpenAI-style reasoning_effort
(params as any).reasoning_effort = model.thinkingLevelMap?.[options.reasoningEffort] ?? options.reasoningEffort;
- } else if (!options?.reasoningEffort && model.reasoning && compat.supportsReasoningEffort) {
+ } else if (options?.reasoningEnabled === false && model.reasoning && compat.supportsReasoningEffort) {
const offValue = model.thinkingLevelMap?.off;
- if (typeof offValue === "string") {
- (params as any).reasoning_effort = offValue;
+ if (offValue !== null) {
+ (params as any).reasoning_effort = offValue ?? "none";
}
}
diff --git a/packages/ai/src/types.ts b/packages/ai/src/types.ts
index f38c99c5c4..d7a679fac0 100644
--- a/packages/ai/src/types.ts
+++ b/packages/ai/src/types.ts
@@ -143,7 +143,8 @@ export type ProviderStreamOptions = StreamOptions & Record<string, unknown>;
// Unified options with reasoning passed to streamSimple() and completeSimple()
export interface SimpleStreamOptions extends StreamOptions {
- reasoning?: ThinkingLevel;
+ /** Explicit model reasoning selection. Omit to preserve the provider default. */
+ reasoning?: ModelThinkingLevel;
/** Custom token budgets for thinking levels (token-based providers only) */
thinkingBudgets?: ThinkingBudgets;
}
diff --git a/packages/ai/test/openai-completions-tool-choice.test.ts b/packages/ai/test/openai-completions-tool-choice.test.ts
index ffe3b54d32..bc6befd35e 100644
--- a/packages/ai/test/openai-completions-tool-choice.test.ts
+++ b/packages/ai/test/openai-completions-tool-choice.test.ts
@@ -881,7 +881,8 @@ describe("openai-completions tool_choice", () => {
});
it("uses OpenRouter reasoning object instead of reasoning_effort", async () => {
- const model = getModel("openrouter", "deepseek/deepseek-r1")!;
+ const baseModel = getModel("openrouter", "deepseek/deepseek-r1")!;
+ const model = { ...baseModel, compat: { ...baseModel.compat, supportsReasoningEffort: true } };
let payload: unknown;
await streamSimple(
@@ -911,4 +912,120 @@ describe("openai-completions tool_choice", () => {
expect(params.reasoning).toEqual({ effort: "high" });
expect(params.reasoning_effort).toBeUndefined();
});
+
+ it("preserves the OpenRouter model default when reasoning is unspecified", async () => {
+ const model = getModel("openrouter", "deepseek/deepseek-r1")!;
+ let payload: unknown;
+
+ await streamSimple(
+ model,
+ { messages: [{ role: "user", content: "Hi", timestamp: Date.now() }] },
+ {
+ apiKey: "test",
+ onPayload: (params: unknown) => {
+ payload = params;
+ },
+ },
+ ).result();
+
+ expect((payload as { reasoning?: unknown }).reasoning).toBeUndefined();
+ });
+
+ it("distinguishes omitted reasoning from explicit off for Prime effort models", async () => {
+ const model = getModel("prime-inference", "moonshotai/kimi-k3")!;
+ const context = { messages: [{ role: "user" as const, content: "Hi", timestamp: Date.now() }] };
+ let payload: unknown;
+
+ await streamSimple(model, context, {
+ apiKey: "test",
+ onPayload: (params: unknown) => {
+ payload = params;
+ },
+ }).result();
+ expect((payload as { reasoning_effort?: unknown }).reasoning_effort).toBeUndefined();
+
+ await streamSimple(model, context, {
+ apiKey: "test",
+ reasoning: "off",
+ onPayload: (params: unknown) => {
+ payload = params;
+ },
+ }).result();
+ expect((payload as { reasoning_effort?: unknown }).reasoning_effort).toBe("none");
+ });
+
+ it("serializes explicit off only for models that allow disabling reasoning", async () => {
+ const baseModel = getModel("openrouter", "deepseek/deepseek-r1")!;
+ const effortCompat = { ...baseModel.compat, supportsReasoningEffort: true };
+ const optionalModel = { ...baseModel, compat: effortCompat, thinkingLevelMap: { high: "high" } };
+ const mandatoryModel = {
+ ...baseModel,
+ compat: effortCompat,
+ thinkingLevelMap: {
+ off: null,
+ minimal: null,
+ low: null,
+ medium: null,
+ high: "high",
+ xhigh: null,
+ max: null,
+ },
+ };
+ let payload: unknown;
+ const context = { messages: [{ role: "user" as const, content: "Hi", timestamp: Date.now() }] };
+
+ await streamSimple(optionalModel, context, {
+ apiKey: "test",
+ reasoning: "off",
+ onPayload: (params: unknown) => {
+ payload = params;
+ },
+ }).result();
+ expect((payload as { reasoning?: unknown }).reasoning).toEqual({ effort: "none" });
+
+ await streamSimple(mandatoryModel, context, {
+ apiKey: "test",
+ reasoning: "off",
+ onPayload: (params: unknown) => {
+ payload = params;
+ },
+ }).result();
+ expect((payload as { reasoning?: unknown }).reasoning).toEqual({ effort: "high" });
+ });
+
+ it("uses enabled toggles when an OpenRouter model has no effort selector", async () => {
+ const baseModel = getModel("openrouter", "deepseek/deepseek-r1")!;
+ const model = {
+ ...baseModel,
+ thinkingLevelMap: {
+ minimal: null,
+ low: null,
+ medium: null,
+ high: "high",
+ xhigh: null,
+ max: null,
+ },
+ compat: { ...baseModel.compat, supportsReasoningEffort: false },
+ };
+ let payload: unknown;
+ const context = { messages: [{ role: "user" as const, content: "Hi", timestamp: Date.now() }] };
+
+ await streamSimple(model, context, {
+ apiKey: "test",
+ reasoning: "high",
+ onPayload: (params: unknown) => {
+ payload = params;
+ },
+ }).result();
+ expect((payload as { reasoning?: unknown }).reasoning).toEqual({ enabled: true });
+
+ await streamSimple(model, context, {
+ apiKey: "test",
+ reasoning: "off",
+ onPayload: (params: unknown) => {
+ payload = params;
+ },
+ }).result();
+ expect((payload as { reasoning?: unknown }).reasoning).toEqual({ enabled: false });
+ });
});
diff --git a/packages/ai/test/openrouter-reasoning.test.ts b/packages/ai/test/openrouter-reasoning.test.ts
new file mode 100644
index 0000000000..57aa00a74b
--- /dev/null
+++ b/packages/ai/test/openrouter-reasoning.test.ts
@@ -0,0 +1,103 @@
+import { describe, expect, it } from "vitest";
+import { getSupportedThinkingLevels } from "../src/models.js";
+import { getOpenRouterReasoningCapabilities } from "../src/openrouter-reasoning.js";
+import type { Model } from "../src/types.js";
+
+function supportedLevels(thinkingLevelMap: Model<"openai-completions">["thinkingLevelMap"]) {
+ const model = {
+ reasoning: true,
+ thinkingLevelMap,
+ } as Model<"openai-completions">;
+ return getSupportedThinkingLevels(model);
+}
+
+function metadata(reasoning: Record<string, unknown>, supportsReasoning = true) {
+ return {
+ supported_parameters: supportsReasoning ? ["tools", "reasoning"] : ["tools"],
+ reasoning,
+ };
+}
+
+describe("OpenRouter reasoning metadata", () => {
+ it("exposes exactly the published efforts and hides off for mandatory reasoning", () => {
+ const capabilities = getOpenRouterReasoningCapabilities(
+ metadata({
+ mandatory: true,
+ supported_efforts: ["xhigh", "high", "medium", "low", "minimal"],
+ }),
+ );
+
+ expect(capabilities).toEqual({
+ mandatory: true,
+ supportsReasoningEffort: true,
+ thinkingLevelMap: {
+ off: null,
+ minimal: "minimal",
+ low: "low",
+ medium: "medium",
+ high: "high",
+ xhigh: "xhigh",
+ max: null,
+ },
+ });
+ expect(supportedLevels(capabilities?.thinkingLevelMap)).toEqual(["minimal", "low", "medium", "high", "xhigh"]);
+ });
+
+ it("keeps off and only the advertised sparse efforts for optional reasoning", () => {
+ const capabilities = getOpenRouterReasoningCapabilities(
+ metadata({ mandatory: false, supported_efforts: ["high", "none"] }),
+ );
+
+ expect(capabilities?.supportsReasoningEffort).toBe(true);
+ expect(supportedLevels(capabilities?.thinkingLevelMap)).toEqual(["off", "high"]);
+ });
+
+ it("treats null efforts as accepting every gateway effort", () => {
+ const optional = getOpenRouterReasoningCapabilities(metadata({ mandatory: false, supported_efforts: null }));
+ const mandatory = getOpenRouterReasoningCapabilities(metadata({ mandatory: true, supported_efforts: null }));
+
+ expect(optional?.supportsReasoningEffort).toBe(true);
+ expect(mandatory?.supportsReasoningEffort).toBe(true);
+ expect(supportedLevels(optional?.thinkingLevelMap)).toEqual([
+ "off",
+ "minimal",
+ "low",
+ "medium",
+ "high",
+ "xhigh",
+ "max",
+ ]);
+ expect(supportedLevels(mandatory?.thinkingLevelMap)).toEqual([
+ "minimal",
+ "low",
+ "medium",
+ "high",
+ "xhigh",
+ "max",
+ ]);
+ });
+
+ it("uses a single active toggle when effort selection is not exposed", () => {
+ const optional = getOpenRouterReasoningCapabilities(metadata({ mandatory: false }));
+ const mandatory = getOpenRouterReasoningCapabilities(metadata({ mandatory: true }));
+
+ expect(optional?.supportsReasoningEffort).toBe(false);
+ expect(supportedLevels(optional?.thinkingLevelMap)).toEqual(["off", "high"]);
+ expect(supportedLevels(mandatory?.thinkingLevelMap)).toEqual(["high"]);
+ });
+
+ it("falls back to an enabled toggle for malformed effort lists", () => {
+ const capabilities = getOpenRouterReasoningCapabilities(
+ metadata({ mandatory: false, supported_efforts: ["unexpected", 123] }),
+ );
+
+ expect(capabilities?.supportsReasoningEffort).toBe(false);
+ expect(supportedLevels(capabilities?.thinkingLevelMap)).toEqual(["off", "high"]);
+ });
+
+ it("ignores the over-reported reasoning object when the route lacks the reasoning parameter", () => {
+ expect(
+ getOpenRouterReasoningCapabilities(metadata({ mandatory: true, supported_efforts: ["high"] }, false)),
+ ).toBeUndefined();
+ });
+});
diff --git a/packages/ai/test/prime-inference-models.test.ts b/packages/ai/test/prime-inference-models.test.ts
index f28ac159aa..ccf748857d 100644
--- a/packages/ai/test/prime-inference-models.test.ts
+++ b/packages/ai/test/prime-inference-models.test.ts
@@ -63,22 +63,39 @@ describe("Prime Inference models", () => {
expect(getModel("prime-inference", "openai/gpt-4o").featured).toBeUndefined();
});
+ it("uses mandatory provider efforts for Qwen 3.8 Max", () => {
+ const model = getModel("prime-inference", "qwen/qwen3.8-max");
+
+ expect(model.featured).toBe(true);
+ expect(model.thinkingLevelMap).toEqual({
+ off: null,
+ minimal: "minimal",
+ low: "low",
+ medium: "medium",
+ high: "high",
+ xhigh: "xhigh",
+ max: null,
+ });
+ expect(getSupportedThinkingLevels(model)).toEqual(["minimal", "low", "medium", "high", "xhigh"]);
+ });
+
+ it("uses reasoning toggles for models without effort selectors", () => {
+ for (const provider of ["prime-inference", "openrouter"] as const) {
+ const model = getModel(provider, "qwen/qwen3.7-flash");
+
+ expect(model.compat?.supportsReasoningEffort).toBe(false);
+ expect(getSupportedThinkingLevels(model)).toEqual(["off", "high"]);
+ if (provider === "prime-inference") expect(model.compat?.thinkingFormat).toBe("openrouter");
+ }
+ });
+
it("registers Kimi K3 on Prime Inference and OpenRouter", () => {
for (const provider of ["prime-inference", "openrouter"] as const) {
const model = getModel(provider, "moonshotai/kimi-k3");
expect(model.api).toBe("openai-completions");
expect(model.reasoning).toBe(true);
- expect(model.thinkingLevelMap).toEqual({
- off: null,
- minimal: null,
- low: null,
- medium: null,
- high: null,
- xhigh: null,
- max: "max",
- });
- expect(getSupportedThinkingLevels(model)).toEqual(["max"]);
+ expect(getSupportedThinkingLevels(model)).toEqual(["off", "low", "high", "max"]);
expect(model.input).toEqual(["text", "image"]);
expect(model.contextWindow).toBe(1048576);
expect(model.maxTokens).toBe(1048576);
@@ -118,8 +135,7 @@ describe("Prime Inference models", () => {
expect(model.provider).toBe("prime-inference");
expect(model.baseUrl).toBe("https://api.pinference.ai/api/v1");
expect(model.reasoning).toBe(true);
- expect(model.thinkingLevelMap).toEqual({ xhigh: "xhigh" });
- expect(getSupportedThinkingLevels(model)).toContain("xhigh");
+ expect(getSupportedThinkingLevels(model)).toEqual(["off", "low", "medium", "high", "xhigh"]);
expect(model.input).toEqual(["text", "image"]);
expect(model.contextWindow).toBe(1050000);
expect(model.maxTokens).toBe(128000);
@@ -141,13 +157,11 @@ describe("Prime Inference models", () => {
it("marks known reasoning-capable Prime Inference model families", () => {
const opus48 = getModel("prime-inference", "anthropic/claude-opus-4.8");
expect(opus48.reasoning).toBe(true);
- expect(opus48.thinkingLevelMap).toEqual({ xhigh: "xhigh", max: "max" });
- expect(getSupportedThinkingLevels(opus48)).toContain("xhigh");
- expect(getSupportedThinkingLevels(opus48)).toContain("max");
+ expect(getSupportedThinkingLevels(opus48)).toEqual(["off", "low", "medium", "high", "xhigh", "max"]);
const sonnet5 = getModel("prime-inference", "anthropic/claude-sonnet-5");
expect(sonnet5.reasoning).toBe(true);
- expect(sonnet5.thinkingLevelMap).toEqual({ xhigh: "xhigh", max: "max" });
+ expect(getSupportedThinkingLevels(sonnet5)).toEqual(["off", "low", "medium", "high", "xhigh", "max"]);
expect(sonnet5.input).toEqual(["text", "image"]);
expect(sonnet5.contextWindow).toBe(1000000);
expect(sonnet5.maxTokens).toBe(128000);
diff --git a/packages/coding-agent/docs/custom-provider.md b/packages/coding-agent/docs/custom-provider.md
index 920c6c341b..979f7d685c 100644
--- a/packages/coding-agent/docs/custom-provider.md
+++ b/packages/coding-agent/docs/custom-provider.md
@@ -603,7 +603,7 @@ interface ProviderModelConfig {
reasoning: boolean;
/** Maps Prime Agent thinking levels to provider/model-specific values; null marks a level unsupported. */
- thinkingLevelMap?: Partial<Record<"off" | "minimal" | "low" | "medium" | "high" | "xhigh", string | null>>;
+ thinkingLevelMap?: Partial<Record<"off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", string | null>>;
/** Supported input types. */
input: ("text" | "image")[];
diff --git a/packages/coding-agent/docs/extensions.md b/packages/coding-agent/docs/extensions.md
index 5cc38a5086..a91f063a25 100644
--- a/packages/coding-agent/docs/extensions.md
+++ b/packages/coding-agent/docs/extensions.md
@@ -1526,7 +1526,7 @@ if (model) {
Get or set the thinking level. Level is clamped to model capabilities (non-reasoning models always use "off"). Changes emit `thinking_level_select`.
```typescript
-const current = pi.getThinkingLevel(); // "off" | "minimal" | "low" | "medium" | "high" | "xhigh"
+const current = pi.getThinkingLevel(); // "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max"
pi.setThinkingLevel("high");
```
diff --git a/packages/coding-agent/docs/models.md b/packages/coding-agent/docs/models.md
index 3f6f720194..c86fdab9d6 100644
--- a/packages/coding-agent/docs/models.md
+++ b/packages/coding-agent/docs/models.md
@@ -205,7 +205,7 @@ Current behavior:
### Thinking Level Map
-Use `thinkingLevelMap` on a model to describe model-specific thinking controls. Keys are Prime Agent thinking levels: `off`, `minimal`, `low`, `medium`, `high`, `xhigh`.
+Use `thinkingLevelMap` on a model to describe model-specific thinking controls. Keys are Prime Agent thinking levels: `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`.
Values are tristate:
diff --git a/packages/coding-agent/docs/rpc.md b/packages/coding-agent/docs/rpc.md
index aab84704d3..51ae0bd7b7 100644
--- a/packages/coding-agent/docs/rpc.md
+++ b/packages/coding-agent/docs/rpc.md
@@ -330,9 +330,9 @@ Set the reasoning/thinking level for models that support it.
{"type": "set_thinking_level", "level": "high"}
```
-Levels: `"off"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"`
+Levels: `"off"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"`, `"max"`
-Note: `"xhigh"` is only supported by OpenAI codex-max models.
+Available levels depend on the current model.
Response:
```json
diff --git a/packages/coding-agent/docs/sdk.md b/packages/coding-agent/docs/sdk.md
index b3c3d3dd8e..a8ee9aa372 100644
--- a/packages/coding-agent/docs/sdk.md
+++ b/packages/coding-agent/docs/sdk.md
@@ -387,7 +387,7 @@ const available = await modelRegistry.getAvailable();
const { session } = await createAgentSession({
model: opus,
- thinkingLevel: "medium", // off, minimal, low, medium, high, xhigh
+ thinkingLevel: "medium", // off, minimal, low, medium, high, xhigh, max
// Models for cycling (Ctrl+P in interactive mode)
scopedModels: [
diff --git a/packages/coding-agent/docs/settings.md b/packages/coding-agent/docs/settings.md
index fcfcef9aeb..8e1c147260 100644
--- a/packages/coding-agent/docs/settings.md
+++ b/packages/coding-agent/docs/settings.md
@@ -17,7 +17,7 @@ Edit directly or use `/settings` for common options.
|---------|------|---------|-------------|
| `defaultProvider` | string | - | Default provider (e.g., `"anthropic"`, `"openai"`) |
| `defaultModel` | string | - | Default model ID |
-| `defaultThinkingLevel` | string | `"xhigh"` | `"off"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"` |
+| `defaultThinkingLevel` | string | `"xhigh"` | `"off"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"`, `"max"` |
| `hideThinkingBlock` | boolean | `false` | Hide thinking blocks in output |
| `thinkingBudgets` | object | - | Custom token budgets per thinking level |
diff --git a/packages/coding-agent/src/modes/interactive/theme/theme-schema.json b/packages/coding-agent/src/modes/interactive/theme/theme-schema.json
index bd64afe9fd..93931797f6 100644
--- a/packages/coding-agent/src/modes/interactive/theme/theme-schema.json
+++ b/packages/coding-agent/src/modes/interactive/theme/theme-schema.json
@@ -306,7 +306,7 @@
},
"thinkingXhigh": {
"$ref": "#/$defs/colorValue",
- "description": "Thinking level border: xhigh (OpenAI codex-max only)"
+ "description": "Thinking level border: xhigh"
},
"bashMode": {
"$ref": "#/$defs/colorValue",