-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix: language model ID for custom models #3024
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
@alvadorn I just tested your test case, this works already What version are you on this shouldn't be needed. |
@rekram1-node I'm currently using the version I also forgot to mention that I'm using a custom command with the model set to the custom model in the opencode config file. opencode1.mp4 |
Ah that's why |
can u share your custom command definition by chance, I think ill merge this but there is a related issue and seeing command definition (at least the header part) will be helpful |
Sure @rekram1-node. Here's the custom command file I am using:
|
I tested with:
Doesn't seem to work. I think solution is a bit more complex |
Regarding the solution proposed here, the language is currently not built with the original model ID, so the API will return 'model not found'.
How to reproduce:
opencore.json
Then, when you set the model to be the gpt-5-nano-flex, you encounter the error:
AI_APICallError: The requested model 'gpt-5-nano-flex' does not exist.
From the dev logs, I found this error:
While debugging, I found where the model name was being retrieved to send to the API.
opencode/packages/opencode/src/session/prompt.ts
Line 307 in cd528ae