Skip to content

feat: add alibaba bailian coding plan provider#514

Open
zdianjiang wants to merge 1 commit intoRightNow-AI:mainfrom
zdianjiang:main
Open

feat: add alibaba bailian coding plan provider#514
zdianjiang wants to merge 1 commit intoRightNow-AI:mainfrom
zdianjiang:main

Conversation

@zdianjiang
Copy link

@zdianjiang zdianjiang commented Mar 11, 2026

Summary

Add Alibaba Bailian (百炼) Coding Plan as a new LLM provider with both OpenAI-compatible and Anthropic-compatible endpoints.
Bailian Coding Plan is Alibaba's coding-optimized API service that provides access to multiple models (Kimi K2.5, Qwen3.5, GLM-5, MiniMax, etc.) through a unified endpoint with special DashScope headers.

Changes

  • Add bailian_coding_openai provider — OpenAI-compatible endpoint via OpenAIDriver
  • Add bailian_coding_anthropic provider — Anthropic-compatible endpoint via AnthropicDriver
  • Add extra_headers support to AnthropicDriver for DashScope-specific headers
  • Add 4 new URL constants: BAILIAN_CODING_OPENAI_BASE_URL, BAILIAN_CODING_OPENAI_INTL_BASE_URL, BAILIAN_CODING_ANTHROPIC_BASE_URL, BAILIAN_CODING_ANTHROPIC_INTL_BASE_URL
  • Add 16 model entries (8 models × 2 protocols): kimi-k2.5, qwen3.5-plus, qwen3-max, qwen3-coder-next, qwen3-coder-plus, MiniMax-M2.5, glm-5, glm-4.7
  • Update provider count: 36 in drivers, 40 in catalog

Testing

  • cargo clippy --workspace --all-targets -- -D warnings passes
  • cargo test --workspace passes
  • Live integration tested (if applicable)

Security

  • No new unsafe code
  • No secrets or API keys in diff
  • User input validated at boundaries

API Key

Environment variable: BAILIAN_API_KEY

Providers

Provider Protocol Base URL
bailian_coding_openai OpenAI-compatible https://coding.dashscope.aliyuncs.com/v1
bailian_coding_anthropic Anthropic-compatible https://coding.dashscope.aliyuncs.com/apps/anthropic

Usage

OpenAI Protocol:

[default_model]
provider = "bailian_coding_openai"
model = "qwen3.5-plus"

Anthropic Protocol:

[default_model]
provider = "bailian_coding_anthropic"
model = "qwen3.5-plus"

Note

Bailian Coding Plan uses a subscription-based pricing model (not per-token pricing) and is only available for authorized coding agents. API keys start with sk-sp-.

For international users, use the -intl endpoints by setting base_url explicitly:

[default_model]
provider = "bailian_coding_openai"
model = "qwen3.5-plus"
base_url = "https://coding-intl.dashscope.aliyuncs.com/v1"

Signed-off-by: zdianjiang <zdianjiang@gmail.com>
@zxl-coder-ai
Copy link

直接改配置文件也能用:

[default_model]
provider = "codex"
model = "qwen3.5-plus"
base_url = "https://coding-intl.dashscope.aliyuncs.com/v1"

@zxl-coder-ai
Copy link

apikeyenv的名字不要用openai 的标准名;自己随便定一个,如: ALI_CODE_PLAN_KEY ,然后写到 .env 文件内就可以了

@zdianjiang
Copy link
Author

apikeyenv的名字不要用openai 的标准名;自己随便定一个,如: ALI_CODE_PLAN_KEY ,然后写到 .env 文件内就可以了

apikeyenv的名字不要用openai 的标准名;自己随便定一个,如: ALI_CODE_PLAN_KEY ,然后写到 .env 文件内就可以了

这个怕是好多人不会

@zdianjiang zdianjiang changed the title provider: add alibaba bailian coding plan support feat: add alibaba bailian coding plan provider Mar 11, 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.

2 participants