求助,openclaw使用 cpa反代的gpt-5.3-codexgpt-5.4,提示错误(invalid_function_parameters)

2026-04-13 12:431阅读0评论SEO问题
  • 内容介绍
  • 文章标签
  • 相关推荐
问题描述:

{ "error": { "message": "Invalid schema for function 'agents_list': None is not of type 'array'.", "type": "invalid_request_error", "param": "tools[10].parameters", "code": "invalid_function_parameters" } }

我的模型provider配置如下:

"models": { "providers": { "cpa": { "baseUrl": "http://ai.xxxx.xyz/v1", "apiKey": "sk-xxxx", "api": "openai-completions", "headers": { "User-Agent": "curl/8.0" }, "authHeader": true, "models": [ { "id": "gpt-5.3-codex", "name": "gpt-5.3-codex", "reasoning": false, "input": [ "text", "image" ], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 1000000, "maxTokens": 8192 } ] } } },

相同模型参数配置下,gemini-3-flash能正常工作。在openclaw 中一个个关闭出问题的tool,才能正常对话

问了下ai说是oai检查比较严格,请教下各位佬是否有其他解决办法?

一个一摸一样的issue(close但没提供解决方案):

cli-proxy-api | [2026-02-10 15:08:42] [b77a317b] [debug] [conductor.go:2126] Use OAuth provider=codex auth_file=codex-edaezo7576@virgilian.com.json for model gpt-5.2-codex cli-proxy-api | [2026-02-10 15:08:42] [--------] [debug] [apply.go:156] thinking: original config from request | provider=codex model=gpt-5.2-codex mode=level budget=0 level=medium cli-proxy-api | [2026-02-10 15:08:42] [--------] [debug] [apply.go:197] thinking: processed config to apply | provider=codex model=gpt-5.2-codex mode=level budget=0 level=medium cli-proxy-api | [2026-02-10 15:08:45] [b77a317b] [debug] [codex_executor.go:360] request error, error status: 400, error message: Invalid schema for function 'agents_list': None is not of type 'array'. cli-proxy-api | [2026-02-10 15:08:45] [b77a317b] [warn ] [gin_logger.go:91] 400 | 3.427s | 172.28.0.1 | POST "/v1/messages" cli-proxy-api | [2026-02-10 15:08:45] [b77a317b] [debug] [codex_executor.go:360] request error, error status: 400, error message: Invalid schema for function 'agents_list':

github.com/router-for-me/CLIProxyAPI

openclaw调用CPA 中的codex5.2 报错。

已打开 07:13AM - 10 Feb 26 UTC 已关闭 07:43AM - 10 Feb 26 UTC nsyncxy1

cli-proxy-api | [2026-02-10 15:08:42] [b77a317b] [debug] [conductor.go:2126] Us…e OAuth provider=codex auth_file=codex-edaezo7576@virgilian.com.json for model gpt-5.2-codex cli-proxy-api | [2026-02-10 15:08:42] [--------] [debug] [apply.go:156] thinking: original config from request | provider=codex model=gpt-5.2-codex mode=level budget=0 level=medium cli-proxy-api | [2026-02-10 15:08:42] [--------] [debug] [apply.go:197] thinking: processed config to apply | provider=codex model=gpt-5.2-codex mode=level budget=0 level=medium cli-proxy-api | [2026-02-10 15:08:45] [b77a317b] [debug] [codex_executor.go:360] request error, error status: 400, error message: Invalid schema for function 'agents_list': None is not of type 'array'. cli-proxy-api | [2026-02-10 15:08:45] [b77a317b] [warn ] [gin_logger.go:91] 400 | 3.427s | 172.28.0.1 | POST "/v1/messages" cli-proxy-api | [2026-02-10 15:08:45] [b77a317b] [debug] [codex_executor.go:360] request error, error status: 400, error message: Invalid schema for function 'agents_list': 用的codex普号

网友解答:
--【壹】--:

弄好了吗。兄弟如果弄好了请教一下怎么使用反代的


--【贰】--:

还没有,有解决办法我在这儿更新


--【叁】--:

佬,真的非常非常感谢!


--【肆】--:

“api”: “openai-completions”, 这个错了换成"api": “openai-responses”, 因为codex的请求用的不是openai的通用协议


--【伍】--:

请教一下,CPA部署好之后,是不是两种协议都支持?
我本地试了下都成功的:

curl -X POST "http://cpaip:18317/v1/chat/completions" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer sk-" \ -d '{ "model": "gpt-5.4", "messages": [ { "role": "user", "content": "hi" } ], "temperature": 0.7 }'

curl http://cpaip:18317/v1/responses \ -H "Content-Type: application/json" \ -H "Authorization: Bearer sk-" \ -d '{ "model": "gpt-5.4", "input": "hi" }'


--【陆】--:

你可以换成gemini模型,让龙虾自己适配试试


--【柒】--:

不是说 free 账号的 5.4 不让用了吗?你是 free 还是 plus


--【捌】--:

我马上试试


--【玖】--:

思路不错哦,我试试


--【拾】--:

team