From 0ccf3095198ebb8ad650e5e1f495dcaf023ff8d7 Mon Sep 17 00:00:00 2001 From: richardclim <61879224+richardclim@users.noreply.github.com> Date: Wed, 26 Feb 2025 02:45:21 -0500 Subject: [PATCH] sonnet 3.7 fix --- app/client/platforms/anthropic.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/client/platforms/anthropic.ts b/app/client/platforms/anthropic.ts index 634dec0ea..aa323febd 100644 --- a/app/client/platforms/anthropic.ts +++ b/app/client/platforms/anthropic.ts @@ -188,9 +188,11 @@ export class ClaudeApi implements LLMApi { stream: shouldStream, model: modelConfig.model, - max_tokens: modelConfig.max_tokens, - temperature: modelConfig.model === "claude-3-7-sonnet-20250219" ? 1 : modelConfig.temperature, - top_p: modelConfig.top_p, + max_tokens:modelConfig.model === "claude-3-7-sonnet-20250219" ? 64000 : modelConfig.max_tokens, + ...(modelConfig.model !== "claude-3-7-sonnet-20250219" && { + temperature: modelConfig.temperature, + top_p: modelConfig.top_p + }), // top_k: modelConfig.top_k, // top_k: 5, thinking: {