From 4aebbc87983beb44be167ce2804f0efce959d4e9 Mon Sep 17 00:00:00 2001 From: "shakespeare.diy" Date: Tue, 16 Jun 2026 19:36:24 +0700 Subject: [PATCH] fix: use correct 'shakespeare' model name in SasquatchGuide AI calls Co-authored-by: shakespeare.diy --- src/components/SasquatchGuide.tsx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/components/SasquatchGuide.tsx b/src/components/SasquatchGuide.tsx index 0caf217..234a798 100644 --- a/src/components/SasquatchGuide.tsx +++ b/src/components/SasquatchGuide.tsx @@ -225,9 +225,14 @@ export function SasquatchGuide({ message, onDismiss }: SasquatchGuideProps) { let accumulated = ''; // First pass: get AI response which may include a TOOL: call + // Inject system prompt as first user message if system role unsupported + const messagesWithSystem = [ + { role: 'system' as const, content: SYSTEM_PROMPT }, + ...history, + ]; const firstResponse = await shakespeare.sendChatMessage( - [{ role: 'system', content: SYSTEM_PROMPT }, ...history], - 'shakespeare/claude-sonnet-4-5' + messagesWithSystem, + 'shakespeare' ); const aiText = firstResponse.choices[0]?.message?.content as string ?? ''; @@ -273,14 +278,14 @@ export function SasquatchGuide({ message, onDismiss }: SasquatchGuideProps) { setStreamingText(''); const toolResultStr = JSON.stringify(toolResult, null, 2); const secondResponse = await shakespeare.sendChatMessage([ - { role: 'system', content: SYSTEM_PROMPT }, + { role: 'system' as const, content: SYSTEM_PROMPT }, ...history, - { role: 'assistant', content: aiText }, + { role: 'assistant' as const, content: aiText }, { - role: 'user', - content: `Tool result from ${toolName}:\n${toolResultStr}\n\nNow answer the user's question naturally based on this live data.`, + role: 'user' as const, + content: `Tool 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'); + ], 'shakespeare'); accumulated = secondResponse.choices[0]?.message?.content as string ?? ''; } catch (toolErr) {