fix(ai): add temporary Anthropic Opus 4.7 model override
This commit is contained in:
@@ -769,6 +769,27 @@ async function generateModels() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add missing Claude Opus 4.7
|
||||||
|
if (!allModels.some(m => m.provider === "anthropic" && m.id === "claude-opus-4-7")) {
|
||||||
|
allModels.push({
|
||||||
|
id: "claude-opus-4-7",
|
||||||
|
name: "Claude Opus 4.7",
|
||||||
|
api: "anthropic-messages",
|
||||||
|
baseUrl: "https://api.anthropic.com",
|
||||||
|
provider: "anthropic",
|
||||||
|
reasoning: true,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 5,
|
||||||
|
output: 25,
|
||||||
|
cacheRead: 0.5,
|
||||||
|
cacheWrite: 6.25,
|
||||||
|
},
|
||||||
|
contextWindow: 1000000,
|
||||||
|
maxTokens: 128000,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Add missing Claude Sonnet 4.6
|
// Add missing Claude Sonnet 4.6
|
||||||
if (!allModels.some(m => m.provider === "anthropic" && m.id === "claude-sonnet-4-6")) {
|
if (!allModels.some(m => m.provider === "anthropic" && m.id === "claude-sonnet-4-6")) {
|
||||||
allModels.push({
|
allModels.push({
|
||||||
|
|||||||
@@ -1775,6 +1775,23 @@ export const MODELS = {
|
|||||||
contextWindow: 1000000,
|
contextWindow: 1000000,
|
||||||
maxTokens: 128000,
|
maxTokens: 128000,
|
||||||
} satisfies Model<"anthropic-messages">,
|
} satisfies Model<"anthropic-messages">,
|
||||||
|
"claude-opus-4-7": {
|
||||||
|
id: "claude-opus-4-7",
|
||||||
|
name: "Claude Opus 4.7",
|
||||||
|
api: "anthropic-messages",
|
||||||
|
provider: "anthropic",
|
||||||
|
baseUrl: "https://api.anthropic.com",
|
||||||
|
reasoning: true,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 5,
|
||||||
|
output: 25,
|
||||||
|
cacheRead: 0.5,
|
||||||
|
cacheWrite: 6.25,
|
||||||
|
},
|
||||||
|
contextWindow: 1000000,
|
||||||
|
maxTokens: 128000,
|
||||||
|
} satisfies Model<"anthropic-messages">,
|
||||||
"claude-sonnet-4-0": {
|
"claude-sonnet-4-0": {
|
||||||
id: "claude-sonnet-4-0",
|
id: "claude-sonnet-4-0",
|
||||||
name: "Claude Sonnet 4 (latest)",
|
name: "Claude Sonnet 4 (latest)",
|
||||||
@@ -7115,6 +7132,23 @@ export const MODELS = {
|
|||||||
contextWindow: 1000000,
|
contextWindow: 1000000,
|
||||||
maxTokens: 128000,
|
maxTokens: 128000,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
|
"anthropic/claude-opus-4.7": {
|
||||||
|
id: "anthropic/claude-opus-4.7",
|
||||||
|
name: "Anthropic: Claude Opus 4.7",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "openrouter",
|
||||||
|
baseUrl: "https://openrouter.ai/api/v1",
|
||||||
|
reasoning: true,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 5,
|
||||||
|
output: 25,
|
||||||
|
cacheRead: 0.5,
|
||||||
|
cacheWrite: 6.25,
|
||||||
|
},
|
||||||
|
contextWindow: 1000000,
|
||||||
|
maxTokens: 128000,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
"anthropic/claude-sonnet-4": {
|
"anthropic/claude-sonnet-4": {
|
||||||
id: "anthropic/claude-sonnet-4",
|
id: "anthropic/claude-sonnet-4",
|
||||||
name: "Anthropic: Claude Sonnet 4",
|
name: "Anthropic: Claude Sonnet 4",
|
||||||
@@ -7753,13 +7787,13 @@ export const MODELS = {
|
|||||||
reasoning: true,
|
reasoning: true,
|
||||||
input: ["text", "image"],
|
input: ["text", "image"],
|
||||||
cost: {
|
cost: {
|
||||||
input: 0.08,
|
input: 0.07,
|
||||||
output: 0.35,
|
output: 0.39999999999999997,
|
||||||
cacheRead: 0.01,
|
cacheRead: 0.04,
|
||||||
cacheWrite: 0,
|
cacheWrite: 0,
|
||||||
},
|
},
|
||||||
contextWindow: 262144,
|
contextWindow: 262144,
|
||||||
maxTokens: 4096,
|
maxTokens: 262144,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
"google/gemma-4-26b-a4b-it:free": {
|
"google/gemma-4-26b-a4b-it:free": {
|
||||||
id: "google/gemma-4-26b-a4b-it:free",
|
id: "google/gemma-4-26b-a4b-it:free",
|
||||||
@@ -8456,7 +8490,7 @@ export const MODELS = {
|
|||||||
cacheWrite: 0,
|
cacheWrite: 0,
|
||||||
},
|
},
|
||||||
contextWindow: 131072,
|
contextWindow: 131072,
|
||||||
maxTokens: 131072,
|
maxTokens: 32768,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
"moonshotai/kimi-k2-0905": {
|
"moonshotai/kimi-k2-0905": {
|
||||||
id: "moonshotai/kimi-k2-0905",
|
id: "moonshotai/kimi-k2-0905",
|
||||||
@@ -11452,6 +11486,23 @@ export const MODELS = {
|
|||||||
contextWindow: 1000000,
|
contextWindow: 1000000,
|
||||||
maxTokens: 128000,
|
maxTokens: 128000,
|
||||||
} satisfies Model<"anthropic-messages">,
|
} satisfies Model<"anthropic-messages">,
|
||||||
|
"anthropic/claude-opus-4.7": {
|
||||||
|
id: "anthropic/claude-opus-4.7",
|
||||||
|
name: "Claude Opus 4.7",
|
||||||
|
api: "anthropic-messages",
|
||||||
|
provider: "vercel-ai-gateway",
|
||||||
|
baseUrl: "https://ai-gateway.vercel.sh",
|
||||||
|
reasoning: true,
|
||||||
|
input: ["text", "image"],
|
||||||
|
cost: {
|
||||||
|
input: 5,
|
||||||
|
output: 25,
|
||||||
|
cacheRead: 0.5,
|
||||||
|
cacheWrite: 6.25,
|
||||||
|
},
|
||||||
|
contextWindow: 1000000,
|
||||||
|
maxTokens: 128000,
|
||||||
|
} satisfies Model<"anthropic-messages">,
|
||||||
"anthropic/claude-sonnet-4": {
|
"anthropic/claude-sonnet-4": {
|
||||||
id: "anthropic/claude-sonnet-4",
|
id: "anthropic/claude-sonnet-4",
|
||||||
name: "Claude Sonnet 4",
|
name: "Claude Sonnet 4",
|
||||||
|
|||||||
Reference in New Issue
Block a user