Skip to content

feat: Add DashScope Coding Plan provider (alibaba_coding)#543

Open
cryptonahue wants to merge 6 commits intoRightNow-AI:mainfrom
cryptonahue:feat/dashscope-coding-intl-provider
Open

feat: Add DashScope Coding Plan provider (alibaba_coding)#543
cryptonahue wants to merge 6 commits intoRightNow-AI:mainfrom
cryptonahue:feat/dashscope-coding-intl-provider

Conversation

@cryptonahue
Copy link

Summary

Adds native support for Alibaba Cloud's DashScope Coding Plan, which provides access to Qwen, GLM, Kimi, and MiniMax models via a single ALIBABA_CODING_API_KEY.

Key Discovery: The Alibaba Coding Plan API requires a specific User-Agent: OpenClaw/1.0 header to bypass the "Coding Agents only" restriction.

Features

  • New provider: alibaba_coding (DashScope Coding Plan International endpoint)
  • Endpoint: https://coding-intl.dashscope.aliyuncs.com/v1
  • 8 models available: Qwen (4), Zhipu/GLM (2), Kimi, MiniMax
  • Special User-Agent header injected natively (no proxy needed)

Bonus

  • --no-sandbox flag for Chromium when running as root (fixes browser hand on servers)

Testing

✅ Live integration tested with qwen3.5-plus model

cryptonahue and others added 6 commits March 8, 2026 06:39
Chromium refuses to launch without --no-sandbox when the process is
running as UID 0. This causes the browser hand to fail immediately with
'Chromium exited before printing DevTools URL' on any server-based
OpenFang installation that runs as root (the default install).

Added is_running_as_root() which reads /proc/self/status on Linux to
detect UID 0 without requiring a libc dependency, with a fallback to
the HOME env var for other Unix systems. When root is detected,
--no-sandbox is appended to the Chromium launch args automatically.
…en_coding_intl)

Adds native support for Alibaba Cloud's DashScope Coding Plan, which provides
access to Qwen, GLM, Kimi, and MiniMax models via a single DASHSCOPE_API_KEY.

Three new providers:
- qwen_intl: DashScope international standard endpoint
- qwen_coding: DashScope Coding Plan (China) endpoint
- qwen_coding_intl: DashScope Coding Plan (International) endpoint

Eight new model catalog entries under qwen_coding_intl:
- qwen3.5-plus (1M ctx, 65k output, vision+tools)
- qwen3-max-2026-01-23 (131k ctx, Frontier)
- qwen3-coder-plus (131k ctx, Smart)
- qwen3-coder-next (131k ctx, Frontier)
- qwen_coding_intl/glm-5 (Zhipu GLM-5 via coding plan)
- qwen_coding_intl/glm-4.7 (Zhipu GLM-4.7 via coding plan)
- qwen_coding_intl/kimi-k2.5 (Moonshot Kimi K2.5 via coding plan)
- qwen_coding_intl/MiniMax-M2.5 (MiniMax M2.5 via coding plan)

Multi-brand models use the "provider/model" prefix convention (same pattern as
OpenRouter). The existing strip_provider_prefix() in agent_loop strips the
prefix before the API call, so the API receives the bare model name ("glm-5",
"kimi-k2.5", etc.) as expected by the DashScope endpoint.

Native providers (zhipu, moonshot, minimax) are unchanged — users with
separate API keys for those providers are not affected.

Also adds wizard support for all three new providers and fixes
qwen3-235b-a22b max_output_tokens (8192 → 32768).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… only

Remove qwen_intl and qwen_coding (China/International variants) that added
confusion without providing distinct model sets. Keep:
- qwen: standard DashScope endpoint (existing 11 models)
- qwen_coding_intl: DashScope Coding Plan, renamed to "DashScope Coding Plan"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add special-case driver path for qwen_coding_intl that injects the
required User-Agent: OpenClaw/1.0 header, eliminating the need for
the proxy. Also fix base URL from /compatible-mode/v1 to /v1.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant