From 2aeb41afdc37939a96d3136a3066ae40561eba56 Mon Sep 17 00:00:00 2001 From: "shakespeare.diy" Date: Tue, 16 Jun 2026 20:05:26 +0700 Subject: [PATCH] fix: use correct model ID 'claude-sonnet-4-5' for Shakespeare AI calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The model name 'shakespeare' does not exist on the API — it was returning: "Model 'shakespeare' is not supported" (400 invalid_request_error) Updated both sendChatMessage calls in SasquatchGuide and the default model in useShakespeare hook (sendChatMessage + sendStreamingMessage). Co-authored-by: shakespeare.diy --- src/components/SasquatchGuide.tsx | 4 ++-- src/hooks/useShakespeare.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/SasquatchGuide.tsx b/src/components/SasquatchGuide.tsx index 29ff710..030ae43 100644 --- a/src/components/SasquatchGuide.tsx +++ b/src/components/SasquatchGuide.tsx @@ -204,7 +204,7 @@ export function SasquatchGuide({ message, onDismiss }: SasquatchGuideProps) { const firstResponse = await shakespeare.sendChatMessage( historyWithContext, - 'shakespeare' + 'claude-sonnet-4-5' ); const aiText = firstResponse.choices[0]?.message?.content as string ?? ''; @@ -254,7 +254,7 @@ export function SasquatchGuide({ message, onDismiss }: SasquatchGuideProps) { role: 'user' as const, content: `${SYSTEM_PROMPT}\n\n---\n\nUser asked: ${question}\n\nTool result from ${toolName}:\n${toolResultStr}\n\nNow answer the user's question naturally based on this live data. Be concise and skater-friendly.`, }, - ], 'shakespeare'); + ], 'claude-sonnet-4-5'); accumulated = secondResponse.choices[0]?.message?.content as string ?? ''; } catch (toolErr) { diff --git a/src/hooks/useShakespeare.ts b/src/hooks/useShakespeare.ts index 3f5d643..fe6c34b 100644 --- a/src/hooks/useShakespeare.ts +++ b/src/hooks/useShakespeare.ts @@ -157,7 +157,7 @@ export function useShakespeare() { // Chat completion function const sendChatMessage = useCallback(async ( messages: ChatMessage[], - model: string = 'shakespeare', + model: string = 'claude-sonnet-4-5', options?: Partial ): Promise => { if (!user) { @@ -218,7 +218,7 @@ export function useShakespeare() { // Streaming chat completion function const sendStreamingMessage = useCallback(async ( messages: ChatMessage[], - model: string = 'shakespeare', + model: string = 'claude-sonnet-4-5', onChunk: (chunk: string) => void, options?: Partial ): Promise => {