Skip to content

Commit 079c458

Browse files
authored
normalize anthropic model string when resolving prompt to support 4.5 models (#1806)
1 parent e2be7a6 commit 079c458

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/extension/prompts/node/agent/anthropicPrompts.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,9 @@ class AnthropicPromptResolver implements IAgentPrompt {
211211
static readonly familyPrefixes = ['claude', 'Anthropic'];
212212

213213
resolvePrompt(endpoint: IChatEndpoint): PromptConstructor | undefined {
214-
215-
if (endpoint.model?.startsWith('claude-sonnet-4.5') ||
216-
endpoint.model?.startsWith('claude-haiku-4.5')) {
214+
const normalizedModel = endpoint.model?.replace(/\./g, '-');
215+
if (normalizedModel?.startsWith('claude-sonnet-4-5') ||
216+
normalizedModel?.startsWith('claude-haiku-4-5')) {
217217
return Claude45DefaultPrompt;
218218
}
219219
return DefaultAnthropicAgentPrompt;

0 commit comments

Comments
 (0)