Fix Bedrock blank text blocks

closes #4975
This commit is contained in:
Mario Zechner
2026-06-01 18:03:49 +02:00
parent 893ba99466
commit 34719d3f4f
4 changed files with 187 additions and 60 deletions

View File

@@ -394,8 +394,8 @@ export const MODELS = {
thinkingLevelMap: {"xhigh":"max"},
input: ["text", "image"],
cost: {
input: 5,
output: 25,
input: 5.5,
output: 27.5,
cacheRead: 0.5,
cacheWrite: 6.25,
},
@@ -412,10 +412,10 @@ export const MODELS = {
thinkingLevelMap: {"xhigh":"xhigh"},
input: ["text", "image"],
cost: {
input: 5,
output: 25,
cacheRead: 0.5,
cacheWrite: 6.25,
input: 5.5,
output: 27.5,
cacheRead: 0.55,
cacheWrite: 6.875,
},
contextWindow: 1000000,
maxTokens: 128000,
@@ -430,10 +430,10 @@ export const MODELS = {
thinkingLevelMap: {"xhigh":"xhigh"},
input: ["text", "image"],
cost: {
input: 5,
output: 25,
cacheRead: 0.5,
cacheWrite: 6.25,
input: 5.5,
output: 27.5,
cacheRead: 0.55,
cacheWrite: 6.875,
},
contextWindow: 1000000,
maxTokens: 128000,
@@ -447,10 +447,10 @@ export const MODELS = {
reasoning: true,
input: ["text", "image"],
cost: {
input: 3,
output: 15,
cacheRead: 0.3,
cacheWrite: 3.75,
input: 3.3,
output: 16.5,
cacheRead: 0.33,
cacheWrite: 4.125,
},
contextWindow: 200000,
maxTokens: 64000,
@@ -464,10 +464,10 @@ export const MODELS = {
reasoning: true,
input: ["text", "image"],
cost: {
input: 3,
output: 15,
cacheRead: 0.3,
cacheWrite: 3.75,
input: 3.3,
output: 16.5,
cacheRead: 0.33,
cacheWrite: 4.125,
},
contextWindow: 1000000,
maxTokens: 64000,
@@ -2990,25 +2990,6 @@ export const MODELS = {
contextWindow: 1000000,
maxTokens: 128000,
} satisfies Model<"anthropic-messages">,
"claude-opus-4-8": {
id: "claude-opus-4-8",
name: "Claude Opus 4.8",
api: "anthropic-messages",
provider: "cloudflare-ai-gateway",
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
compat: {"forceAdaptiveThinking":true},
reasoning: true,
thinkingLevelMap: {"xhigh":"xhigh"},
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": {
id: "claude-sonnet-4",
name: "Claude Sonnet 4 (latest)",
@@ -12066,6 +12047,23 @@ export const MODELS = {
contextWindow: 32768,
maxTokens: 32768,
} satisfies Model<"openai-completions">,
"upstage/solar-pro-3": {
id: "upstage/solar-pro-3",
name: "Upstage: Solar Pro 3",
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
input: ["text"],
cost: {
input: 0.15,
output: 0.6,
cacheRead: 0.015,
cacheWrite: 0,
},
contextWindow: 128000,
maxTokens: 4096,
} satisfies Model<"openai-completions">,
"x-ai/grok-4.20": {
id: "x-ai/grok-4.20",
name: "xAI: Grok 4.20",
@@ -15131,6 +15129,23 @@ export const MODELS = {
contextWindow: 200000,
maxTokens: 8000,
} satisfies Model<"anthropic-messages">,
"stepfun/step-3.5-flash": {
id: "stepfun/step-3.5-flash",
name: "StepFun 3.5 Flash",
api: "anthropic-messages",
provider: "vercel-ai-gateway",
baseUrl: "https://ai-gateway.vercel.sh",
reasoning: true,
input: ["text"],
cost: {
input: 0.09,
output: 0.3,
cacheRead: 0,
cacheWrite: 0.02,
},
contextWindow: 262114,
maxTokens: 262114,
} satisfies Model<"anthropic-messages">,
"stepfun/step-3.7-flash": {
id: "stepfun/step-3.7-flash",
name: "Step 3.7 Flash",