qwen_code:带 "/" 的模型 ID 被当作 provider/model 拆分,引擎收到的是截断后的 ID
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- go
- Domain
- ai-infra-agents, backend
Research direction
Read internal/credential/provider_query.go and trace how ResolveModelRef() handles --provider and --model; then inspect internal/agent/qwen_code.go, especially buildQwenCodeRunCmd(). Reproduce with the qwen_code engine and zcode/GLM-5.3-Flash; done means the full model ID reaches qwen and provider lookup succeeds without requiring a workaround.
Written by the indexing model from the issue text.
Description
问题
skill-up 把 --model 值里的任何 / 都当作 provider 命名空间分隔符来解析。但有些模型的真实 ID 本身就含斜杠——例如 qwen 的 modelProviders 里注册的就是 id: zcode/GLM-5.3-Flash。这个 ID 被强制拆开后,引擎 CLI 只收到斜杠后面的裸名(GLM-5.3-Flash),而 qwen 的 findModelConfig 按 id 全等匹配,裸名匹配不到任何 provider,于是认证失败。
在 v0.14.0 实测确认;当前 main 上相关代码没有变化。
复现步骤(v0.14.0,内置 qwen_code 引擎,qwen CLI 0.26.7)
bash
skill-up run eval.yaml --engine qwen_code --model zcode/GLM-5.3-Flash
所有 case 启动即报 qwen 的认证错误:
缺少 OpenAI 兼容认证的 API Key。请设置 settings.security.auth.apiKey 或设置 'OPENAI_API_KEY' 环境变量。
qwen 实际收到的是 -m 'GLM-5.3-Flash'(裸名)→ provider 查找失配 → 认证回退到 OPENAI_API_KEY → 失败,尽管 qwen 自己的 settings.json 里有可用凭据。
qwen 直连对照:echo hi | qwen --yolo -m 'GLM-5.3-Flash' 以同样方式失败;-m 'zcode/GLM-5.3-Flash' 正常。
同一命令不带 --model 则正常:qwen settings.json 的 model.name(完整带斜杠 ID)原样透传。
证据
失败运行的 result.json 显示了拆分结果:
json
"requested_configuration": {
"engine": "qwen_code", "protocol": "openai",
"provider": "zcode", "model": "GLM-5.3-Flash"
}
根因
internal/credential/provider_query.go — ResolveModelRef() 只要前缀是已配置的 provider,就按第一个 / 拆分:zcode/GLM-5.3-Flash → provider=zcode + model=GLM-5.3-Flash。
internal/agent/qwen_code.go — buildQwenCodeRunCmd() 只把 Cfg.ModelName(裸名)拼进 -m,provider 前缀从不回拼。qodercli 在 #247/#262 已获得显式 ID 透传修复;qwen_code 被漏掉了。
修复建议
对 qwen_code 原样透传模型 ID(或拼 -m 参数时回拼 provider + "/" + model)。qwen 从自己的 settings 解析 provider,拆分后的裸名在 qwen 侧不是合法的模型引用——除非恰好存在同名的裸名 provider 条目。
临时绕过(无需改 skill-up,2026-11-06 补充实测,按推荐顺序):
--provider openai --model <完整带斜杠 ID>(推荐):设置 --provider 后 --model 走 opaque 直传,不再经过 provider/model 拆分逻辑。实测 transcript 中 executionContext.modelId 为完整 ID 直达引擎、认证通过。模型选择显式体现在命令行上,可复现。
不带 --model 运行:把完整 ID 写进 qwen settings.json 的 model.name,由 qwen 侧解析(ResolveModelRef 不介入)。
注册裸名别名:在 qwen settings.json 的 modelProviders 里额外注册一条裸名条目(如 id: GLM-5.3-Flash 指向同一 baseUrl/apiKey),让截断后的裸名也能命中——适合无法改 skill-up 命令行的场景。
附:--engine-kwarg 传模型(model= / qwen_model= / model_name=)不是绕过路径——qwen_code 引擎的 kwarg 白名单不含任何模型 key,三种 key 名均被校验层忽略并告警 "does not support kwarg"(2026-11-06 实测)。
- Dominant language
- Go
- Stars
- 1.5k
- Forks
- 134
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 61
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from alibaba/skill-up
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
OpenSandbox runtime: expect.files_exist and file_contains fail because WorkspacePath is remotePossibly taken @bababoom721 claimed this 1 day ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
alibaba/skill-up#408 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
alibaba/skill-up#407 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
alibaba/skill-up#406 · 1 comment ·
Maintainers usually reply within 1 day
All issues in alibaba/skill-up
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
OneBusAway/maglev#2145 ·
Maintainers usually reply within 2 days
-
priority/medium status/ready type/chore
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
discobox-ai/discobox#1357 ·
Maintainers usually reply within 1 day
-
TestPseudoLocaleRemote fails now and then: it types the code before the laptop asks for itPossibly taken @fzn0x claimed this today. Openbug priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
edit_file diff rendering panics on invalid UTF-8 textPossibly taken @TDnorthgarden claimed this today. Openarea/tui
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
docker/docker-agent#4955 ·
Maintainers usually reply within 1 day
-
enhancement ui/ux
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
jbigler/railswitch#243 ·
Maintainers usually reply within 1 day