Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Changed the default Prime Inference model from GLM 5.2 to GLM 5.3.
2 changes: 1 addition & 1 deletion packages/coding-agent/src/core/model-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { isPrivatePrimeInferenceModel } from "./prime-inference-models.js";

const log = getLogger("coding-agent.model-resolver");

export const PRIME_INFERENCE_DEFAULT_MODEL_ID = "z-ai/glm-5.2";
export const PRIME_INFERENCE_DEFAULT_MODEL_ID = "z-ai/glm-5.3";

/** Default model IDs for each known provider */
export const defaultModelPerProvider: Record<KnownProvider, string> = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8693,7 +8693,7 @@ export class InteractiveMode {
);
}
} else if (!selectedModel) {
this.showError("Prime Inference login succeeded, but the default GLM 5.2 model is unavailable.");
this.showError("Prime Inference login succeeded, but the default GLM 5.3 model is unavailable.");
}

return true;
Expand Down
4 changes: 2 additions & 2 deletions packages/coding-agent/test/interactive-mode-status.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4120,8 +4120,8 @@ describe("InteractiveMode post-login model preparation", () => {
maxTokens: 128000,
} as AgentConnectionModel;

test("persists GLM 5.2 before model selection after Prime Inference login", async () => {
const fallbackModel = { ...loginPrimeModel, id: "z-ai/glm-5.2", name: "GLM 5.2" };
test("persists GLM 5.3 before model selection after Prime Inference login", async () => {
const fallbackModel = { ...loginPrimeModel, id: "z-ai/glm-5.3", name: "GLM 5.3" };
const flushSettings = vi.fn(async () => {});
const fakeThis = Object.create(InteractiveMode.prototype) as LoginHarness;
fakeThis.invalidateConnectionModels = vi.fn();
Expand Down
14 changes: 9 additions & 5 deletions packages/coding-agent/test/model-resolver.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ describe("default model selection", () => {
test("openai defaults track current models", () => {
expect(defaultModelPerProvider.openai).toBe("gpt-5.4");
expect(defaultModelPerProvider["openai-codex"]).toBe("gpt-5.5");
expect(defaultModelPerProvider["prime-inference"]).toBe("z-ai/glm-5.2");
expect(defaultModelPerProvider["prime-inference"]).toBe("z-ai/glm-5.3");
});

test("every per-provider default exists in the model catalog", () => {
Expand Down Expand Up @@ -358,15 +358,15 @@ describe("default model selection", () => {
expect(result.thinkingLevel).toBe("medium");
});

test("findInitialModel prefers GLM 5.2 when Prime Inference is configured", async () => {
test("findInitialModel prefers GLM 5.3 when Prime Inference is configured", async () => {
const anthropicModel: Model<"anthropic-messages"> = {
...mockModels[0],
id: "claude-opus-4-7",
name: "Claude Opus 4.7",
};
const primeModel: Model<"anthropic-messages"> = {
id: "z-ai/glm-5.2",
name: "GLM 5.2",
id: "z-ai/glm-5.3",
name: "GLM 5.3",
api: "anthropic-messages",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
Expand All @@ -377,7 +377,11 @@ describe("default model selection", () => {
maxTokens: 101376,
};
const registry = {
refreshAvailableModels: async () => [anthropicModel, primeModel],
refreshAvailableModels: async () => [
anthropicModel,
{ ...primeModel, id: "z-ai/glm-5.2", name: "GLM 5.2" },
primeModel,
],
} as unknown as Parameters<typeof findInitialModel>[0]["modelRegistry"];

const result = await findInitialModel({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { describe, expect, test } from "vitest";
import { resolvePrimeInferencePostLoginModelAction } from "../src/core/prime-inference-model-selection.js";

const glmModel: Model<"openai-completions"> = {
id: "z-ai/glm-5.2",
name: "GLM 5.2",
id: "z-ai/glm-5.3",
name: "GLM 5.3",
api: "openai-completions",
provider: "prime-inference",
baseUrl: "https://api.pinference.ai/api/v1",
Expand All @@ -21,7 +21,7 @@ const registry = {
};

describe("Prime Inference post-login model selection", () => {
test("selects GLM 5.2 as a fallback and opens the model picker", () => {
test("selects GLM 5.3 as a fallback and opens the model picker", () => {
const action = resolvePrimeInferencePostLoginModelAction(
{
status: "success",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ describe("ENG-4573 Prime Inference login default", () => {
}
});

test("persists GLM 5.2 so the next process starts with a valid model", async () => {
test("persists GLM 5.3 so the next process starts with a valid model", async () => {
const harness = await createHarness({
provider: PRIME_INFERENCE_PROVIDER_ID,
models: [{ id: PRIME_INFERENCE_DEFAULT_MODEL_ID, name: "GLM 5.2" }],
models: [{ id: PRIME_INFERENCE_DEFAULT_MODEL_ID, name: "GLM 5.3" }],
});
harnesses.push(harness);
const agentDir = join(harness.tempDir, "agent");
Expand All @@ -64,10 +64,10 @@ describe("ENG-4573 Prime Inference login default", () => {
expect(initial.model?.id).toBe(PRIME_INFERENCE_DEFAULT_MODEL_ID);
});

test("refreshes authenticated models before selecting and persisting GLM 5.2", async () => {
test("refreshes authenticated models before selecting and persisting GLM 5.3", async () => {
const fallbackModel: AgentConnectionModel = {
id: PRIME_INFERENCE_DEFAULT_MODEL_ID,
name: "GLM 5.2",
name: "GLM 5.3",
api: "openai-completions",
provider: PRIME_INFERENCE_PROVIDER_ID,
baseUrl: "https://api.pinference.ai/api/v1",
Expand Down
Loading