mirror of
https://github.com/alibaba/higress.git
synced 2026-05-28 06:37:26 +08:00
Fix/claude thinking tool call conversion (#3756)
Signed-off-by: wydream <yaodiwu618@gmail.com>
This commit is contained in:
@@ -100,6 +100,11 @@ func (m *zhipuAiProvider) TransformRequestBody(ctx wrapper.HttpContext, apiName
|
||||
// Explicitly set thinking=disabled to prevent ZhipuAI from enabling it by default.
|
||||
body, _ = sjson.SetBytes(body, "thinking", map[string]string{"type": "disabled"})
|
||||
}
|
||||
if requestBodyHasMessageReasoningContent(body) {
|
||||
// Z.AI clears historical reasoning_content by default. Disable clearing only
|
||||
// when the converted request actually carries reusable reasoning history.
|
||||
body, _ = sjson.SetBytes(body, "thinking.clear_thinking", false)
|
||||
}
|
||||
|
||||
return m.config.defaultTransformRequestBody(ctx, apiName, body)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user