Skip to content

feat(providers): add BigModel.cn Zhipu support - #12343

Open
jackjinke wants to merge 12 commits into
diegosouzapw:release/v3.8.52from
jackjinke:feat/providers-bigmodel-zhipu
Open

jackjinke wants to merge 12 commits into
diegosouzapw:release/v3.8.52from
jackjinke:feat/providers-bigmodel-zhipu

Conversation

@jackjinke

@jackjinke jackjinke commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add bigmodel as the mainland China BigModel.cn / 智谱开放平台 provider, using the public bigmodel/ model prefix and the documented OpenAI-compatible https://open.bigmodel.cn/api/paas/v4/chat/completions endpoint with Bearer authentication.
  • Keep Zhipu's product surfaces separate: bigmodel is the mainland model API, existing zai remains the international Z.AI surface, and the existing glm / glm-cn providers remain the distinct GLM Coding services. Their hosts, credentials, and protocol paths are intentionally not merged.
  • Include the BigModel glm-5.3-flash catalog entry, correct the Z.AI website and API-key links, add Simplified/Traditional Chinese onboarding copy, reuse the existing Zhipu icon, and regenerate provider references/count mirrors.

Official references:

Related Issues

  • None.

Validation

  • Change type: provider / UI / i18n
  • Focused tests and category gates from the golden path
  • npm run lint — repository-wide lint is currently blocked by three pre-existing unused-variable errors in tests/unit/stream-passthrough-usage-estimation.test.ts; ESLint passes for every changed TypeScript/TSX file.
  • Reconciled with the current active release/v3.8.51 tip; focused checks rerun afterward
  • Production-code changes include new or updated automated tests in this PR

Commands run:

  • npm run check:provider-consistency
  • npm run check:provider-assets
  • node --import tsx/esm --import ./open-sse/utils/setupPolyfill.ts --import ./tests/_setup/isolateDataDir.ts --test tests/unit/bigmodel-provider.test.ts tests/unit/providers-constants-split.test.ts tests/unit/provider-translate-path-golden.test.ts
  • npx vitest run --config vitest.config.ts tests/unit/ui/ProviderIcon-icon-url.test.tsx
  • npm run i18n:sync-ui:dry
  • npm run i18n:check-ui-coverage
  • npm run i18n:check-value-drift (skipped by the repository checker because the base was unresolved)
  • npm run i18n:check-glossary
  • npm run check:docs-all
  • npm run check:changelog-integrity
  • npm run lint
  • Port-safe c8 coverage gate using the canonical unit/dashboard/serial manifests while excluding tests/unit/cli-serve-stop-command.test.ts
  • Browser smoke on an isolated server at port 32128: verified the BigModel card, zh-CN 智谱开放平台 copy, and corrected Z.AI link

Tests Added Or Updated

  • tests/unit/bigmodel-provider.test.ts
  • tests/unit/providers-constants-split.test.ts
  • tests/unit/ui/ProviderIcon-icon-url.test.tsx
  • tests/snapshots/provider/translate-path.json

Coverage Notes

  • BigModel regression tests cover the exact upstream URL (including the absence of an injected /v1 segment), OpenAI format, Bearer header, the bigmodel/ routing prefix, glm-5.3-flash, catalog metadata, Z.AI separation, and Chinese onboarding copy.
  • ProviderIcon's rendered test covers bigmodel resolving to /providers/zhipu.svg.
  • Final c8 metrics exceed the 60% gate: 84.36% statements, 84.36% lines, 87.63% functions, 79.61% branches. The command exited non-zero because four unrelated repository tests failed: reasoning-probe-truncated-response-10281, reasoning-token-buffer-6274, settings-i18n-keys, and stream-utils.
  • The normal coverage script was not used because tests/unit/cli-serve-stop-command.test.ts can call the real no-PID stop fallback and SIGTERM/SIGKILL a listener on port 20128. The port-safe manifest excluded that entire file and did not run E2E/integration suites.

Reviewer Notes

  • No migration or feature flag.
  • The provider uses the complete official /api/paas/v4/chat/completions URL directly; the default executor does not append /v1. Its public routing prefix is bigmodel/.
  • BigModel.cn, Z.AI, and GLM Coding are intentionally separate provider identities despite sharing Zhipu as the vendor.
  • Changelog fragment: changelog.d/features/12343-bigmodel-zhipu-provider.md.

@jackjinke
jackjinke marked this pull request as ready for review September 2, 2026 03:04
@jackjinke
jackjinke force-pushed the feat/providers-bigmodel-zhipu branch from 0726d31 to 24d1640 Compare September 3, 2026 04:18
jackjinke and others added 5 commits September 3, 2026 12:27
Add missing onboarding copy for bigmodel across UI locales, refresh
stale Z.AI translations after the English URL rewrite, and bump the
reserved-prefix freeze now that bigmodel is in the registry.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
Preserve BigModel.cn next to SeekAi, align live catalog counts (APIKEY
239, reserved prefixes 409, providers 357), and fill i18n keys dropped
by the JSON merge.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
Preserve BigModel.cn next to SeekAi and diegosouzapw#12669's eligibility-gated
free-tier catalog (~1.47B / 52 free-forever). Live unique counts stay
APIKEY 239, reserved prefixes 409, providers 357, with BigModel-specific
asserts.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
@diegosouzapw

