Skip to content

Commit 1340de1

Browse files
Add Grok 4.6 to the xAI OAuth model catalog
Register grok-4.6 in the OAuth default model catalog so it is selectable after xAI login. Keep grok-4.5 as the session default.
1 parent 2c4effc commit 1340de1

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

src/auth/xai/constants.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ export const XAI_SCOPES = ["openid", "profile", "email", "offline_access", "grok
1919
// API key). They authenticate against the CLI chat proxy, which exposes the
2020
// OpenAI-compatible /v1/chat/completions surface.
2121
export const XAI_BASE_URL = "https://cli-chat-proxy.grok.com/v1";
22-
// The grok CLI (which our OAuth scope mirrors) exposes only two models: Grok 4.5
23-
// (Grok Build's default coding model) and Composer 2.5 Fast. Mirror `grok models`
24-
// exactly — other model ids are rejected for grok-cli OAuth credentials.
22+
// Grok-cli OAuth credentials only accept model ids the CLI chat proxy serves.
23+
// Keep the catalog aligned with Grok Build / xAI listings; default stays the
24+
// last CLI-advertised coding model until the proxy is confirmed to accept a
25+
// newer flagship as the session default.
2526
export const XAI_DEFAULT_MODELS = [
2627
"grok-4.5",
28+
"grok-4.6",
2729
"grok-composer-2.5-fast",
2830
] as const;
2931

src/config/xai-providers.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ import {
1212
} from "./xai-providers.js";
1313

1414
describe("xAI OAuth provider projection", () => {
15-
test("default models mirror grok CLI catalog", () => {
16-
expect([...XAI_DEFAULT_MODELS]).toEqual(["grok-4.5", "grok-composer-2.5-fast"]);
17-
expect(XAI_DEFAULT_MODELS[0]).toBe("grok-4.5");
15+
test("default models include Grok 4.6 while defaulting to the CLI coding model", () => {
16+
const models: string[] = [...XAI_DEFAULT_MODELS];
17+
expect(models).toEqual(["grok-4.5", "grok-4.6", "grok-composer-2.5-fast"]);
18+
expect(models[0]).toBe("grok-4.5");
1819
});
1920

2021
const profile: XaiProfile = {

src/subagent/provider-family.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ describe("isKimiLeafProvider", () => {
8585
describe("detectModelFamily", () => {
8686
test("detects grok, kimi, and default", () => {
8787
expect(detectModelFamily({ providerName: "xai/default", model: "grok-4.5" })).toBe("grok");
88+
expect(detectModelFamily({ providerName: "xai/default", model: "grok-4.6" })).toBe("grok");
8889
expect(detectModelFamily({ providerName: "moonshot", model: "kimi-k2" })).toBe("kimi");
8990
expect(detectModelFamily({ providerName: "anthropic", model: "claude-sonnet-4" })).toBe("default");
9091
});

0 commit comments

Comments
 (0)