Skip to content

feat(zhipuai): Support glm-4.1v-thinking-flash model #3796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

YunKuiLu
Copy link
Contributor

  • Add reasoning_content fields to ChatCompletionMessage
  • Added ZhiPuAiAssistantMessage as a subclass of AssistantMessage to support returning CoT content.
  • Add integration tests
  • fix "RestClient.Builder bean not found" exception for zhipu's image auto-config

glm-4.1v-thinking-flash is a new visual reasoning model, and it puts the COT content into a new field called reasoning_content.
This PR references the implementation from the spring-ai-deepseek module.

DeepSeek Module: https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-deepseek/src/main/java/org/springframework/ai/deepseek/DeepSeekAssistantMessage.java

ZhiPuAi official document: https://www.bigmodel.cn/dev/api/visual-reasoning-model/GLM-4.1V-Thinking

- Add reasoning_content fields to ChatCompletionMessage
- Added ZhiPuAiAssistantMessage as a subclass of AssistantMessage to support returning CoT content.
- Add integration tests
- fix "RestClient.Builder bean not found" exception for zhipu's image auto-config

Signed-off-by: YunKui Lu <[email protected]>
@YunKuiLu
Copy link
Contributor Author

Hi @mxsl-gr, could you please help review this PR when you have time? Thanks!

@mxsl-gr
Copy link
Contributor

mxsl-gr commented Jul 14, 2025

Hi @mxsl-gr, could you please help review this PR when you have time? Thanks!

no problem, give me some time

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.

2 participants