Skip to content

[Upstream PR #229] [codex] Add BigModel China provider #167

@quangdang46

Description

@quangdang46

Mirrored from upstream 1jehuang/jcodePull Request #229 by @a19q3
Original state: open
Created: 2026-05-18T08:45:11Z · Updated: 2026-05-18T08:45:11Z
Diff: https://github.com/1jehuang/jcode/pull/229.diff
This issue is an auto-mirrored copy. Comments and edits here are local to quangdang46/jcode — do not expect them to propagate upstream.


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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions