From 5e654243700b1c500cab2f318385d759fecdba1b Mon Sep 17 00:00:00 2001 From: ts00 Date: Tue, 28 Apr 2026 20:57:10 -0300 Subject: [PATCH] fix(slack-agent): default to claude-sonnet-4-6 (4-7 doesn't exist) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I picked claude-sonnet-4-7 as the default model in Phase 3b based on the existing claude-opus-4-7 reference in the codebase. Anthropic only ships Opus at 4-7 — Sonnet's latest alias is 4-6. The agent was 404ing on every Slack message after Phase 3b shipped: NotFoundError: 404 {"type":"error","error":{"type":"not_found_error", "message":"model: claude-sonnet-4-7"}} Fix: default to claude-sonnet-4-6 (verified live via /v1/models with the dev Anthropic key). Operators can still override with RM_SLACK_AGENT_MODEL. Caught from dev journalctl after the user reported a 404 trying to chat the bot. Made-with: Cursor --- src/slack-agent.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/slack-agent.ts b/src/slack-agent.ts index 93cc3bc..ff63565 100644 --- a/src/slack-agent.ts +++ b/src/slack-agent.ts @@ -20,7 +20,10 @@ import type Database from "better-sqlite3"; import { buildAgentTools } from "./slack-agent-tools.js"; import type { StoredMessage } from "./slack-conversation-service.js"; -const DEFAULT_MODEL = "claude-sonnet-4-7"; +// Latest Sonnet alias as of 2026-04. Override via RM_SLACK_AGENT_MODEL. +// (There's no claude-sonnet-4-7 yet — only Opus jumped to 4-7. Verified +// via Anthropic /v1/models on 2026-04-28.) +const DEFAULT_MODEL = "claude-sonnet-4-6"; const DEFAULT_MAX_TOKENS = 2048; const MAX_AGENT_STEPS = 6;