From f6d242e82a078a95b87fd5b8accf3860cd2febcb Mon Sep 17 00:00:00 2001 From: Patrick Sullivan Date: Tue, 16 Jun 2026 22:09:28 -0700 Subject: [PATCH] fix: swap retired Sonnet 4 for Sonnet 4.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit claude-sonnet-4-20250514 (Claude Sonnet 4) was retired on 2026-06-15 and now returns 404 not_found_error on every request. Because the main chat() call threw, the bot marked incoming messages as read and started the typing indicator (those API calls succeeded) but never sent a reply. Swap to claude-sonnet-4-6, the documented drop-in replacement. No other changes needed — the call uses no budget_tokens, prefills, or sampling params. Mirrors the earlier Haiku 3.5 -> 4.5 fix (#9). Co-Authored-By: Claude Opus 4.8 (1M context) --- src/claude/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/claude/client.ts b/src/claude/client.ts index 8e16a9a..cad5707 100644 --- a/src/claude/client.ts +++ b/src/claude/client.ts @@ -572,7 +572,7 @@ export async function chat(chatId: string, userMessage: string, images: ImageInp } const response = await client.messages.create({ - model: 'claude-sonnet-4-20250514', + model: 'claude-sonnet-4-6', max_tokens: 1024, system: buildSystemPrompt(chatContext), tools,