Skip to content

修复 GLM 推理强度映射#3359

Merged
Wei-Shaw merged 1 commit into
Wei-Shaw:mainfrom
alfadb:fix/glm-effort-mapping
Jun 21, 2026
Merged

修复 GLM 推理强度映射#3359
Wei-Shaw merged 1 commit into
Wei-Shaw:mainfrom
alfadb:fix/glm-effort-mapping

Conversation

@alfadb

@alfadb alfadb commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

背景

GLM 系列模型的 OpenAI 兼容接口使用 high / max 两档 reasoning_effort,其中最高档是 max。部分 OpenAI 客户端会发送 xhighx-high 或类似值,raw Chat Completions 直转路径此前会原样转发,导致上游可能不识别。

修改

  • glm-* mapped model 增加 OpenAI Chat Completions 请求体 reasoning_effort 归一化
  • low / medium / high 映射为 high
  • xhigh / x-high / extra_high / max / ultracode 映射为 max
  • 仅作用于 GLM raw Chat Completions 直转路径,不改变 DeepSeek、Kimi、OpenAI 等其他模型行为

验证

  • go test -tags=unit ./internal/service

@Wei-Shaw Wei-Shaw merged commit 93de196 into Wei-Shaw:main Jun 21, 2026
7 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 21, 2026
@alfadb alfadb deleted the fix/glm-effort-mapping branch June 22, 2026 00:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants