Skip to content

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

@YunKuiLu
Copy link
Contributor Author

Hi @markpollack @ilayaperumalg @sobychacko . Please help review when you have time. Thanks!

Zhipu released a new COT model, and this update needs to depend on it. Here is the related documentation: https://docs.z.ai/guides/llm/glm-4.5

@ilayaperumalg ilayaperumalg self-assigned this Sep 10, 2025
@ilayaperumalg ilayaperumalg added this to the 1.1.0.M2 milestone Sep 10, 2025
@ilayaperumalg
Copy link
Member

@YunKuiLu Thanks for the PR! Sorry about the delay in getting this in. @mxsl-gr Thanks for the review. Rebased and merged as 49506de

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants