修复 GLM 推理强度映射#3359
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
GLM 系列模型的 OpenAI 兼容接口使用
high/max两档reasoning_effort,其中最高档是max。部分 OpenAI 客户端会发送xhigh、x-high或类似值,raw Chat Completions 直转路径此前会原样转发,导致上游可能不识别。修改
glm-*mapped model 增加 OpenAI Chat Completions 请求体reasoning_effort归一化low/medium/high映射为highxhigh/x-high/extra_high/max/ultracode映射为max验证
go test -tags=unit ./internal/service