Skip to content

Comments

feat(config): add zai.baseUrl support in config.json#102

Open
liuy wants to merge 1 commit intosteipete:mainfrom
liuy:feat/zai-baseurl-config
Open

feat(config): add zai.baseUrl support in config.json#102
liuy wants to merge 1 commit intosteipete:mainfrom
liuy:feat/zai-baseurl-config

Conversation

@liuy
Copy link

@liuy liuy commented Feb 17, 2026

Allow configuring Z.AI base URL via config.json, enabling users to use China endpoint (api.zhipuai.cn) or custom gateways without setting environment variables.

Changes

  • Add ZaiConfig type with baseUrl option
  • Add zai field to SummarizeConfig
  • Pass zaiBaseUrlOverride through the call chain
  • Read zai.baseUrl from config in run-env.ts

Precedence

Z_AI_BASE_URL env > config.json zai.baseUrl > default

Example config

{
  "zai": {
    "baseUrl": "https://open.bigmodel.cn/api/coding/paas/v4"
  }
}

This allows users in China to easily switch to the domestic endpoint without setting environment variables.

Allow configuring Z.AI base URL via config.json, enabling users to use
China endpoint (api.zhipuai.cn) or custom gateways without setting
environment variables.

Precedence: Z_AI_BASE_URL env > config.json zai.baseUrl > default

Example config:
{
  "zai": {
    "baseUrl": "https://open.bigmodel.cn/api/coding/paas/v4"
  }
}
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.

1 participant