fix(ci): repair failing test expectations

This commit is contained in:
Armin Ronacher
2026-05-03 00:04:27 +02:00
parent cd5bfd04d7
commit b9efafc535
2 changed files with 12 additions and 7 deletions

View File

@@ -494,10 +494,17 @@ function supportsAdaptiveThinking(modelId: string, modelName?: string): boolean
return candidates.some((s) => s.includes("opus-4-6") || s.includes("opus-4-7") || s.includes("sonnet-4-6"));
}
function supportsNativeXhighEffort(model: Model<"bedrock-converse-stream">): boolean {
const candidates = getModelMatchCandidates(model.id, model.name);
return candidates.some((s) => s.includes("opus-4-7"));
}
function mapThinkingLevelToEffort(
model: Model<"bedrock-converse-stream">,
level: SimpleStreamOptions["reasoning"],
): "low" | "medium" | "high" | "xhigh" | "max" {
if (level === "xhigh" && supportsNativeXhighEffort(model)) return "xhigh";
const mapped = level ? model.thinkingLevelMap?.[level] : undefined;
if (typeof mapped === "string") return mapped as "low" | "medium" | "high" | "xhigh" | "max";