diff --git a/src/engine/anthropic.ts b/src/engine/anthropic.ts index 7dbc5936..8c7d4c51 100644 --- a/src/engine/anthropic.ts +++ b/src/engine/anthropic.ts @@ -37,9 +37,14 @@ export class AnthropicEngine implements AiEngine { system: systemMessage, messages: restMessages, temperature: 0, - top_p: 0.1, max_tokens: this.config.maxTokensOutput }; + + // add top_p for non-4.5 models + if (!/claude.*-4-5/.test(params.model)) { + params.top_p = 0.1; + } + try { const REQUEST_TOKENS = messages .map((msg) => tokenCount(msg.content as string) + 4)