Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(formatter): support both reasoning_content and reasoning fields for deserialization#1086

Merged
chickenlj merged 1 commit into
agentscope-ai:mainfrom
LearningGp:fix/fix-reasoning-1
Mar 31, 2026
Merged

feat(formatter): support both reasoning_content and reasoning fields for deserialization#1086
chickenlj merged 1 commit into
agentscope-ai:mainfrom
LearningGp:fix/fix-reasoning-1

Conversation

@LearningGp
Copy link
Copy Markdown
Collaborator

@LearningGp LearningGp commented Mar 31, 2026

AgentScope-Java Version

1.0.10

Description

This PR only handles the reading logic to quickly support Qwen 3.5 models on the latest vLLM version. The implementation for writing back thinking blocks will be addressed in a follow-up PR.

Fix #848

Checklist

Please check the following items before code is ready to be reviewed.

  • Code has been formatted with mvn spotless:apply
  • All tests are passing (mvn test)
  • Javadoc comments are complete and follow project conventions
  • Related documentation has been updated (e.g. links, examples, etc.)
  • Code is ready for review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds backward/forward compatibility for “thinking/reasoning” fields across OpenAI-compatible payloads by allowing deserialization from either reasoning_content or reasoning (vLLM), with targeted unit coverage for the OpenAI DTOs.

Changes:

  • Add Jackson @JsonAlias("reasoning") to map vLLM’s reasoning into existing reasoningContent fields.
  • Introduce unit tests validating OpenAI DTO deserialization for both full and streaming responses using reasoning.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
agentscope-core/src/main/java/io/agentscope/core/formatter/openai/dto/OpenAIMessage.java Accept reasoning as an alias for reasoning_content during deserialization.
agentscope-core/src/main/java/io/agentscope/core/formatter/dashscope/dto/DashScopeMessage.java Accept reasoning as an alias for reasoning_content during deserialization.
agentscope-core/src/test/java/io/agentscope/core/formatter/openai/dto/OpenAIMessageReasoningFieldTest.java Add tests covering reasoning_content vs reasoning for OpenAI message/response (including streaming delta/chunk).

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Collaborator

@chickenlj chickenlj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@chickenlj chickenlj merged commit 0f48e3f into agentscope-ai:main Mar 31, 2026
10 checks passed
@LearningGp LearningGp deleted the fix/fix-reasoning-1 branch April 1, 2026 01:59
liangxingguang pushed a commit to liangxingguang/agentscope-java that referenced this pull request May 21, 2026
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.

[Bug]: When deploying qwen3.5 using the latest version of vllm, the thought content cannot be displayed.

3 participants