Skip to content

feat(llm): add Alibaba Cloud Coding Plan support (#1388) - #1396

Open
yykaue wants to merge 4 commits into
alibaba:mainfrom
yykaue:feat-1388-alibaba-coding-plan
Open

yykaue wants to merge 4 commits into
alibaba:mainfrom
yykaue:feat-1388-alibaba-coding-plan

Conversation

@yykaue

@yykaue yykaue commented Sep 18, 2026

Copy link
Copy Markdown

Description

Adds first-class Alibaba Cloud Coding Plan support so subscribers can configure OCR with dedicated endpoints and API keys.

  • Add dashscope-codingplan and dashscope-codingplan-intl presets for China and international endpoints.
  • Reuse the existing OpenAI Chat Completions client for chat and tool calling.
  • Support dedicated environment variables and model selection in CLI configuration and the VS Code extension.
  • Document authentication, endpoint configuration, connectivity checks, and differences from Token Plan in all five documentation languages.
  • Clarify that OCR's token usage does not represent the remaining Coding Plan quota.

Type of Change

  • New feature (non-breaking change that adds functionality)
  • Documentation update

How Has This Been Tested?

  • make check
  • make test
  • make coverage — 91.9% overall coverage
  • make build
  • VS Code extension tests — 12 suites and 107 tests passed
  • Extension TypeScript checking and linting of changed TypeScript files

Added tests covering provider presets, credential resolution and isolation, model validation, tool-call round trips, ocr llm test, and VS Code configuration persistence.

Connectivity and tool-calling tests use local HTTP mocks. Live connectivity with a Coding Plan subscription has not been verified.

Related Issues

Closes #1388

@CLAassistant

CLAassistant commented Sep 18, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

github-actions Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

🔍 OpenCodeReview found 1 issue(s) in this PR.

  • ✅ Successfully posted inline: 1 comment(s)

Comment thread internal/llm/providers.go
Comment on lines +183 to +188
{
Name: "dashscope-codingplan",
DisplayName: "Alibaba DashScope Coding Plan (China)",
Protocol: ProtocolOpenAIChatCompletions,
BaseURL: "https://coding.dashscope.aliyuncs.com/v1",
EnvVar: "DASHSCOPE_CODINGPLAN_KEY",

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.

test · high
Missing required test coverage: Per the project rules, every new provider MUST have a corresponding TestLookupProvider_<Name>Details test in internal/llm/providers_test.go that verifies Protocol, BaseURL, EnvVar, and Models. Neither dashscope-codingplan nor dashscope-codingplan-intl has such a test. The TestListProviders_Order list was updated, but detail-level regression guards are absent.

Add a test similar to the existing TestLookupProvider_MiniMaxDetails pattern, e.g.:

func TestLookupProvider_DashScopeCodingPlanDetails(t *testing.T) {
    tests := []struct {
        name, wantURL, wantEnvVar string
        wantProtocol              Protocol
        wantModels                []string
    }{
        {
            name:         "dashscope-codingplan",
            wantURL:      "https://coding.dashscope.aliyuncs.com/v1",
            wantEnvVar:   "DASHSCOPE_CODINGPLAN_KEY",
            wantProtocol: ProtocolOpenAIChatCompletions,
            wantModels:   []string{"qwen3.7-plus", "qwen3.6-plus", "kimi-k2.5", "glm-5", "MiniMax-M2.5", "qwen3.5-plus", "qwen3-max-2026-01-23", "qwen3-coder-next", "qwen3-coder-plus", "glm-4.7"},
        },
        {
            name:         "dashscope-codingplan-intl",
            wantURL:      "https://coding-intl.dashscope.aliyuncs.com/v1",
            wantEnvVar:   "DASHSCOPE_CODINGPLAN_INTL_KEY",
            wantProtocol: ProtocolOpenAIChatCompletions,
            wantModels:   []string{"qwen3.7-plus", "qwen3.6-plus", "kimi-k2.5", "glm-5", "MiniMax-M2.5", "qwen3.5-plus", "qwen3-max-2026-01-23", "qwen3-coder-next", "qwen3-coder-plus", "glm-4.7"},
        },
    }
    // ... assert each field
}

@chaojixinren chaojixinren 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.

LGTM

@lizhengfeng101

Copy link
Copy Markdown
Contributor

Heads up — #1031 just landed on main and moved the VS Code webview and shared types into a new extensions/frontend/ package, so please rebase onto the latest main and relocate any changes under extensions/vscode/src/webview/ or extensions/vscode/src/shared/ to extensions/frontend/src/.

This branch has not been deployed

No deployments
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.

Feature request: support Alibaba Cloud Coding Plan

4 participants