-
Notifications
You must be signed in to change notification settings - Fork 389
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Opencommit Version
3.2.10
Node Version
22.18.0
NPM Version
10.9.3
What OS are you seeing the problem on?
Other Linux Distro
What happened?
(Linux distro: NixOS)
i set my OCO_MODEL to claude-haiku-4-5
with the anthropic
provider, and i get the following message when i run oco
:
┌ opencommit
│
◓ Generating commit message
│
└ ✖ 400 {"type":"error","error":{"type":"invalid_request_error","message":"`temperature` and `top_p` cannot both be specified for this model. Please use only one."},"request_id":"req_011CUK6BqmnBWwnEtihUBmak"}
│
└ ✖ Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"`temperature` and `top_p` cannot both be specified for this model. Please use only one."},"request_id":"req_011CUK6BqmnBWwnEtihUBmak"}
Expected Behavior
opencommit should only set one of temperature
or top_p
for Claude models that don't support both, and it should successfully generate a commit message
Current Behavior
opencommit cannot generate commit messages with Haiku 4.5 because Anthropic doesn't allow both temperature
and top_p
parameters to be set
Possible Solution
remove either temperature
or top_p
from the parameters object when sending requests to Anthropic, optionally only for Haiku 4.5 (and other models with this issue, if applicable)
Steps to Reproduce
- set
OCO_MODEL=claude-haiku-4-5
- and
OCO_AI_PROVIDER=anthropic
- run
oco
orgit commit
afteroco hook set
Relevant log output
┌ opencommit
│
◓ Generating commit message
│
└ ✖ 400 {"type":"error","error":{"type":"invalid_request_error","message":"`temperature` and `top_p` cannot both be specified for this model. Please use only one."},"request_id":"req_011CUK6BqmnBWwnEtihUBmak"}
│
└ ✖ Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"`temperature` and `top_p` cannot both be specified for this model. Please use only one."},"request_id":"req_011CUK6BqmnBWwnEtihUBmak"}
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working