Skip to content

armgit / eve

Public Imported from GitHub
0

The Open Framework for Building Agents

feat(eve): default new agents to Grok 4.7 (#3598)

Shar3d96b698e143
diff --git a/.changeset/grok-scaffolding-default.md b/.changeset/grok-scaffolding-default.md
new file mode 100644
index 000000000..644a63ef7
--- /dev/null
+++ b/.changeset/grok-scaffolding-default.md
@@ -0,0 +1,5 @@
+---
+"eve": patch
+---
+
+Use `spacexai/grok-4.7` as the default model for new projects, agents without an `agent.ts`, and Gateway setup.
diff --git a/README.md b/README.md
index 53a7590ab..91a590825 100644
--- a/README.md
+++ b/README.md
@@ -93,7 +93,7 @@ Choose the model in `agent/agent.ts`:
import { defineAgent } from "eve";
export default defineAgent({
- model: "openai/gpt-5.6-luna-fast",
+ model: "spacexai/grok-4.7",
});
```
diff --git a/apps/benchmarks/evals/author-002-new-project/EVAL.ts b/apps/benchmarks/evals/author-002-new-project/EVAL.ts
index 86ec7e5fb..e42ed047a 100644
--- a/apps/benchmarks/evals/author-002-new-project/EVAL.ts
+++ b/apps/benchmarks/evals/author-002-new-project/EVAL.ts
@@ -4,7 +4,7 @@ import { expect, test } from "vitest";
const projectRoot = "wayfinder";
-const defaultAgentModel = "openai/gpt-5.6-luna-fast";
+const defaultAgentModel = "spacexai/grok-4.7";
test("creates a complete eve project in place", () => {
expect(existsSync(`${projectRoot}/agent/channels/eve.ts`)).toBe(true);
diff --git a/docs/agent-config.md b/docs/agent-config.md
index 269df87a5..f8853ba84 100644
--- a/docs/agent-config.md
+++ b/docs/agent-config.md
@@ -21,7 +21,7 @@ For a static AI Gateway model ID, you can make the same source change from the
project root with `eve set --model anthropic/claude-opus-4.8` or from the local
dev TUI with `/model anthropic/claude-opus-4.8`.
-The root `agent.ts` can be omitted when no runtime config is needed. eve then selects its default `agent.ts` source at the same slot, configured with `openai/gpt-5.6-luna-fast`; authoring the file replaces that source.
+The root `agent.ts` can be omitted when no runtime config is needed. eve then selects its default `agent.ts` source at the same slot, configured with `spacexai/grok-4.7`; authoring the file replaces that source.
When `agent.ts` is present, `model` is required.
A config that selects a static Gateway model is compile-only. A config that contains a dynamic model or a direct-provider `LanguageModel` remains a runtime entry because eve must resolve that authored value while the agent runs. See [Authored module lifecycle](./reference/typescript-api#authored-module-lifecycle).
diff --git a/docs/guides/dev-tui.md b/docs/guides/dev-tui.md
index 8f734140b..343812b10 100644
--- a/docs/guides/dev-tui.md
+++ b/docs/guides/dev-tui.md
@@ -71,7 +71,7 @@ Changes apply together after the final choice, then the picker returns to chat.
A successful login or model change takes effect on the next prompt.
-OpenAI, ChatGPT, and Gateway connections default to `gpt-5.6-luna-fast`; Anthropic defaults to `claude-sonnet-5`. An explicitly authored compatible model stays selected. If a new default is unavailable, eve offers the connection's available models. Dynamic or custom model expressions must be edited in `agent.ts`.
+Gateway connections default to `spacexai/grok-4.7`; OpenAI and ChatGPT default to `gpt-5.6-luna-fast`; Anthropic defaults to `claude-sonnet-5`. An explicitly authored compatible model stays selected. If a new default is unavailable, eve offers the connection's available models. Dynamic or custom model expressions must be edited in `agent.ts`.
## Add an integration
diff --git a/docs/reference/cli.md b/docs/reference/cli.md
index 7ea6abed7..afff820b6 100644
--- a/docs/reference/cli.md
+++ b/docs/reference/cli.md
@@ -59,11 +59,11 @@ Existing packages do not need a target-selection prompt: run `eve init` from the
After scaffolding in an interactive human terminal, eve opens the TUI directly. Noninteractive and coding-agent invocations return without starting an interactive session. Fresh projects use the parent workspace's package manager when there is one; otherwise they use the manager that launched `eve init`.
-| Flag | Type | Default | Description |
-| ---------------------- | ------ | -------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
-| `--model <model>` | string | `openai/gpt-5.6-luna-fast` | Set the root agent's AI Gateway model ID. |
-| `--reasoning <effort>` | enum | provider default | Set reasoning to `none`, `minimal`, `low`, `medium`, `high`, or `xhigh`. `provider-default` leaves the field unauthored. |
-| `--channel-web-nextjs` | flag | off | Add the Web Chat app (Next.js). Not for existing projects — run `eve add channel/web` there instead. |
+| Flag | Type | Default | Description |
+| ---------------------- | ------ | ------------------- | ------------------------------------------------------------------------------------------------------------------------ |
+| `--model <model>` | string | `spacexai/grok-4.7` | Set the root agent's AI Gateway model ID. |
+| `--reasoning <effort>` | enum | provider default | Set reasoning to `none`, `minimal`, `low`, `medium`, `high`, or `xhigh`. `provider-default` leaves the field unauthored. |
+| `--channel-web-nextjs` | flag | off | Add the Web Chat app (Next.js). Not for existing projects — run `eve add channel/web` there instead. |
## `eve extension`
diff --git a/packages/eve/src/cli/commands/agent-instructions.test.ts b/packages/eve/src/cli/commands/agent-instructions.test.ts
index dd69cf5e5..72a03101d 100644
--- a/packages/eve/src/cli/commands/agent-instructions.test.ts
+++ b/packages/eve/src/cli/commands/agent-instructions.test.ts
@@ -59,7 +59,7 @@ describe("initAgentInstructions", () => {
describe("initAgentReadySummary", () => {
it("reports the model and generated instructions path", () => {
expect(stripAnsi(initAgentReadySummary(undefined, "/app"))).toBe(
- "✓ Model openai/gpt-5.6-luna-fast (eve default)\n✓ Instructions /app/agent/instructions.md",
+ "✓ Model spacexai/grok-4.7 (eve default)\n✓ Instructions /app/agent/instructions.md",
);
expect(stripAnsi(initAgentReadySummary("openai/gpt-5.5", "/app"))).toContain(
"✓ Model openai/gpt-5.5\n",
@@ -68,7 +68,7 @@ describe("initAgentReadySummary", () => {
it("reports the agents directory for a workspace", () => {
expect(stripAnsi(initAgentReadySummary(undefined, "/app", { workspace: true }))).toBe(
- "✓ Model openai/gpt-5.6-luna-fast (eve default)\n✓ Agents /app/agents",
+ "✓ Model spacexai/grok-4.7 (eve default)\n✓ Agents /app/agents",
);
});
});
diff --git a/packages/eve/src/self-modification/search-models.test.ts b/packages/eve/src/self-modification/search-models.test.ts
index 952e0c65f..8d26ec8ea 100644
--- a/packages/eve/src/self-modification/search-models.test.ts
+++ b/packages/eve/src/self-modification/search-models.test.ts
@@ -23,9 +23,9 @@ const CATALOG = {
type: "language",
},
{
- id: "openai/gpt-5.6-luna-fast",
- name: "GPT-5.6 Luna Fast",
- owned_by: "openai",
+ id: "spacexai/grok-4.7",
+ name: "Grok 4.7",
+ owned_by: "spacexai",
tags: [],
type: "language",
},
@@ -49,11 +49,11 @@ describe("searchGatewayModels", () => {
});
it("uses the same language-model eligibility as /model", () => {
- expect(searchGatewayModels(parseGatewayModelCatalog(CATALOG), "luna")).toEqual([
+ expect(searchGatewayModels(parseGatewayModelCatalog(CATALOG), "grok")).toEqual([
{
- id: "openai/gpt-5.6-luna-fast",
- name: "GPT-5.6 Luna Fast",
- provider: "openai",
+ id: "spacexai/grok-4.7",
+ name: "Grok 4.7",
+ provider: "spacexai",
},
]);
expect(searchGatewayModels(parseGatewayModelCatalog(CATALOG), "image")).toEqual([]);
diff --git a/packages/eve/src/setup/boxes/select-model.test.ts b/packages/eve/src/setup/boxes/select-model.test.ts
index 45edc17a6..8ca5fe875 100644
--- a/packages/eve/src/setup/boxes/select-model.test.ts
+++ b/packages/eve/src/setup/boxes/select-model.test.ts
@@ -55,10 +55,10 @@ const CATALOG: GatewayCatalogModel[] = [
tags: ["web-search"],
},
{
- id: "openai/gpt-5.6-luna-fast",
- name: "GPT-5.6 Luna Fast",
+ id: "spacexai/grok-4.7",
+ name: "Grok 4.7",
type: "language",
- owned_by: "openai",
+ owned_by: "spacexai",
released: 100,
tags: ["reasoning"],
},
@@ -110,14 +110,14 @@ describe("modelOptionsFromCatalog", () => {
const options = modelOptionsFromCatalog(CATALOG);
expect(options.map((option) => option.value)).toEqual([
- "openai/gpt-5.6-luna-fast",
+ "spacexai/grok-4.7",
"zai/glm-4.6",
"openai/gpt-5-mini",
]);
expect(options.filter((option) => option.featured).map((o) => o.value)).toEqual([
- "openai/gpt-5.6-luna-fast",
+ "spacexai/grok-4.7",
]);
- expect(options[0]?.hint).toBe("OpenAI");
+ expect(options[0]?.hint).toBe("SpaceXAI");
});
it("falls back to the static shortlist without a catalog or matches", () => {
@@ -149,7 +149,7 @@ describe("selectModel box", () => {
let captured: SingleSelectOptions<PrompterValue> | undefined;
const { prompter } = createSelectPrompter((opts) => {
captured = opts;
- return "openai/gpt-5.6-luna-fast";
+ return "spacexai/grok-4.7";
});
const box = selectModel({ asker: interactiveAsker(prompter), deps: catalogDeps() });
@@ -157,16 +157,16 @@ describe("selectModel box", () => {
expect(result.kind).toBe("done");
if (result.kind !== "done") return;
- expect(result.state.modelId).toBe("openai/gpt-5.6-luna-fast");
+ expect(result.state.modelId).toBe("spacexai/grok-4.7");
expect(captured?.search).toBe(true);
// The featured default remains first; the rest are newest release first.
expect(captured?.options.map((option) => option.value)).toEqual([
- "openai/gpt-5.6-luna-fast",
+ "spacexai/grok-4.7",
"zai/glm-4.6",
"openai/gpt-5-mini",
]);
// Cursor defaults to the top catalog entry when no default is configured.
- expect(captured?.initialValue).toBe("openai/gpt-5.6-luna-fast");
+ expect(captured?.initialValue).toBe("spacexai/grok-4.7");
});
it("orders the curated shortlist first, marks it featured, and pre-selects the default", async () => {
@@ -194,7 +194,7 @@ describe("selectModel box", () => {
expect(result.kind).toBe("done");
if (result.kind !== "done") return;
expect(captured?.options.map((option) => option.value)).toEqual([
- "openai/gpt-5.6-luna-fast",
+ "spacexai/grok-4.7",
"anthropic/claude-opus-4.8",
"zai/glm-4.6",
"openai/gpt-5-mini",
@@ -202,7 +202,7 @@ describe("selectModel box", () => {
// Only the curated entries are featured: the picker's default view shows
// them alone, and scrolling or search surfaces the rest of the catalog.
expect(captured?.options.filter((option) => option.featured).map((o) => o.value)).toEqual([
- "openai/gpt-5.6-luna-fast",
+ "spacexai/grok-4.7",
"anthropic/claude-opus-4.8",
]);
expect(captured?.initialValue).toBe(DEFAULT_AGENT_MODEL_ID);
diff --git a/packages/eve/src/setup/boxes/select-model.ts b/packages/eve/src/setup/boxes/select-model.ts
index 4e7e33904..a17f79d0d 100644
--- a/packages/eve/src/setup/boxes/select-model.ts
+++ b/packages/eve/src/setup/boxes/select-model.ts
@@ -35,7 +35,7 @@ const FEATURED_MODEL_IDS: readonly string[] = [
];
const FALLBACK_MODELS: SelectOption<string>[] = [
- modelOption(DEFAULT_AGENT_MODEL_ID, "GPT-5.6 Luna Fast", "OpenAI"),
+ modelOption(DEFAULT_AGENT_MODEL_ID, "Grok 4.7", "SpaceXAI"),
modelOption("anthropic/claude-opus-4.8", "Claude Opus 4.8", "Anthropic"),
modelOption("openai/gpt-5.5", "GPT-5.5", "OpenAI"),
modelOption("google/gemini-3.5", "Gemini 3.5", "Google", false),
@@ -46,6 +46,7 @@ const PROVIDER_BRANDS: Record<string, string> = {
openai: "OpenAI",
zai: "Z.AI",
xai: "xAI",
+ spacexai: "SpaceXAI",
deepseek: "DeepSeek",
moonshotai: "Moonshot AI",
};
diff --git a/packages/eve/src/setup/flows/model-login.test.ts b/packages/eve/src/setup/flows/model-login.test.ts
index 006166efb..a7903b99e 100644
--- a/packages/eve/src/setup/flows/model-login.test.ts
+++ b/packages/eve/src/setup/flows/model-login.test.ts
@@ -80,7 +80,7 @@ beforeEach(() => {
compiledState: {
manifest: {
config: {
- model: { id: "openai/gpt-5.6-luna-fast", routing: { kind: "gateway", target: "openai" } },
+ model: { id: "spacexai/grok-4.7", routing: { kind: "gateway", target: "spacexai" } },
},
},
},
@@ -90,9 +90,9 @@ beforeEach(() => {
vi.stubEnv("EVE_MODEL_CONNECTION", undefined);
mocks.session.mockResolvedValue({ accessToken: "access", teamId: "team_123", teamName: "Alice" });
mocks.readSession.mockResolvedValue({ refreshToken: "refresh" });
- mocks.authored.mockResolvedValue("openai/gpt-5.6-luna-fast");
+ mocks.authored.mockResolvedValue("spacexai/grok-4.7");
mocks.oauth.mockResolvedValue({ teamId: "team_123", teamName: "Alice" });
- mocks.catalog.mockResolvedValue([{ id: "openai/gpt-5.6-luna-fast", type: "language" }]);
+ mocks.catalog.mockResolvedValue([{ id: "spacexai/grok-4.7", type: "language" }]);
mocks.change.mockResolvedValue({ kind: "changed" });
mocks.readSecret.mockResolvedValue("stored-key");
mocks.models.mockResolvedValue({
@@ -124,6 +124,20 @@ describe("model login", () => {
if (selected === "chatgpt") expect(mocks.chatgpt).toHaveBeenCalledOnce();
},
);
+ it.each(["vercel", "ai-gateway-key"])(
+ "selects Grok when switching from ChatGPT to %s",
+ async (selected) => {
+ mocks.authored.mockResolvedValue("chatgpt/gpt-5.6-luna-fast");
+ const fake = createFakePrompter({ single: () => selected, password: () => "new-key" });
+
+ expect(await runModelLogin({ appRoot: "/agent", prompter: fake.prompter })).toMatchObject({
+ kind: "ready",
+ reload: true,
+ });
+ expect(fake.selectMessages).toEqual(["Choose a connection"]);
+ expect(mocks.change).toHaveBeenCalledWith({ appRoot: "/agent", slug: "spacexai/grok-4.7" });
+ },
+ );
it("reuses the CLI team without any prompts or project linking", async () => {
mocks.cli.mockResolvedValue({ token: "cli-token", teamId: "team_123" });
const fake = createFakePrompter();
@@ -363,7 +377,7 @@ it("overlaps Gateway catalog loading with OAuth and does not validate the return
mocks.oauth.mockReturnValue(oauth.promise);
mocks.catalog.mockImplementation(async () => {
catalogStarted.resolve();
- return [{ id: "openai/gpt-5.6-luna-fast", type: "language" }];
+ return [{ id: "spacexai/grok-4.7", type: "language" }];
});
const result = runModelLogin({
appRoot: "/agent",
@@ -454,7 +468,7 @@ it("changes teams without recompiling an unchanged Gateway model", async () => {
kind: "ready",
reload: false,
model: {
- id: "openai/gpt-5.6-luna-fast",
+ id: "spacexai/grok-4.7",
endpoint: { kind: "gateway", connected: true, credential: "oauth", team: "Alice" },
},
});
diff --git a/packages/eve/src/setup/flows/model-login.ts b/packages/eve/src/setup/flows/model-login.ts
index e638d43ba..583d78984 100644
--- a/packages/eve/src/setup/flows/model-login.ts
+++ b/packages/eve/src/setup/flows/model-login.ts
@@ -1,6 +1,7 @@
import { resolveModelEndpointStatus } from "#internal/resolve-model-endpoint-status.js";
import { classifyModelRouting } from "#internal/classify-model-routing.js";
import type { ConnectedModel } from "#shared/model-connection.js";
+import { DEFAULT_AGENT_MODEL_ID } from "#shared/default-agent-model.js";
import { measureLoginStage, withLoginProgress } from "./model-login-progress.js";
import { availableHelperModels } from "#internal/model-auth/available-models.js";
import { fetchGatewayCatalog } from "../boxes/select-model.js";
@@ -71,7 +72,7 @@ function modelSelection(selected: ModelConnectionSelection, model: LoginModel) {
const compatible = helper
? authored?.helper === helper
: model.selection !== undefined && !model.external;
- const defaultId = helper ? MODEL_HELPERS[helper].defaultModel : "openai/gpt-5.6-luna-fast";
+ const defaultId = helper ? MODEL_HELPERS[helper].defaultModel : DEFAULT_AGENT_MODEL_ID;
const currentId = authored?.id ?? model.selection;
return { helper, compatible, defaultId, needsModels: !compatible || currentId === defaultId };
}
diff --git a/packages/eve/src/shared/default-agent-model.ts b/packages/eve/src/shared/default-agent-model.ts
index 06a85a766..7ea4fea56 100644
--- a/packages/eve/src/shared/default-agent-model.ts
+++ b/packages/eve/src/shared/default-agent-model.ts
@@ -2,4 +2,4 @@
* Model used when an agent does not declare one, baked in by `eve init`, and
* pre-selected in the setup model picker.
*/
-export const DEFAULT_AGENT_MODEL_ID = "openai/gpt-5.6-luna-fast";
+export const DEFAULT_AGENT_MODEL_ID = "spacexai/grok-4.7";
diff --git a/packages/eve/test/scenarios/compile-agent.scenario.test.ts b/packages/eve/test/scenarios/compile-agent.scenario.test.ts
index 1dc353da7..2b53979d7 100644
--- a/packages/eve/test/scenarios/compile-agent.scenario.test.ts
+++ b/packages/eve/test/scenarios/compile-agent.scenario.test.ts
@@ -47,7 +47,7 @@ const ROOT_TYPE_DEFINITIONS = fileURLToPath(
const TSC_BIN_PATH = fileURLToPath(
new URL("../../../../node_modules/typescript/bin/tsc", import.meta.url),
);
-const DEFAULT_AGENT_MODEL_ID = "openai/gpt-5.6-luna-fast";
+const DEFAULT_AGENT_MODEL_ID = "spacexai/grok-4.7";
function applicationOwnedEntries<TEntry extends { readonly sourceId: string }>(
manifest: CompiledAgentManifest,
diff --git a/packages/eve/test/setup/mock-ai-gateway.ts b/packages/eve/test/setup/mock-ai-gateway.ts
index da980534d..d88eff324 100644
--- a/packages/eve/test/setup/mock-ai-gateway.ts
+++ b/packages/eve/test/setup/mock-ai-gateway.ts
@@ -70,6 +70,7 @@ function collectGatewayModelIds(rootPaths: readonly string[]): ReadonlySet<strin
"anthropic/claude-sonnet-5",
"zai/glm-5.2",
"openai/gpt-5.6-luna-fast",
+ "spacexai/grok-4.7",
"openai/gpt-5.4",
"openai/gpt-5.4-mini",
]);
diff --git a/packages/eve/test/tui-client/tui-packed-install-model.ts b/packages/eve/test/tui-client/tui-packed-install-model.ts
index a153fa316..7edb9227a 100644
--- a/packages/eve/test/tui-client/tui-packed-install-model.ts
+++ b/packages/eve/test/tui-client/tui-packed-install-model.ts
@@ -105,7 +105,7 @@ void (async () => {
await Promise.all([
writeFile(
join(agentRoot, "agent.ts"),
- 'import { defineAgent } from "eve";\n\nexport default defineAgent({\n model: "openai/gpt-5.6-luna-fast",\n});\n',
+ 'import { defineAgent } from "eve";\n\nexport default defineAgent({\n model: "spacexai/grok-4.7",\n});\n',
),
writeFile(join(agentRoot, "instructions.md"), "Help Alice with her questions.\n"),
]);