Mirrored from upstream 1jehuang/jcode — Pull 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.
Summary
bigmodelOpenAI-compatible provider for Zhipu BigModel mainland China, defaulting toglm-5.1.zaiprovider on its current Z.AI endpoint/default so overseas users are not rerouted.bigmodelthrough login metadata, CLI provider selection, auth source lookup, report/login picker surfaces, and static model fallbacks./modelscatalog is incomplete.Validation
cargo fmtcargo test -p jcode-provider-metadata matrix_login_provider_aliases_resolve_to_canonical_idscargo test -p jcode test_provider_choice_arg_valuescargo test -p jcode test_provider_choice_aliases_parsecargo test -p jcode auth_issue_profile_metadata_matches_direct_provider_endpointscargo test -p jcode test_kimi_coding_header_detection_matches_endpoint_and_modelcargo test -p jcode bigmodel_static_models_remain_visible_when_live_catalog_is_incompletecargo test -p jcode named_builtin_profile_without_env_file_uses_builtin_env_filecargo test -p jcode test_unconfigured_config_default_profile_stays_active_instead_of_using_other_profile_keyLocal smoke checks confirmed
jcode --no-update provider currentresolves toZhipu BigModel / glm-5.1when configured,model list -p bigmodelshowsglm-5.1, and aglm-5.1BigModel request succeeds with saved credentials.