Skip to content

fix: 修复gpt-5.2以上模型映射到gpt-5.2以下时verbosity参数引发的报错#941

Open
CoolCoolTomato wants to merge 2 commits intoWei-Shaw:mainfrom
CoolCoolTomato:main
Open

fix: 修复gpt-5.2以上模型映射到gpt-5.2以下时verbosity参数引发的报错#941
CoolCoolTomato wants to merge 2 commits intoWei-Shaw:mainfrom
CoolCoolTomato:main

Conversation

@CoolCoolTomato
Copy link

复现说明

当使用 gpt-5.4 --> gpt-5.2-codex 映射时,codex选择 gpt-5.4 模型,此时后端会报错:

2026-03-11T20:37:45.897+0800    ERROR   service/openai_gateway_service.go:2874  OpenAI upstream error 400 (account=2 platform=openai type=oauth): {\n "error": {\n "message": "Unsupported value: 'low' is not supported with the 'gpt-5.2-codex' model. Supported values are: 'medium'.",\n "type": "invalid_request_error",\n "param": "text.verbosity",\n "code": "unsupported_value"\n }\n}  {"service": "sub2api", "env": "production", "component": "service.openai_gateway", "legacy_printf": true}

错误原因

codex使用 gpt-5.4 发送请求时会附带 verbosity 参数,sub2api只转换了模型名称,将 verbosity 参数一并发给了 gpt-5.2-codex 导致报错。

codex官方对verbosity参数的配置如下:

模型 support_verbosity default_verbosity
gpt-5.4 true low
gpt-5.3-codex true low
gpt-5.2 false null
gpt-5.2-codex false null
gpt-5.1-codex-max false null
gpt-5.1-codex-mini false null
gpt-5-codex-mini false null

修复方法

检查模型版本,移除低版本的 verbosity 参数。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant