Skip to content

feat(providers): add Alibaba direct API support - #992

Merged
Astro-Han merged 1 commit into
apache:mainfrom
Colafornia:feat/provider-alibaba
Jul 15, 2026
Merged

Astro-Han merged 1 commit into
apache:mainfrom
Colafornia:feat/provider-alibaba

Conversation

@Colafornia

@Colafornia Colafornia commented Jul 14, 2026 •

Copy link
Copy Markdown
Member

Summary

  • add Alibaba as a ready OpenAI-compatible direct API provider with models.dev metadata, account model discovery, DashScope credentials, and brand assets; refs feat(providers): support common providers from models.dev #860
  • default to the international Model Studio endpoint while preserving exact Qwen model IDs and allowing a provider-specific base URL override
  • filter discovered models to the supported snapshot fallback and cover discovery, reasoning replay, tool calls, catalog setup, and the vendored Alibaba Cloud mark

Validation

  • npm --workspace @maka/core test
  • node --test scripts/sync-model-metadata.test.mjs
  • npm --workspace @maka/headless run build && node --test packages/headless/dist/__tests__/provider-env.test.js
  • npm --workspace @maka/desktop run typecheck
  • node --test apps/desktop/dist/main/__tests__/icon-governance-contract.test.js
  • npm --workspace @maka/runtime run build && node --test packages/runtime/dist/__tests__/provider-contract-matrix.test.js
  • git diff --check

@Astro-Han

Copy link
Copy Markdown
Contributor

The PR looks good but rebase is needed.

@Astro-Han Astro-Han 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.

Approving the Alibaba wiring — the registry entry follows the same seam as groq/openrouter (baseUrl from models.dev alibaba.api, modelDiscovery {filter:'fallback-models'}, openai protocol, openai-compatible adapter), qwen3.7-plus is a real models.dev snapshot entry, the color mark is byte-vendored with a matching SHA + third-party notice, and the headless DASHSCOPE env and sync-script mapping are in place. A few things to fix first — all consequences of the branch being behind main:

1. Drop the per-provider E2E case (apps/desktop/e2e/providers.spec.ts).
test('adds Alibaba with its exact snapshot model and upstream color mark') is exactly the per-provider add-flow test AGENTS.md asks us not to add — it mirrors the Groq/Cloudflare cases that #991 already consolidated into the 4 representative journeys. Alibaba's facts are covered by the registry contract tests and its color mark by the icon-governance-contract test this PR already extends, so the case is redundant. Please rebase onto current main (which no longer has per-provider cases) and don't re-add it. Also drop the --grep 'adds Alibaba' line from the validation list.

2. Order collision — readyOrder/catalogOrder: 40 clashes with OpenRouter.
This branch predates #987, so OpenRouter now owns 40 on main. The uniqueness contract in llm-connections.test.ts (readyOrder/catalogOrder/recommendedOrder must be unique) will fail after rebase. Bump Alibaba to 41.

3. Provider-list contract.
The expected provider-type list in llm-connections.test.ts needs both openrouter (from main) and alibaba — resolve the rebase conflict so both are present.

4. Re-stack the generated/vendored files on post-#987 main.
model-metadata.generated.ts, THIRD_PARTY_LICENSES.txt, and icon-governance-contract.test.ts should be re-layered on top of the OpenRouter entries so the merge conflict clears.

None of these are blocking correctness — happy to re-approve once the rebase + order bump + E2E removal land.

@Colafornia
Colafornia force-pushed the feat/provider-alibaba branch from c08aed2 to 65dd3ef Compare July 15, 2026 01:46
@Colafornia
Colafornia force-pushed the feat/provider-alibaba branch from 65dd3ef to 360c489 Compare July 15, 2026 01:54
@Colafornia

Copy link
Copy Markdown
Member Author

@Astro-Han Thanks for the review. I’ve rebased the branch and addressed the issues you pointed out.

@Astro-Han
Astro-Han merged commit b6d4c14 into apache:main Jul 15, 2026
3 checks passed
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