feat(zai): auto-detect endpoint + default glm-5 (#14786)

* feat(zai): auto-detect endpoint + default glm-5

* test: fix Z.AI default endpoint expectation (#14786)

* test: bump embedded runner beforeAll timeout

* chore: update changelog for Z.AI GLM-5 autodetect (#14786)

* chore: resolve changelog merge conflict with main (#14786)

* chore: append changelog note for #14786 without merge conflict

* chore: sync changelog with main to resolve merge conflict
This commit is contained in:
Peter Steinberger
2026-02-12 19:16:04 +01:00
committed by GitHub
parent 2b5df1dfea
commit 5e7842a41d
15 changed files with 406 additions and 66 deletions

View File

@@ -27,7 +27,7 @@ import {
setMinimaxApiKey,
writeOAuthCredentials,
ZAI_CODING_CN_BASE_URL,
ZAI_CODING_GLOBAL_BASE_URL,
ZAI_GLOBAL_BASE_URL,
} from "./onboard-auth.js";
const authProfilePathFor = (agentDir: string) => path.join(agentDir, "auth-profiles.json");
@@ -311,7 +311,8 @@ describe("applyZaiConfig", () => {
it("adds zai provider with correct settings", () => {
const cfg = applyZaiConfig({});
expect(cfg.models?.providers?.zai).toMatchObject({
baseUrl: ZAI_CODING_GLOBAL_BASE_URL,
// Default: general (non-coding) endpoint. Coding Plan endpoint is detected during onboarding.
baseUrl: ZAI_GLOBAL_BASE_URL,
api: "openai-completions",
});
const ids = cfg.models?.providers?.zai?.models?.map((m) => m.id);