feat(ai): add Claude Fable 5 metadata

This commit is contained in:
Armin Ronacher
2026-06-09 22:42:48 +02:00
parent a0c2465d47
commit 5a9d72ea02
7 changed files with 60 additions and 6 deletions

View File

@@ -232,7 +232,8 @@ function isAnthropicAdaptiveThinkingModel(modelId: string): boolean {
modelId.includes("opus-4-8") ||
modelId.includes("opus-4.8") ||
modelId.includes("sonnet-4-6") ||
modelId.includes("sonnet-4.6")
modelId.includes("sonnet-4.6") ||
modelId.includes("fable-5")
);
}
@@ -294,6 +295,12 @@ function applyThinkingLevelMetadata(model: Model<any>): void {
) {
mergeThinkingLevelMap(model, { xhigh: "xhigh" });
}
if (
(model.api === "anthropic-messages" || model.api === "bedrock-converse-stream") &&
model.id.includes("fable-5")
) {
mergeThinkingLevelMap(model, { xhigh: "xhigh" });
}
if (model.api === "anthropic-messages" && isAnthropicAdaptiveThinkingModel(model.id)) {
mergeAnthropicMessagesCompat(model, { forceAdaptiveThinking: true });
}