jackMort / ChatGPT.nvim

ChatGPT Neovim Plugin: Effortless Natural Language Generation with OpenAI's ChatGPT API
Apache License 2.0
3.8k stars 317 forks source link

o1-mini: unsupported parameter #473

Open redquixote opened 1 month ago

redquixote commented 1 month ago

Firstly, thanks for this magnificient plugin.

I've been trying to use the o1-mini model but I get the following error:

Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead.

I changed the configuration to add max_completion_tokens but it seems that the max_tokens is sent in the request.

anyone with similar issue?

v3ceban commented 6 days ago

Just tried using o1/o1-mini, faced the same problem.

Though my understanding of lua and nvim plugins ecosystem is limited, I believe that local configs for plugins override existing entries in plugins default tables, but still use default values for anything that is not present in the override.

After a quick look at the source code, it looks that max_tokens is a default parameter, hence is always present in request.

So far only o1-preview and o1-mini seem to be affected. But they are also still in beta and might change behavior in release version.

Still, though, is there any way to change request parameters based on model name? Or completely delete default config and send out your own parameters?

oVerde commented 11 hours ago

Just installed this extension to try out and had this very same issue.