Skip to content

[codex] Add BigModel China provider#229

Closed
a19q3 wants to merge 1 commit into
1jehuang:masterfrom
a19q3:codex/add-bigmodel-cn-provider
Closed

[codex] Add BigModel China provider#229
a19q3 wants to merge 1 commit into
1jehuang:masterfrom
a19q3:codex/add-bigmodel-cn-provider

Conversation

@a19q3

@a19q3 a19q3 commented May 18, 2026

Copy link
Copy Markdown

Summary

  • Add a separate bigmodel OpenAI-compatible provider for Zhipu BigModel mainland China, defaulting to glm-5.1.
  • Keep the existing zai provider on its current Z.AI endpoint/default so overseas users are not rerouted.
  • Wire bigmodel through login metadata, CLI provider selection, auth source lookup, report/login picker surfaces, and static model fallbacks.
  • Keep BigModel static models visible when the live /models catalog is incomplete.
  • Preserve Kimi coding endpoint header behavior while ensuring BigModel is not treated as a Kimi/coding-agent endpoint.
  • Lock configured default providers against cross-provider failover so missing credentials fail clearly instead of silently billing another provider.

Validation

  • cargo fmt
  • cargo test -p jcode-provider-metadata matrix_login_provider_aliases_resolve_to_canonical_ids
  • cargo test -p jcode test_provider_choice_arg_values
  • cargo test -p jcode test_provider_choice_aliases_parse
  • cargo test -p jcode auth_issue_profile_metadata_matches_direct_provider_endpoints
  • cargo test -p jcode test_kimi_coding_header_detection_matches_endpoint_and_model
  • cargo test -p jcode bigmodel_static_models_remain_visible_when_live_catalog_is_incomplete
  • cargo test -p jcode named_builtin_profile_without_env_file_uses_builtin_env_file
  • cargo test -p jcode test_unconfigured_config_default_profile_stays_active_instead_of_using_other_profile_key

Local smoke checks confirmed jcode --no-update provider current resolves to Zhipu BigModel / glm-5.1 when configured, model list -p bigmodel shows glm-5.1, and a glm-5.1 BigModel request succeeds with saved credentials.

quangdang46 added a commit to quangdang46/jcode that referenced this pull request May 24, 2026
Gap close: upstream PR 1jehuang#229 (open) added BIGMODEL
profile + login. Master had neither.

  jcode login --provider bigmodel-cn
  ZHIPU_API_KEY=... jcode --provider bigmodel run 'hi'

Profile:
  api_base: https://open.bigmodel.cn/api/paas/v4
  api_key_env: ZHIPU_API_KEY
  default_model: glm-5.1
  aliases: [bigmodel-cn, zhipu-cn, glm-cn]

The mainland China endpoint differs from Z.AI's international
api.z.ai mirror. Bare 'bigmodel' / 'zhipu' continue to resolve to
Z.AI for backward compat with users on Z.AI Coding Plan.

Refs upstream PR 1jehuang#229, fork #167.
@1jehuang 1jehuang added the triage:declined PR triage: out of scope / not planned label Jun 12, 2026
@1jehuang

Copy link
Copy Markdown
Owner

Thanks for the effort, but this is out of scope for jcode right now and the repo no longer accepts external PRs. Closing.

@1jehuang 1jehuang closed this Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage:declined PR triage: out of scope / not planned

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants