bug: The function name 'python' is reserved for use by this model
Describe the bug
When using the new model o4-mini the following error appears:
Error: "API request failed with status 400. Body: \"{\\n \\\"error\\\": {\\n \\\"message\\\": \\\"The function name 'python' is reserved for use by this model. Please use a different function name.\\\",\\n \\\"type\\\": \\\"invalid_request_error\\\",\\n \\\"param\\\": null,\\n \\\"code\\\": null\\n }\\n}\""
To reproduce
No response
Expected behavior
No response
Installation method
Use lazy.nvim:
{
"yetone/avante.nvim",
event = "VeryLazy",
lazy = false,
version = false, -- set this if you want to always pull the latest change
opts = {
-- add any opts here
},
-- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
build = "make",
-- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows
dependencies = {
"nvim-treesitter/nvim-treesitter",
"stevearc/dressing.nvim",
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
},
}
Environment
neovim version 0.11.0
Repro
vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
require("lazy.minit").repro({
spec = {
-- add any other plugins here
},
})
@jfpedroza try to use value gpt-4o-mini
Like this:
...
openai = {
model = "gpt-4o-mini",
....
},
...
@Klojer that's a bit besides the point. 4o and o4 are different models (yes, the naming on OpenAI's side sucks a bit). And seeing as o4 is supposed to be good at coding, that's the model we want to use.
i have the same problem. 04-mini does not work and gets the same error
Hi! I'm running into the same issue using openai/o3:
- Datetime: 2025-04-29 17:53:52
- Model: openai/o3
- Selected files:
- src/react/src/App.tsx
> the first names should start with "C".
Error: "API request failed with status 400. Body: \"{\\n \\\"error\\\": {\\n \\\"message\\\": \\\"The function name 'python' is reserved for use by this model. Please use a different function name.\\\",\\n \\\"type\\\": \\\"invalid_request_error\\\",\\n \\\"param\\\": null,\\n \\\"code\\\": null\\n }\\n}\""
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.