Skip to content

Commit 06dd378

Browse files
fix(anthropic): preserve Claude image capability
1 parent 6fefa7e commit 06dd378

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

extensions/anthropic/register.runtime.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -381,13 +381,9 @@ function hasImageInput(input: unknown): boolean {
381381
}
382382

383383
function supportsAnthropicImageInput(modelId: string, modelName?: string): boolean {
384-
const candidates = [modelId, modelName]
384+
return [modelId, modelName]
385385
.filter((value): value is string => typeof value === "string")
386-
.map((value) => normalizeLowercaseStringOrEmpty(value))
387-
.filter(Boolean);
388-
return candidates.some((candidate) =>
389-
ANTHROPIC_MODERN_MODEL_PREFIXES.some((prefix) => candidate.startsWith(prefix)),
390-
);
386+
.some((candidate) => matchesAnthropicModernModel(candidate));
391387
}
392388

393389
function applyAnthropicImageInputCapability(params: {

0 commit comments

Comments
 (0)