Uh oh!
There was an error while loading. Please reload this page.
feat(providers): add Alibaba (China) provider for the dashscope China endpoint - #3329
Conversation
… endpoint Register models.dev alibaba-cn as a first-class provider so China-platform users can connect to https://dashscope.aliyuncs.com/compatible-mode/v1 with keys from bailian.console.aliyun.com. The catalog carries 81 tool-calling models and defaults to qwen3.8-max, with hosted web-search parity to the international alibaba provider. The models.dev sync ingests alibaba-cn; the generated metadata and pricing snapshots gain only the alibaba-cn blocks because a full regeneration is currently blocked by unrelated upstream drift (e.g. opencode free-model renames) that deserves its own sync pass. Closesapache#3323 Generated-by: Maka
01b9c2a to
78517ccCompareAstro-Han
commented
Aug 23, 2026
Rebased this branch onto current Exactly one conflict, in a generated file, Resolved as the sorted union — the The rebased commit reports 10 files changed, 1326 insertions(+) — identical to the pre-rebase diffstat, so nothing was lost or picked up along the way. Two things worth your attention rather than mine:
I did not touch the substance of the change and I have not reviewed it yet. An independent review line is being assigned separately. |
Astro-Han
commented
Aug 23, 2026
Follow-up on the rebase: CI now runs, and it fails — but not on my conflict resolution. Run 32617948182 on Neither line is in On today's filter?: 'language-models'|'tool-capable';There is a separate Net effect of the rebase: this PR went from I have not attempted to fix it, and I will not: picking between Once the build is green, an independent review line will be assigned. |
'filter: fallback-models' is not a valid ProviderModelDiscovery filter and names a mechanism main rejected in apache#1584: intersecting live discovery with the shipped list drops models the account gains after release. The China endpoint serves the same compatible-mode /models surface as the international provider, which discovers via plain protocol; the curated fallbackModels list already covers the offline path and the default model. Generated-by: maka
me2seeks
commented
Aug 23, 2026
Fixed at
Verification on the new head: |
Astro-Han
left a comment
There was a problem hiding this comment.
Approving 9ca3ebc057cb8f3843e854241746f7660f496bda. Required test is completed / success bound to that exact SHA (run 32619203260). No P0–P3.
A note on how this PR got reviewed, because the record could be read the wrong way. The two earlier comments from this account are rebase records, not reviews — the second one says so explicitly. So despite appearances, this change had never actually been reviewed. It was re-triaged as unreviewed and given a full independent line rather than a re-check, which is why this arrives later than the CI green.
The one-line fix is correct, and for a stronger reason than "it compiles now."filter?: 'language-models' | 'tool-capable' is the entire permitted set on ProviderModelDiscovery, so 'fallback-models' was never a value this field could take — the conflict had been hiding a genuine type error, not a stylistic choice. { kind: 'protocol' } also puts alibaba-cn in line with all six sibling alibaba* entries, which was verified entry by entry rather than assumed from the international one.
What was checked on the substance:
- The endpoint is real and behaves as claimed. An unauthenticated probe of
https://dashscope.aliyuncs.com/compatible-mode/v1/modelsreturns HTTP 401 — reachable and auth-gated, which is what protocol discovery needs. The registry pins that URL. - The wire contract is pinned, not assumed.
alibaba-cn/qwen3.8-maxresolves asopenai-chat, with exact-model-id, tool-loop and reasoning-replay conformance passing. - Web search is correctly declared unsupported. Alibaba CN is added with
implemented: false, androuteWebSearchToolsonly injects the native tool whenimplemented: true— so a capability the provider advertises but Maka cannot execute does not get silently routed elsewhere. This matches the existing Alibaba entry. - The 177 pricing rows come from the same models.dev generated source;
alibaba-cn:keys are strictly sorted with no duplicates. The fallback catalogue holds 81 entries withqwen3.8-maxfirst, andtoolCallingModelIdsadmits only models whose metadata saysfunctionCalling: true.
On entropy: of ~1326 lines, roughly 1250 are generated metadata and pricing. The hand-written surface is small and reuses the existing OpenAI-compatible runtime, protocol discovery, web-search capability and brand assets. A separate provider id for the China endpoint is the right call precisely because it did not require a second request, auth or model-resolution authority.
One thing for the maintainers rather than the author: the rebase resolved a conflict in model-pricing.generated.ts by hand — as a sorted union, with no row dropped or reordered — but that file has scripts/sync-model-metadata.mjs behind it. If the generator is the source of truth, re-running it and force-pushing over that resolution is preferable to leaving a hand-merged generated file.
Verified: @maka/core build and 624/624; @maka/runtime build and 349/349 focused; desktop renderer build; Biome on all 10 changed files; git diff --check.
Disclosure, because it changes what this approval is worth: this is an AI review. Under CONTRIBUTING.md §Review it does not count as the required independent human review — merge still needs a committer other than the author to give LGTM and to decide.
Uh oh!
There was an error while loading. Please reload this page.
Summary
Maka's
alibabaprovider is pinned to the international Model Studio endpoint (dashscope-intl.aliyuncs.com), leaving no access path for the China platform. This PR registers models.devalibaba-cnas a first-class provider bound tohttps://dashscope.aliyuncs.com/compatible-mode/v1, so China-platform users can connect with keys from bailian.console.aliyun.com. The catalog carries 81 tool-calling models and defaults toqwen3.8-max(1M context, 128k output, vision/pdf input, thinking toggle + low/medium/xhigh efforts). Hosted web-search handling mirrors the internationalalibabaprovider, and the desktop picker gains display copy (Alibaba 中国站 / Alibaba (China)) plus the Alibaba brand mark.The models.dev sync now ingests
alibaba-cn. The generated metadata and pricing snapshots gain only the alibaba-cn blocks (spliced from a full live regeneration): a full regen is currently blocked by unrelated upstream drift — e.g. models.dev renamed the opencode free modelnorth-mini-code-free, which would break an existing registry pin — and that drift deserves its own sync pass rather than riding along here.Fixes#3323
Verification
node --test packages/core/dist/__tests__/**/*.test.js— 553/553 pass (includes new catalog + web-search assertions)node --test packages/runtime/dist/__tests__/**/*.test.js— 2843 pass, 0 fail (includes new wire-contract assertion keepingqwen3.8-maxonopenai-chat)@maka/desktoptypecheck — clean (all four tsconfigs)biome format/biome linton all touched files — cleanPROVIDER_REGISTRY['alibaba-cn']→ labelAlibaba (China), China endpoint,fallbackModels[0] === 'qwen3.8-max'AI use
Select exactly one:
Tool(s) and scope: Maka — investigation, implementation, and tests; commit carries the
Generated-by: Makatrailer.Checklist
Does this PR entail a change in behavior?