Skip to content

fix(tongyi): allow workspace-specific DashScope API Base URL - #3789

Open
Souravrajvi0 wants to merge 2 commits into
langgenius:mainfrom
Souravrajvi0:feat/tongyi-workspace-base-url-9c8f
Open

fix(tongyi): allow workspace-specific DashScope API Base URL#3789
Souravrajvi0 wants to merge 2 commits into
langgenius:mainfrom
Souravrajvi0:feat/tongyi-workspace-base-url-9c8f

Conversation

@Souravrajvi0

@Souravrajvi0 Souravrajvi0 commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #3787

Tongyi 0.2.15 only switched between the shared China and international DashScope hosts. Workspace-scoped Model Studio keys need a first-party URL such as https://<workspace-id>.cn-beijing.maas.aliyuncs.com/api/v1, and there was no credential field for it.

  • Add optional DashScope API Base URL on provider and custom-model forms
  • Honor it in get_http_base_address / get_ws_base_address (overrides the international toggle when set)
  • Accept native /api/v1, OpenAI-compatible /compatible-mode/v1, or a host origin
  • Point Qwen-Long's OpenAI client at the matching compatible-mode URL
  • Leave current shared endpoints in place when the field is blank
  • Bump plugin version to 0.2.19

Speech WebSocket calls derive wss://<host>/api-ws/v1/inference from the same host. Leave Base URL blank if that path is not available for the workspace.

Release Notes

  • Add an optional DashScope API Base URL credential for workspace-scoped Model Studio endpoints.
  • Route HTTP, speech WebSocket, and Qwen-Long compatible-mode requests through the configured workspace host when set.
  • Accept native /api/v1, OpenAI-compatible /compatible-mode/v1, or a host origin and keep the shared China/international endpoints when the field is blank.

Change Type

  • Documentation / non-plugin change
  • Non-LLM plugin (tools, extensions, datasource, etc.)
  • LLM plugin

Test plan

  • uv run pytest tests/test_base_address.py tests/test_llm_qwen_long.py tests/test_text_embedding_retry.py tests/test_validate_provider_credentials.py (50 passed)
  • Added workspace-specific route verification for Qwen-Long compatible-mode URLs and realtime speech WebSocket base addresses
  • Offline repro: custom *.maas.aliyuncs.com/api/v1 is now returned instead of dashscope.aliyuncs.com
  • Merged main and bumped plugin version to 0.2.19

Alibaba Cloud Model Studio workspace keys require a host like
https://<workspace-id>.cn-beijing.maas.aliyuncs.com/api/v1. Add an
optional credential, honor it in HTTP/WS/OpenAI-compatible clients, and
keep the shared DashScope endpoints when the field is blank.
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Aug 29, 2026

@Mairuis Mairuis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please update this branch against current main, choose a fresh Tongyi manifest version (the proposed 0.2.16 is already behind main), and add a non-empty ## Release Notes section. The change also derives speech WebSocket and Qwen-Long URLs, so please include verification of those routes for a workspace-specific endpoint, in addition to the URL normalization tests.

- Resolve Tongyi manifest version to 0.2.19
- Add workspace route tests for Qwen-Long and realtime speech WebSocket
@Souravrajvi0

Copy link
Copy Markdown
Contributor Author

@Mairuis Thanks for the review. I merged main, bumped the Tongyi plugin to 0.2.19, added ## Release Notes, and added workspace-specific route tests for Qwen-Long compatible-mode URLs and realtime speech WebSocket base addresses. Please rerun the checks when you have a moment.

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

Labels

enhancement New feature or request size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[tongyi] Cannot configure Alibaba Cloud Model Studio workspace-specific Base URL

2 participants