feat: allow manual endpoint type configuration and add qwen3.5-plus support#824
Conversation
…upport Change-Id: I117c4adee6f8372691f9186e14b7dc26839a0528
Change-Id: I40f87398172d9330db09dccebf1fe8ab0516c51a
Summary of ChangesHello @uuuyuqi, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the DashScope integration by providing more control over endpoint selection and adding support for new models. It introduces an Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request successfully introduces the EndpointType enum, allowing for explicit configuration of DashScope API endpoint types. This enhances flexibility by enabling manual override of the automatic model name-based detection, which is particularly useful for models like qwen3.5-plus that might not fit existing auto-detection patterns. The changes are well-integrated across DashScopeRequest, DashScopeChatModel, and DashScopeHttpClient, with clear documentation and appropriate handling of default values. The introduction of the isMultimodalModel helper method also improves code organization and maintainability.
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Change-Id: I122cae15d91cc685cccc4b2387eac707f17245bf
There was a problem hiding this comment.
Pull request overview
This PR introduces manual endpoint type configuration for DashScope models and adds support for the qwen3.5-plus model to resolve multimodal API routing issues reported in #817. Previously, qwen3.5-plus users encountered "url error" when attempting multimodal calls because the model name didn't match the auto-detection patterns (qvq prefix or -vl pattern). The solution adds both explicit endpoint control via a new EndpointType enum and automatic detection for qwen3.5-plus models.
Changes:
- Added
EndpointTypeenum (AUTO, TEXT, MULTIMODAL) to allow explicit API endpoint selection - Extended auto-detection logic to recognize qwen3.5-plus as a multimodal model
- Updated DashScopeChatModel, DashScopeHttpClient, and DashScopeRequest to support endpoint type configuration while maintaining backward compatibility
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
EndpointType.java |
New enum defining three endpoint types with comprehensive documentation |
DashScopeHttpClient.java |
Updated endpoint selection logic to support explicit type override; added qwen3.5-plus pattern detection |
DashScopeChatModel.java |
Added endpointType field with builder support and backward-compatible constructor overloading |
DashScopeRequest.java |
Added JsonIgnore endpointType field with proper default initialization |
DashScopeHttpClientTest.java |
Comprehensive test coverage for new endpoint type routing and qwen3.5-plus detection |
DashScopeChatModelTest.java |
Tests for builder and constructor patterns with endpointType parameter |
agentscope-core/src/main/java/io/agentscope/core/model/DashScopeChatModel.java
Outdated
Show resolved
Hide resolved
agentscope-core/src/main/java/io/agentscope/core/model/DashScopeChatModel.java
Outdated
Show resolved
Hide resolved
agentscope-core/src/main/java/io/agentscope/core/model/DashScopeHttpClient.java
Show resolved
Hide resolved
agentscope-core/src/main/java/io/agentscope/core/model/DashScopeHttpClient.java
Show resolved
Hide resolved
agentscope-core/src/main/java/io/agentscope/core/model/EndpointType.java
Outdated
Show resolved
Hide resolved
agentscope-core/src/main/java/io/agentscope/core/model/DashScopeChatModel.java
Outdated
Show resolved
Hide resolved
|
There are other multimodal models, such as qwen3-asr-flash. Should we consider accounting for them as well? |
Change-Id: I11d18dfb4adc57a38f123a7a966704da9fafa64b
Change-Id: Iaace1bd32b2e6f86dcbb8efa4580ac1f0fbdf734
|
Fixed #825 |
AgentScope-Java Version
1.0.10-SNAPSHOT
Description
Allow manual endpoint type configuration and add qwen3.5-plus support.
Closes #817
Checklist
Please check the following items before code is ready to be reviewed.
mvn spotless:applymvn test)