feat(ai): add max thinking level
This commit is contained in:
@@ -742,7 +742,8 @@ export const stream: StreamFunction<"anthropic-messages", AnthropicOptions> = (
|
||||
|
||||
/**
|
||||
* Map ThinkingLevel to Anthropic effort levels for adaptive thinking.
|
||||
* Note: effort "max" is only valid on Opus 4.6, while Opus 4.7+ and Fable 5 support "xhigh".
|
||||
* Note: effort "max" is available on all adaptive-thinking Claude models, while native
|
||||
* "xhigh" is only available on Opus 4.7/4.8, Sonnet 5, and Fable 5.
|
||||
*/
|
||||
function mapThinkingLevelToEffort(
|
||||
model: Model<"anthropic-messages">,
|
||||
|
||||
@@ -52,7 +52,7 @@ function formatAzureOpenAIError(error: unknown): string {
|
||||
|
||||
// Azure OpenAI Responses-specific options
|
||||
export interface AzureOpenAIResponsesOptions extends StreamOptions {
|
||||
reasoningEffort?: "minimal" | "low" | "medium" | "high" | "xhigh";
|
||||
reasoningEffort?: "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
|
||||
reasoningSummary?: "auto" | "detailed" | "concise" | null;
|
||||
azureApiVersion?: string;
|
||||
azureResourceName?: string;
|
||||
|
||||
@@ -582,7 +582,9 @@ function supportsAdaptiveThinking(modelId: string, modelName?: string): boolean
|
||||
|
||||
function supportsNativeXhighEffort(model: Model<"bedrock-converse-stream">): boolean {
|
||||
const candidates = getModelMatchCandidates(model.id, model.name);
|
||||
return candidates.some((s) => s.includes("opus-4-7") || s.includes("opus-4-8") || s.includes("fable-5"));
|
||||
return candidates.some(
|
||||
(s) => s.includes("opus-4-7") || s.includes("opus-4-8") || s.includes("sonnet-5") || s.includes("fable-5"),
|
||||
);
|
||||
}
|
||||
|
||||
function mapThinkingLevelToEffort(
|
||||
@@ -1025,11 +1027,12 @@ function buildAdditionalModelRequestFields(
|
||||
low: 2048,
|
||||
medium: 8192,
|
||||
high: 16384,
|
||||
xhigh: 16384, // Claude doesn't support xhigh, clamp to high
|
||||
xhigh: 16384, // Budget-based Claude clamps extended levels to high
|
||||
max: 16384,
|
||||
};
|
||||
|
||||
// Custom budgets override defaults (xhigh not in ThinkingBudgets, use high)
|
||||
const level = options.reasoning === "xhigh" ? "high" : options.reasoning;
|
||||
// Custom budgets only cover token-based levels through high.
|
||||
const level = options.reasoning === "xhigh" || options.reasoning === "max" ? "high" : options.reasoning;
|
||||
const budget = options.thinkingBudgets?.[level] ?? defaultBudgets[options.reasoning];
|
||||
|
||||
return {
|
||||
|
||||
@@ -400,7 +400,7 @@ function buildParams(
|
||||
return params;
|
||||
}
|
||||
|
||||
type ClampedThinkingLevel = Exclude<ThinkingLevel, "xhigh">;
|
||||
type ClampedThinkingLevel = Exclude<ThinkingLevel, "xhigh" | "max">;
|
||||
|
||||
function isGemma4Model(model: Model<"google-generative-ai">): boolean {
|
||||
return /gemma-?4/.test(model.id.toLowerCase());
|
||||
|
||||
@@ -498,7 +498,7 @@ function buildParams(
|
||||
return params;
|
||||
}
|
||||
|
||||
type ClampedThinkingLevel = Exclude<PiThinkingLevel, "xhigh">;
|
||||
type ClampedThinkingLevel = Exclude<PiThinkingLevel, "xhigh" | "max">;
|
||||
|
||||
function isGemini3ProModel(model: Model<"google-generative-ai">): boolean {
|
||||
return /gemini-3(?:\.\d+)?-pro/.test(model.id.toLowerCase());
|
||||
|
||||
@@ -80,7 +80,7 @@ const CODEX_RESPONSE_STATUSES = new Set<CodexResponseStatus>([
|
||||
// ============================================================================
|
||||
|
||||
export interface OpenAICodexResponsesOptions extends StreamOptions {
|
||||
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
||||
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
|
||||
reasoningSummary?: "auto" | "concise" | "detailed" | "off" | "on" | null;
|
||||
serviceTier?: ResponseCreateParamsStreaming["service_tier"];
|
||||
textVerbosity?: "low" | "medium" | "high";
|
||||
|
||||
@@ -109,7 +109,7 @@ function isEncryptedReasoningDetail(detail: unknown): detail is OpenAIEncryptedR
|
||||
|
||||
export interface OpenAICompletionsOptions extends StreamOptions {
|
||||
toolChoice?: "auto" | "none" | "required" | { type: "function"; function: { name: string } };
|
||||
reasoningEffort?: "minimal" | "low" | "medium" | "high" | "xhigh";
|
||||
reasoningEffort?: "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
|
||||
}
|
||||
|
||||
interface OpenAICompatCacheControl {
|
||||
|
||||
@@ -78,7 +78,7 @@ function formatOpenAIResponsesError(error: unknown): string {
|
||||
|
||||
// OpenAI Responses-specific options
|
||||
export interface OpenAIResponsesOptions extends StreamOptions {
|
||||
reasoningEffort?: "minimal" | "low" | "medium" | "high" | "xhigh";
|
||||
reasoningEffort?: "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
|
||||
reasoningSummary?: "auto" | "detailed" | "concise" | null;
|
||||
serviceTier?: ResponseCreateParamsStreaming["service_tier"];
|
||||
}
|
||||
|
||||
@@ -44,8 +44,8 @@ export function buildBaseOptions(
|
||||
};
|
||||
}
|
||||
|
||||
export function clampReasoning(effort: ThinkingLevel | undefined): Exclude<ThinkingLevel, "xhigh"> | undefined {
|
||||
return effort === "xhigh" ? "high" : effort;
|
||||
export function clampReasoning(effort: ThinkingLevel | undefined): Exclude<ThinkingLevel, "xhigh" | "max"> | undefined {
|
||||
return effort === "xhigh" || effort === "max" ? "high" : effort;
|
||||
}
|
||||
|
||||
export function adjustMaxTokensForThinking(
|
||||
|
||||
@@ -394,7 +394,7 @@ export function calculateCost<TApi extends Api>(model: Model<TApi>, usage: Usage
|
||||
return usage.cost;
|
||||
}
|
||||
|
||||
const EXTENDED_THINKING_LEVELS: ModelThinkingLevel[] = ["off", "minimal", "low", "medium", "high", "xhigh"];
|
||||
const EXTENDED_THINKING_LEVELS: ModelThinkingLevel[] = ["off", "minimal", "low", "medium", "high", "xhigh", "max"];
|
||||
|
||||
export function getSupportedThinkingLevels<TApi extends Api>(model: Model<TApi>): ModelThinkingLevel[] {
|
||||
if (!model.reasoning) return ["off"];
|
||||
@@ -402,7 +402,7 @@ export function getSupportedThinkingLevels<TApi extends Api>(model: Model<TApi>)
|
||||
return EXTENDED_THINKING_LEVELS.filter((level) => {
|
||||
const mapped = model.thinkingLevelMap?.[level];
|
||||
if (mapped === null) return false;
|
||||
if (level === "xhigh") return mapped !== undefined;
|
||||
if (level === "xhigh" || level === "max") return mapped !== undefined;
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"off":null,"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"off":null,"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 10,
|
||||
@@ -148,7 +148,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"max"},
|
||||
thinkingLevelMap: {"max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -166,7 +166,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -184,7 +184,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -219,6 +219,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 3,
|
||||
@@ -236,6 +237,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 2,
|
||||
@@ -270,7 +272,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"max"},
|
||||
thinkingLevelMap: {"max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 16.5,
|
||||
@@ -288,7 +290,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -323,6 +325,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 3.3,
|
||||
@@ -340,6 +343,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 2,
|
||||
@@ -408,7 +412,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.eu-central-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"off":null,"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"off":null,"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 11,
|
||||
@@ -460,7 +464,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.eu-central-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"max"},
|
||||
thinkingLevelMap: {"max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5.5,
|
||||
@@ -478,7 +482,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.eu-central-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5.5,
|
||||
@@ -496,7 +500,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.eu-central-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5.5,
|
||||
@@ -531,6 +535,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.eu-central-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 3.3,
|
||||
@@ -548,6 +553,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.eu-central-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 2.2,
|
||||
@@ -565,7 +571,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"off":null,"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"off":null,"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 10,
|
||||
@@ -617,7 +623,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"max"},
|
||||
thinkingLevelMap: {"max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -635,7 +641,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -653,7 +659,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -688,6 +694,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 3,
|
||||
@@ -705,6 +712,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 2,
|
||||
@@ -773,7 +781,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -791,7 +799,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -826,6 +834,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 3,
|
||||
@@ -843,6 +852,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 2,
|
||||
@@ -1508,7 +1518,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"off":null,"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"off":null,"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 10,
|
||||
@@ -1577,7 +1587,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"max"},
|
||||
thinkingLevelMap: {"max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -1595,7 +1605,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -1613,7 +1623,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -1648,6 +1658,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 3,
|
||||
@@ -1665,6 +1676,7 @@ export const AMAZON_BEDROCK_MODELS = {
|
||||
provider: "amazon-bedrock",
|
||||
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 2,
|
||||
|
||||
@@ -12,7 +12,7 @@ export const ANTHROPIC_MODELS = {
|
||||
baseUrl: "https://api.anthropic.com",
|
||||
compat: {"forceAdaptiveThinking":true},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"off":null,"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"off":null,"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 10,
|
||||
@@ -133,7 +133,7 @@ export const ANTHROPIC_MODELS = {
|
||||
baseUrl: "https://api.anthropic.com",
|
||||
compat: {"forceAdaptiveThinking":true},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"max"},
|
||||
thinkingLevelMap: {"max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -152,7 +152,7 @@ export const ANTHROPIC_MODELS = {
|
||||
baseUrl: "https://api.anthropic.com",
|
||||
compat: {"forceAdaptiveThinking":true,"supportsTemperature":false},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -171,7 +171,7 @@ export const ANTHROPIC_MODELS = {
|
||||
baseUrl: "https://api.anthropic.com",
|
||||
compat: {"forceAdaptiveThinking":true,"supportsTemperature":false},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -224,6 +224,7 @@ export const ANTHROPIC_MODELS = {
|
||||
baseUrl: "https://api.anthropic.com",
|
||||
compat: {"forceAdaptiveThinking":true},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 3,
|
||||
@@ -242,6 +243,7 @@ export const ANTHROPIC_MODELS = {
|
||||
baseUrl: "https://api.anthropic.com",
|
||||
compat: {"forceAdaptiveThinking":true},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 2,
|
||||
|
||||
@@ -613,7 +613,7 @@ export const AZURE_OPENAI_RESPONSES_MODELS = {
|
||||
provider: "azure-openai-responses",
|
||||
baseUrl: "",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"off":null,"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"off":null,"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -631,7 +631,7 @@ export const AZURE_OPENAI_RESPONSES_MODELS = {
|
||||
provider: "azure-openai-responses",
|
||||
baseUrl: "",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"off":null,"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"off":null,"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 1,
|
||||
@@ -649,7 +649,7 @@ export const AZURE_OPENAI_RESPONSES_MODELS = {
|
||||
provider: "azure-openai-responses",
|
||||
baseUrl: "",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"off":null,"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"off":null,"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -667,7 +667,7 @@ export const AZURE_OPENAI_RESPONSES_MODELS = {
|
||||
provider: "azure-openai-responses",
|
||||
baseUrl: "",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"off":null,"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"off":null,"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 2.5,
|
||||
|
||||
@@ -120,7 +120,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
||||
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
|
||||
compat: {"sendSessionAffinityHeaders":true,"forceAdaptiveThinking":true},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"off":null,"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"off":null,"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 10,
|
||||
@@ -211,7 +211,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
||||
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
|
||||
compat: {"sendSessionAffinityHeaders":true,"forceAdaptiveThinking":true},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"max"},
|
||||
thinkingLevelMap: {"max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -230,7 +230,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
||||
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
|
||||
compat: {"sendSessionAffinityHeaders":true,"forceAdaptiveThinking":true,"supportsTemperature":false},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -249,7 +249,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
||||
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
|
||||
compat: {"sendSessionAffinityHeaders":true,"forceAdaptiveThinking":true,"supportsTemperature":false},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -304,6 +304,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
||||
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
|
||||
compat: {"sendSessionAffinityHeaders":true,"forceAdaptiveThinking":true},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 3,
|
||||
@@ -322,6 +323,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
||||
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
|
||||
compat: {"sendSessionAffinityHeaders":true,"forceAdaptiveThinking":true},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 2,
|
||||
|
||||
@@ -12,7 +12,7 @@ export const DEEPSEEK_MODELS = {
|
||||
baseUrl: "https://api.deepseek.com",
|
||||
compat: {"supportsStore":false,"supportsDeveloperRole":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","max":"max"},
|
||||
input: ["text"],
|
||||
cost: {
|
||||
input: 0.14,
|
||||
@@ -31,7 +31,7 @@ export const DEEPSEEK_MODELS = {
|
||||
baseUrl: "https://api.deepseek.com",
|
||||
compat: {"supportsStore":false,"supportsDeveloperRole":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","max":"max"},
|
||||
input: ["text"],
|
||||
cost: {
|
||||
input: 0.435,
|
||||
|
||||
@@ -66,7 +66,7 @@ export const FIREWORKS_MODELS = {
|
||||
baseUrl: "https://api.fireworks.ai/inference/v1",
|
||||
compat: {"supportsStore":false,"supportsDeveloperRole":false},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"off":"none","minimal":null,"low":"high","medium":"high","xhigh":"max"},
|
||||
thinkingLevelMap: {"off":"none","minimal":null,"low":"high","medium":"high","max":"max"},
|
||||
input: ["text"],
|
||||
cost: {
|
||||
input: 1.4,
|
||||
@@ -229,7 +229,7 @@ export const FIREWORKS_MODELS = {
|
||||
baseUrl: "https://api.fireworks.ai/inference/v1",
|
||||
compat: {"supportsStore":false,"supportsDeveloperRole":false},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"off":"none","minimal":null,"low":"high","medium":"high","xhigh":"max"},
|
||||
thinkingLevelMap: {"off":"none","minimal":null,"low":"high","medium":"high","max":"max"},
|
||||
input: ["text"],
|
||||
cost: {
|
||||
input: 2.1,
|
||||
|
||||
@@ -69,7 +69,7 @@ export const GITHUB_COPILOT_MODELS = {
|
||||
headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},
|
||||
compat: {"forceAdaptiveThinking":true},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"max"},
|
||||
thinkingLevelMap: {"max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -89,7 +89,7 @@ export const GITHUB_COPILOT_MODELS = {
|
||||
headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},
|
||||
compat: {"forceAdaptiveThinking":true,"supportsTemperature":false},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh","minimal":"low"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max","minimal":"low"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -109,7 +109,7 @@ export const GITHUB_COPILOT_MODELS = {
|
||||
headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},
|
||||
compat: {"forceAdaptiveThinking":true,"supportsTemperature":false},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh","minimal":"low"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max","minimal":"low"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -167,7 +167,7 @@ export const GITHUB_COPILOT_MODELS = {
|
||||
headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},
|
||||
compat: {"forceAdaptiveThinking":true},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"minimal":"low","xhigh":"max"},
|
||||
thinkingLevelMap: {"max":"max","minimal":"low"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 3,
|
||||
@@ -187,6 +187,7 @@ export const GITHUB_COPILOT_MODELS = {
|
||||
headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},
|
||||
compat: {"forceAdaptiveThinking":true},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 2,
|
||||
|
||||
@@ -83,7 +83,7 @@ export const OPENAI_CODEX_MODELS = {
|
||||
provider: "openai-codex",
|
||||
baseUrl: "https://chatgpt.com/backend-api",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh","minimal":"low"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max","minimal":"low"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 1,
|
||||
@@ -101,7 +101,7 @@ export const OPENAI_CODEX_MODELS = {
|
||||
provider: "openai-codex",
|
||||
baseUrl: "https://chatgpt.com/backend-api",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh","minimal":"low"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max","minimal":"low"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -119,7 +119,7 @@ export const OPENAI_CODEX_MODELS = {
|
||||
provider: "openai-codex",
|
||||
baseUrl: "https://chatgpt.com/backend-api",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh","minimal":"low"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max","minimal":"low"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 2.5,
|
||||
|
||||
@@ -613,7 +613,7 @@ export const OPENAI_MODELS = {
|
||||
provider: "openai",
|
||||
baseUrl: "https://api.openai.com/v1",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"off":"none","xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"off":"none","xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -631,7 +631,7 @@ export const OPENAI_MODELS = {
|
||||
provider: "openai",
|
||||
baseUrl: "https://api.openai.com/v1",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"off":"none","xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"off":"none","xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 1,
|
||||
@@ -649,7 +649,7 @@ export const OPENAI_MODELS = {
|
||||
provider: "openai",
|
||||
baseUrl: "https://api.openai.com/v1",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"off":"none","xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"off":"none","xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -667,7 +667,7 @@ export const OPENAI_MODELS = {
|
||||
provider: "openai",
|
||||
baseUrl: "https://api.openai.com/v1",
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"off":"none","xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"off":"none","xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 2.5,
|
||||
|
||||
@@ -12,7 +12,7 @@ export const OPENCODE_GO_MODELS = {
|
||||
baseUrl: "https://opencode.ai/zen/go/v1",
|
||||
compat: {"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","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","max":"max"},
|
||||
input: ["text"],
|
||||
cost: {
|
||||
input: 0.14,
|
||||
@@ -31,7 +31,7 @@ export const OPENCODE_GO_MODELS = {
|
||||
baseUrl: "https://opencode.ai/zen/go/v1",
|
||||
compat: {"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","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","max":"max"},
|
||||
input: ["text"],
|
||||
cost: {
|
||||
input: 1.74,
|
||||
@@ -68,7 +68,7 @@ export const OPENCODE_GO_MODELS = {
|
||||
baseUrl: "https://opencode.ai/zen/go/v1",
|
||||
compat: {"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens"},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"max"},
|
||||
thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":"high","max":"max"},
|
||||
input: ["text"],
|
||||
cost: {
|
||||
input: 1.4,
|
||||
|
||||
@@ -30,7 +30,7 @@ export const OPENCODE_MODELS = {
|
||||
baseUrl: "https://opencode.ai/zen",
|
||||
compat: {"forceAdaptiveThinking":true},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"off":null,"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"off":null,"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 10,
|
||||
@@ -100,7 +100,7 @@ export const OPENCODE_MODELS = {
|
||||
baseUrl: "https://opencode.ai/zen",
|
||||
compat: {"forceAdaptiveThinking":true},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"max"},
|
||||
thinkingLevelMap: {"max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -119,7 +119,7 @@ export const OPENCODE_MODELS = {
|
||||
baseUrl: "https://opencode.ai/zen",
|
||||
compat: {"forceAdaptiveThinking":true,"supportsTemperature":false},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -138,7 +138,7 @@ export const OPENCODE_MODELS = {
|
||||
baseUrl: "https://opencode.ai/zen",
|
||||
compat: {"forceAdaptiveThinking":true,"supportsTemperature":false},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -191,6 +191,7 @@ export const OPENCODE_MODELS = {
|
||||
baseUrl: "https://opencode.ai/zen",
|
||||
compat: {"forceAdaptiveThinking":true},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 3,
|
||||
@@ -209,6 +210,7 @@ export const OPENCODE_MODELS = {
|
||||
baseUrl: "https://opencode.ai/zen",
|
||||
compat: {"forceAdaptiveThinking":true},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 2,
|
||||
@@ -227,7 +229,7 @@ export const OPENCODE_MODELS = {
|
||||
baseUrl: "https://opencode.ai/zen/v1",
|
||||
compat: {"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","supportsLongCacheRetention":false,"requiresReasoningContentOnAssistantMessages":true},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"max"},
|
||||
thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","max":"max"},
|
||||
input: ["text"],
|
||||
cost: {
|
||||
input: 0.14,
|
||||
@@ -246,7 +248,7 @@ export const OPENCODE_MODELS = {
|
||||
baseUrl: "https://opencode.ai/zen/v1",
|
||||
compat: {"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","requiresReasoningContentOnAssistantMessages":true},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"max"},
|
||||
thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","max":"max"},
|
||||
input: ["text"],
|
||||
cost: {
|
||||
input: 0,
|
||||
@@ -265,7 +267,7 @@ export const OPENCODE_MODELS = {
|
||||
baseUrl: "https://opencode.ai/zen/v1",
|
||||
compat: {"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","supportsLongCacheRetention":false,"requiresReasoningContentOnAssistantMessages":true},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"max"},
|
||||
thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","max":"max"},
|
||||
input: ["text"],
|
||||
cost: {
|
||||
input: 1.74,
|
||||
|
||||
@@ -282,7 +282,7 @@ export const OPENROUTER_MODELS = {
|
||||
baseUrl: "https://openrouter.ai/api/v1",
|
||||
compat: {"thinkingFormat":"openrouter","cacheControlFormat":"anthropic"},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"max"},
|
||||
thinkingLevelMap: {"max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -301,7 +301,7 @@ export const OPENROUTER_MODELS = {
|
||||
baseUrl: "https://openrouter.ai/api/v1",
|
||||
compat: {"thinkingFormat":"openrouter","cacheControlFormat":"anthropic"},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -320,7 +320,7 @@ export const OPENROUTER_MODELS = {
|
||||
baseUrl: "https://openrouter.ai/api/v1",
|
||||
compat: {"thinkingFormat":"openrouter","cacheControlFormat":"anthropic"},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 30,
|
||||
@@ -339,7 +339,7 @@ export const OPENROUTER_MODELS = {
|
||||
baseUrl: "https://openrouter.ai/api/v1",
|
||||
compat: {"thinkingFormat":"openrouter","cacheControlFormat":"anthropic"},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -358,7 +358,7 @@ export const OPENROUTER_MODELS = {
|
||||
baseUrl: "https://openrouter.ai/api/v1",
|
||||
compat: {"thinkingFormat":"openrouter","cacheControlFormat":"anthropic"},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 10,
|
||||
@@ -413,6 +413,7 @@ export const OPENROUTER_MODELS = {
|
||||
baseUrl: "https://openrouter.ai/api/v1",
|
||||
compat: {"thinkingFormat":"openrouter","cacheControlFormat":"anthropic"},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 3,
|
||||
@@ -431,6 +432,7 @@ export const OPENROUTER_MODELS = {
|
||||
baseUrl: "https://openrouter.ai/api/v1",
|
||||
compat: {"thinkingFormat":"openrouter","cacheControlFormat":"anthropic"},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 2,
|
||||
@@ -791,7 +793,7 @@ export const OPENROUTER_MODELS = {
|
||||
baseUrl: "https://openrouter.ai/api/v1",
|
||||
compat: {"supportsDeveloperRole":false,"thinkingFormat":"openrouter","requiresReasoningContentOnAssistantMessages":true},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","max":null,"xhigh":"xhigh"},
|
||||
input: ["text"],
|
||||
cost: {
|
||||
input: 0.09,
|
||||
@@ -810,7 +812,7 @@ export const OPENROUTER_MODELS = {
|
||||
baseUrl: "https://openrouter.ai/api/v1",
|
||||
compat: {"supportsDeveloperRole":false,"thinkingFormat":"openrouter","requiresReasoningContentOnAssistantMessages":true},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","max":null,"xhigh":"xhigh"},
|
||||
input: ["text"],
|
||||
cost: {
|
||||
input: 0.435,
|
||||
@@ -1486,7 +1488,7 @@ export const OPENROUTER_MODELS = {
|
||||
cacheWrite: 0,
|
||||
},
|
||||
contextWindow: 1048576,
|
||||
maxTokens: 512000,
|
||||
maxTokens: 131072,
|
||||
} satisfies Model<"openai-completions">,
|
||||
"mistralai/codestral-2508": {
|
||||
id: "mistralai/codestral-2508",
|
||||
@@ -2804,7 +2806,7 @@ export const OPENROUTER_MODELS = {
|
||||
baseUrl: "https://openrouter.ai/api/v1",
|
||||
compat: {"thinkingFormat":"openrouter"},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 1,
|
||||
@@ -2823,7 +2825,7 @@ export const OPENROUTER_MODELS = {
|
||||
baseUrl: "https://openrouter.ai/api/v1",
|
||||
compat: {"thinkingFormat":"openrouter"},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 1,
|
||||
@@ -2842,7 +2844,7 @@ export const OPENROUTER_MODELS = {
|
||||
baseUrl: "https://openrouter.ai/api/v1",
|
||||
compat: {"thinkingFormat":"openrouter"},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -2861,7 +2863,7 @@ export const OPENROUTER_MODELS = {
|
||||
baseUrl: "https://openrouter.ai/api/v1",
|
||||
compat: {"thinkingFormat":"openrouter"},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -2880,7 +2882,7 @@ export const OPENROUTER_MODELS = {
|
||||
baseUrl: "https://openrouter.ai/api/v1",
|
||||
compat: {"thinkingFormat":"openrouter"},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 2.5,
|
||||
@@ -2899,7 +2901,7 @@ export const OPENROUTER_MODELS = {
|
||||
baseUrl: "https://openrouter.ai/api/v1",
|
||||
compat: {"thinkingFormat":"openrouter"},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 2.5,
|
||||
|
||||
@@ -522,7 +522,7 @@ export const VERCEL_AI_GATEWAY_MODELS = {
|
||||
baseUrl: "https://ai-gateway.vercel.sh",
|
||||
compat: {"forceAdaptiveThinking":true},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"off":null,"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"off":null,"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 10,
|
||||
@@ -609,7 +609,7 @@ export const VERCEL_AI_GATEWAY_MODELS = {
|
||||
baseUrl: "https://ai-gateway.vercel.sh",
|
||||
compat: {"forceAdaptiveThinking":true},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"max"},
|
||||
thinkingLevelMap: {"max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -628,7 +628,7 @@ export const VERCEL_AI_GATEWAY_MODELS = {
|
||||
baseUrl: "https://ai-gateway.vercel.sh",
|
||||
compat: {"forceAdaptiveThinking":true,"supportsTemperature":false},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -647,7 +647,7 @@ export const VERCEL_AI_GATEWAY_MODELS = {
|
||||
baseUrl: "https://ai-gateway.vercel.sh",
|
||||
compat: {"forceAdaptiveThinking":true,"supportsTemperature":false},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh"},
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 5,
|
||||
@@ -700,6 +700,7 @@ export const VERCEL_AI_GATEWAY_MODELS = {
|
||||
baseUrl: "https://ai-gateway.vercel.sh",
|
||||
compat: {"forceAdaptiveThinking":true},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 3,
|
||||
@@ -718,6 +719,7 @@ export const VERCEL_AI_GATEWAY_MODELS = {
|
||||
baseUrl: "https://ai-gateway.vercel.sh",
|
||||
compat: {"forceAdaptiveThinking":true},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"xhigh":"xhigh","max":"max"},
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 2,
|
||||
|
||||
@@ -84,7 +84,7 @@ export const ZAI_CODING_CN_MODELS = {
|
||||
baseUrl: "https://open.bigmodel.cn/api/coding/paas/v4",
|
||||
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"thinkingFormat":"zai","zaiToolStream":true},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"minimal":null,"low":"high","medium":"high","high":"high","xhigh":"max"},
|
||||
thinkingLevelMap: {"minimal":null,"low":"high","medium":"high","high":"high","max":"max"},
|
||||
input: ["text"],
|
||||
cost: {
|
||||
input: 0,
|
||||
|
||||
@@ -84,7 +84,7 @@ export const ZAI_MODELS = {
|
||||
baseUrl: "https://api.z.ai/api/coding/paas/v4",
|
||||
compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":true,"thinkingFormat":"zai","zaiToolStream":true},
|
||||
reasoning: true,
|
||||
thinkingLevelMap: {"minimal":null,"low":"high","medium":"high","high":"high","xhigh":"max"},
|
||||
thinkingLevelMap: {"minimal":null,"low":"high","medium":"high","high":"high","max":"max"},
|
||||
input: ["text"],
|
||||
cost: {
|
||||
input: 0,
|
||||
|
||||
@@ -71,7 +71,7 @@ export type KnownImagesProvider = "openrouter";
|
||||
|
||||
export type ImagesProviderId = KnownImagesProvider | string;
|
||||
|
||||
export type ThinkingLevel = "minimal" | "low" | "medium" | "high" | "xhigh";
|
||||
export type ThinkingLevel = "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
|
||||
export type ModelThinkingLevel = "off" | ThinkingLevel;
|
||||
export type ThinkingLevelMap = Partial<Record<ModelThinkingLevel, string | null>>;
|
||||
export type ChatTemplateKwargValue =
|
||||
|
||||
Reference in New Issue
Block a user