Skip to content

fix(examples): use raw DashScope model name#2318

Open
huangxian119 wants to merge 4 commits into
agentscope-ai:mainfrom
huangxian119:codex/fix-runtime-context-dashscope-model
Open

fix(examples): use raw DashScope model name#2318
huangxian119 wants to merge 4 commits into
agentscope-ai:mainfrom
huangxian119:codex/fix-runtime-context-dashscope-model

Conversation

@huangxian119

Copy link
Copy Markdown

Summary

  • Fix RuntimeContextExample to pass the raw DashScope API model name qwen-plus when constructing DashScopeChatModel directly.
  • Keep the provider-prefixed dashscope:qwen-plus form for ModelRegistry-based configuration.
  • Add a regression test covering the direct builder configuration.

Root cause

dashscope:qwen-plus is a ModelRegistry identifier, not a DashScope API model name. Sending it directly to DashScope returns HTTP 400 with InvalidParameter: Model not exist.

Test plan

  • JAVA_HOME=<JDK 17> mvn -pl agentscope-examples/documentation -am -Dtest=RuntimeContextExampleTest -DfailIfNoTests=false test
  • JAVA_HOME=<JDK 17> mvn -pl agentscope-examples/documentation -am -DskipTests compile

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


xianhuang2 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@oss-maintainer

Copy link
Copy Markdown
Collaborator

CLA Not Signed

The Contributor License Agreement (CLA) check is currently pending on this PR (license/cla: Contributor License Agreement is not signed yet.). This PR cannot be merged until the CLA is signed.

@huangxian119 please sign the CLA via the CLA assistant badge in the comment above, or visit https://cla-assistant.io/agentscope-ai/agentscope-java. Once signed, the license/cla status will turn green.


Automated check by github-manager-bot

@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

3 participants