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
19 changes: 19 additions & 0 deletions apps/web/src/settings/provider-models.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { describe, expect, test } from "bun:test";

import { PROVIDER_MODELS } from "./provider-models";

// Mirrors `grok models` on Grok Build CLI 1.0.46 (unauthenticated, served by
// the same cli-chat-proxy.grok.com the xai provider option mints offerings
// against): the default first, then the rest of the listed catalog.
const GROK_CLI_1_0_46_CATALOG = [
{ id: "grok-4.7", label: "Grok 4.7" },
{ id: "grok-4.7-build-fast", label: "Grok 4.7 Build Fast" },
{ id: "grok-4.6", label: "Grok 4.6" },
{ id: "grok-4.5", label: "Grok 4.5" },
] as const;

describe("xai provider models", () => {
test("matches the Grok Build CLI 1.0.46 proxy catalog, default first", () => {
expect(PROVIDER_MODELS["xai"]).toEqual([...GROK_CLI_1_0_46_CATALOG]);
});
});
5 changes: 3 additions & 2 deletions apps/web/src/settings/provider-models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ export const PROVIDER_MODELS: Readonly<Record<string, readonly ProviderModel[]>>
{ id: "x-ai/grok-4", label: "Grok 4" },
],
xai: [
{ id: "grok-4.7", label: "Grok 4.7" },
{ id: "grok-4.7-build-fast", label: "Grok 4.7 Build Fast" },
{ id: "grok-4.6", label: "Grok 4.6" },
{ id: "grok-4", label: "Grok 4" },
{ id: "grok-4-fast", label: "Grok 4 Fast" },
{ id: "grok-4.5", label: "Grok 4.5" },
],
codex: [{ id: "gpt-5.5", label: "GPT-5.5" }],
custom: [],
Expand Down
Loading