Skip to content

Commit 2f2e888

Browse files
committed
Merge branch 'master' of github.com:di-sukharev/opencommit
2 parents 4fc8284 + de5d5cb commit 2f2e888

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/engine/anthropic.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,14 @@ export class AnthropicEngine implements AiEngine {
3535
system: systemMessage,
3636
messages: restMessages,
3737
temperature: 0,
38-
top_p: 0.1,
3938
max_tokens: this.config.maxTokensOutput
4039
};
40+
41+
// add top_p for non-4.5 models
42+
if (!/claude.*-4-5/.test(params.model)) {
43+
params.top_p = 0.1;
44+
}
45+
4146
try {
4247
const REQUEST_TOKENS = messages
4348
.map((msg) => tokenCount(msg.content as string) + 4)

0 commit comments

Comments
 (0)