Copy link
Copy Markdown
Owner

The bigmodel/glm-cn/zai separation is correct and well-tested — 6/6 provider tests pass
locally, including an explicit assertion that BigModel and Z.AI expose distinct links (nice
catch also fixing the stale Z.AI website/apiHint that pointed at bigmodel.cn). Given the
large 59-PR i18n merge batch that landed on the release branch on 09-14, this PR's 42
i18n/messages/*.json files will very likely need a real rebase-time conflict resolution
rather than a clean fast-forward — worth doing that rebase sooner rather than later. We'll
also double-check the API Route Typecheck failure isn't something real once the rebase is
in.

@diegosouzapw diegosouzapw added the protected-surface Touches an agent-instruction surface (AGENTS/CLAUDE/llm.txt/SKILL.md) — per-PR operator OK to merge label Sep 15, 2026
jackjinke and others added 4 commits September 15, 2026 23:10
Merge origin/release/v3.8.51 (997cd4d, +307 commits since the branch's
prior sync point) to resolve the real conflicts against the 09-14
KooshaPari i18n batch and later provider additions. All conflicts were
mechanical provider-count text (356/357 -> 359, accounting for the
GreenPT/EURouter/Arcee AI additions already on the tip plus this PR's
BigModel.cn) across AGENTS.md, README.md, llm.txt + 46 docs/i18n/*/llm.txt
mirrors, package.json, docs/diagrams/*.svg, public/images/tier-flow-*.svg
and docs/reference/PROVIDER_REFERENCE.md (regenerated via
`bun scripts/docs/gen-provider-reference.ts`). Also resynced the 24
docs/i18n/*/llm.txt mirrors the PR never touched (untouched by the merge
so still carrying the pre-merge provider count) to the merged root body,
which check-docs-sync.mjs requires byte-identical. The two provider-count
regression tests (RESERVED_PREFIX_COUNT, APIKEY_PROVIDER_COUNT) were
updated to the merged totals (413 / 241) and pass.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
…51 merge

The prior merge commit's 3-way auto-merge silently dropped several
non-conflicting hunks from origin/release/v3.8.51 (997cd4d) even though
this branch had no competing change in those regions (ours == merge-base
for every affected file) — most visibly the diegosouzapw#13747 base-reds fixups
(call-log traceId keying, Jina custom-row provider prefix, CI workflow,
gitleaks config, stryker config, i18n retranslate work) and, in
src/i18n/messages/*.json, a set of duplicated keys where an older
Arabic/etc. translation and a newer untranslated English value for the
same key both survived (JSON.parse silently keeps the last one, masking
the duplication) plus 6 missing settings/featureFlags keys across 39
locales.

Fixed by:
- Restoring the 19 unrelated files (CI/gitleaks/stryker config, i18n
  tooling, and the traceId/Jina/paid-target/retranslate test files) to
  their exact origin/release/v3.8.51 content — this PR never touches any
  of them.
- Rebuilding all 42 src/i18n/messages/*.json files this PR legitimately
  touches from the clean tip content plus exactly this PR's own two-line
  diff per locale (add the "bigmodel" onboarding hint, fix the "zai" one)
  taken from jackjinke's original commit 04707b5, verified duplicate-key-
  free and with zero keys missing relative to the pinned tip (997cd4d).

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
…3782 (2 commits, cde49c9)

The branch moved twice more while this PR was being reconciled. Merge the
remaining 2 commits from origin/release/v3.8.51: diegosouzapw#13747 (base-reds
cleanup, already reflected by the previous commit) and diegosouzapw#13782 (retranslate
every verbatim-English leaf across all 65 locale catalogs). Resolved the
resulting real conflicts in es.json and uk-UA.json by keeping the tip's
newly retranslated onboardingProviderDescriptions content and re-applying
this PR's own bigmodel/zai lines (already translated by jackjinke) on top.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
…esolve dirty PR diegosouzapw#12343

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
@diegosouzapw diegosouzapw changed the title feat(providers): add BigModel.cn Zhipu support [defer] feat(providers): add BigModel.cn Zhipu support Sep 25, 2026
@diegosouzapw diegosouzapw added the deferred-v3.8.52 Grande demais / suspeito para o lote atual; precisa de sessão dedicada no ciclo v3.8.52 label Sep 25, 2026
@diegosouzapw
diegosouzapw changed the base branch from release/v3.8.51 to release/v3.8.52 September 29, 2026 11:29
@diegosouzapw

Copy link
Copy Markdown
Owner

Re-homed to release/v3.8.52: v3.8.51 entered its release freeze, so the branch now belongs to the release captain and development continues on the next cycle. Nothing is wrong with this PR — it just needed a live base. No action needed from you; CI will re-run against the new base.

@diegosouzapw diegosouzapw removed the deferred-v3.8.52 Grande demais / suspeito para o lote atual; precisa de sessão dedicada no ciclo v3.8.52 label Oct 1, 2026
@diegosouzapw diegosouzapw changed the title [defer] feat(providers): add BigModel.cn Zhipu support feat(providers): add BigModel.cn Zhipu support Oct 1, 2026

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

protected-surface Touches an agent-instruction surface (AGENTS/CLAUDE/llm.txt/SKILL.md) — per-PR operator OK to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants