opencommit
opencommit copied to clipboard
[Bug]: Unsupported config key `OCO_MODEL` error when using `oco` command
Opencommit Version
v1.0.2 / latest
Node Version
18.17.0
NPM Version
10.5.0
What OS are you seeing the problem on?
Mac
What happened?
Unsupported config key OCO_MODEL
error when using oco
command
Description
When trying to use the oco
command in my terminal, I encountered an error message stating that the config key OCO_MODEL
is unsupported. The error persists even when I try to set the OCO_MODEL
to one of the suggested values.
Steps to Reproduce
-
Open the terminal
-
Run
oco --version
-
Observe the following error message:
oco --version │ └ ✖ Unsupported config key OCO_MODEL: gpt-3.5-turbo-16k is not supported yet, use 'gpt-4', 'gpt-3.5-turbo' (default), 'gpt-3.5-turbo-0125', 'gpt-4-1106-preview', 'gpt-4-turbo-preview' or 'gpt-4-0125-preview'
-
Attempt to set the
OCO_MODEL
usingoco config set OCO_MODEL=gpt-4-turbo-preview
oco config set OCO_MODEL=gpt-4-turbo-preview │ └ ✖ Unsupported config key OCO_MODEL: gpt-3.5-turbo-16k is not supported yet, use 'gpt-4', 'gpt-3.5-turbo' (default), 'gpt-3.5-turbo-0125', 'gpt-4-1106-preview', 'gpt-4-turbo-preview' or 'gpt-4-0125-preview'
Environment
- Operating System: macOS
- Shell: zsh
Expected Behavior
I expected the oco
command to work without any errors, and the OCO_MODEL
configuration to be set successfully when using one of the suggested values.
Current Behavior
The oco
command consistently throws an error message about the unsupported OCO_MODEL
config key, even when attempting to set it to one of the suggested values.
Possible Solution
No response
Steps to Reproduce
No response
Relevant log output
No response
Same bug here
I was able to solve it by opening the .opencommit
file that is usually created in your user root directory.
I opened it with VS Code and manually changed the model. Then I saved it, and it worked perfectly for me.
The model I used was gpt-3.5-turbo
; previously, I had gpt-3.5-turbo-16k
.
@br-programmer Thanks! I opened the .opencommit and switched the OCO_MODEL manually and it worked.
Share the environment when it works.
node -v
v18.17.0
npm -v
10.5.0
oco --version
3.0.12
Not sure what caused this and if there is a solution other than manual editing.
lets keep this opened please, this is not an expected behaviour @watagori you experienced this on version v1.0.2?
Experienced the exact same issue.
I was unable to execute any command, including getting the version, until the .opencommit
file was manually edited.
oco --version
3.0.12
node -v
v20.11.1
npm -v
10.2.4
i experienced the same issue once i updated the opencommit to the last version
oco --version
3.0.12
node -v
v20.11.0
npm -v
10.2.4
also tried this command but it doesnt work
oco config set OCO_MODEL=gpt-3.5-turbo
│
└ ✖ Unsupported config key OCO_MODEL: gpt-3.5-turbo-16k is not supported yet, use 'gpt-4', 'gpt-3.5-turbo' (default), 'gpt-3.5-turbo-0125', 'gpt-4-1106-preview', 'gpt-4-turbo-preview' or 'gpt-4-0125-preview'
Edited manually and it works
@WMOH-DEV do you know what version you were running before?
@seanmccabe do you know what version you were running before?
@WMOH-DEV do you know what version you were running before?
I think 3.0.11
Im getting the same error after updating to the latest version.
- oco config set OCO_MODEL=gpt-3.5-turbo
- Unsupported config key OCO_MODEL: gpt-3.5-turbo-16k is not supported yet, use 'gpt-4', 'gpt-3.5-turbo' (default), 'gpt-3.5-turbo-0125', 'gpt-4-1106-preview', 'gpt-4-turbo-preview' or 'gpt-4-0125-preview'
I rolled back to v3.0.11 and it works fine.
@Champkinz try 3.0.18 released today, it allows any string for OCO_MODEL — so we dont need to make a PR every time new model is released.
if it doesnt work — do this:
- run
whereis opencommit
(macos, idk for windows, sry) - it should yield smth like
/Users/you/.nvm/versions/node/v20.10.0/bin/opencommit
- this v20.10.0 has
/node_modules
- opencommit should be installed there as a global package
- delete
/opencommit
- install again
npm run -g opencommit@latest
Since updating to 3.0.18, I get the following error.
❯ oco --version
│
└ ✖ Unsupported model gpt-4o-mini. the model can be any string, but the current configuration is not supported.
As you suggest, I removed /opencommit
and then installed the latest version.
npm install -g opencommit@latest
Does the following information help you fix it?
❯ cat .opencommit
OCO_OPENAI_API_KEY=***
OCO_ANTHROPIC_API_KEY=undefined
OCO_AZURE_API_KEY=undefined
OCO_GEMINI_API_KEY=undefined
OCO_TOKENS_MAX_INPUT=undefined
OCO_TOKENS_MAX_OUTPUT=undefined
OCO_OPENAI_BASE_PATH=undefined
OCO_GEMINI_BASE_PATH=undefined
OCO_DESCRIPTION=false
OCO_EMOJI=false
OCO_MODEL=gpt-4o-mini
OCO_LANGUAGE=en
OCO_MESSAGE_TEMPLATE_PLACEHOLDER=$msg
OCO_PROMPT_MODULE=conventional-commit
OCO_AI_PROVIDER=openai
OCO_GITPUSH=true
OCO_ONE_LINE_COMMIT=false
OCO_AZURE_ENDPOINT=undefined
OCO_TEST_MOCK_TYPE=commit-message
OCO_FLOWISE_ENDPOINT=:.
OCO_FLOWISE_API_KEY=undefined
OCO_OLLAMA_API_URL=undefined
❯ node -v
v20.16.0
❯ npm -v
10.8.1
I depend on this app so much that I would not be able to do my daily development without it! Please keep up the good work.
my bad. please update to 3.0.19 i released now.
Working as expected 🙌 Thank you for the release @di-sukharev 🚀
I updated it and it works fine! Thank you 🙇♀️