A desktop coding agent with free access to frontier models.
TypeScript
fix: keep high as default effort
ogsamratcc1af8ef4b02
diff --git a/apps/app/src/app/constants.ts b/apps/app/src/app/constants.tsindex f8e3d8df..f40dff59 100644--- a/apps/app/src/app/constants.ts+++ b/apps/app/src/app/constants.ts@@ -58,10 +58,11 @@ export const OMNIRUSH_REASONING_EFFORTS = ["none", "minimal", "low", "medium", "/*** The effort an omnirush.ai model runs at when the chat picked none, where the- * model offers it (the CLI's default). PARITY: apps/server/src/omnirush-model-catalog.ts- * OMNIRUSH_DEFAULT_EFFORT, the engine's model-level default.+ * model offers it (High, what the picker has always shown for Astra and Sol).+ * PARITY: apps/server/src/omnirush-model-catalog.ts OMNIRUSH_DEFAULT_EFFORT,+ * the engine's model-level default.*/-export const OMNIRUSH_DEFAULT_REASONING_EFFORT = "xhigh";+export const OMNIRUSH_DEFAULT_REASONING_EFFORT = "high";export const SUGGESTED_PLUGINS: SuggestedPlugin[] = [];diff --git a/apps/app/src/app/lib/model-behavior.ts b/apps/app/src/app/lib/model-behavior.tsindex 7f6c49fa..bfee6fac 100644--- a/apps/app/src/app/lib/model-behavior.ts+++ b/apps/app/src/app/lib/model-behavior.ts@@ -249,7 +249,7 @@ export const getModelBehaviorSummary = () => {const options = getModelBehaviorOptions(providerID, model, providerName);const sanitized = sanitizeModelBehaviorValue(providerID, model, value, providerName);- // omnirush.ai models default to the CLI's effort where they offer it, else+ // omnirush.ai models default to High where they offer it, else// the level nearest medium: the same default the server gives the engine// (omnirush-model-catalog.ts omnirushDefaultEffort), so a chat that never// picked an effort shows the one it runs at.diff --git a/apps/app/tests/model-behavior.test.ts b/apps/app/tests/model-behavior.test.tsindex 01be6623..1d8b044c 100644--- a/apps/app/tests/model-behavior.test.ts+++ b/apps/app/tests/model-behavior.test.ts@@ -117,7 +117,7 @@ describe("model behavior options", () => {const summary = getModelBehaviorSummary("omnirush", internal, "max", "omnirush.ai");expect(summary.value).toBe("max");expect(summary.label).toBe("Max");- expect(getModelBehaviorSummary("omnirush", internal, null, "omnirush.ai").value).toBe("xhigh");+ expect(getModelBehaviorSummary("omnirush", internal, null, "omnirush.ai").value).toBe("high");}});@@ -140,18 +140,18 @@ describe("model behavior options", () => {};const options = getModelBehaviorOptions("omnirush", museSpark, "omnirush.ai");expect(options.map((option) => option.value)).toEqual(["minimal", "low", "medium", "high", "xhigh"]);- // The CLI's default (xhigh) wherever the model offers it.- expect(getModelBehaviorSummary("omnirush", museSpark, null, "omnirush.ai").value).toBe("xhigh");+ // High wherever the model offers it.+ expect(getModelBehaviorSummary("omnirush", museSpark, null, "omnirush.ai").value).toBe("high");expect(getModelBehaviorSummary("omnirush", museSpark, "low", "omnirush.ai").value).toBe("low");// An effort Muse does not offer (Astra's max) falls back to its default.- expect(getModelBehaviorSummary("omnirush", museSpark, "max", "omnirush.ai").value).toBe("xhigh");- expect(getModelBehaviorSummary("omnirush", museSpark, "ultra", "omnirush.ai").value).toBe("xhigh");+ expect(getModelBehaviorSummary("omnirush", museSpark, "max", "omnirush.ai").value).toBe("high");+ expect(getModelBehaviorSummary("omnirush", museSpark, "ultra", "omnirush.ai").value).toBe("high");- // Astra and Sol keep their v1.0.9 levels; their default is the CLI's xhigh.+ // Astra and Sol keep their v1.0.9 levels and default (High).for (const internal of OMNIRUSH_MODELS) {expect(getModelBehaviorOptions("omnirush", internal, "omnirush.ai").map((option) => option.value)).toEqual(["low", "high", "xhigh", "max"]);- expect(getModelBehaviorSummary("omnirush", internal, null, "omnirush.ai").value).toBe("xhigh");- expect(getModelBehaviorSummary("omnirush", internal, "medium", "omnirush.ai").value).toBe("xhigh");+ expect(getModelBehaviorSummary("omnirush", internal, null, "omnirush.ai").value).toBe("high");+ expect(getModelBehaviorSummary("omnirush", internal, "medium", "omnirush.ai").value).toBe("high");}});diff --git a/apps/app/tests/send-effort.test.ts b/apps/app/tests/send-effort.test.tsindex 9af9696b..1749eb25 100644--- a/apps/app/tests/send-effort.test.ts+++ b/apps/app/tests/send-effort.test.ts@@ -31,12 +31,13 @@ const omnirushModel = (id: string, levels: string[]): ProviderModel => ({const astra = omnirushModel("gpt-6-astra", ["low", "high", "xhigh", "max"]);const nova = omnirushModel("nova-9", ["low", "high"]);-const catalog = { omnirush: { "gpt-6-astra": astra, "nova-9": nova } };+const tiny = omnirushModel("tiny-1", ["minimal", "low", "xhigh"]);+const catalog = { omnirush: { "gpt-6-astra": astra, "nova-9": nova, "tiny-1": tiny } };const astraRef = { providerID: "omnirush", modelID: "gpt-6-astra" };describe("the effort a send carries is the one the picker shows", () => {test("resolver and picker agree for every stored choice", () => {- for (const model of [astra, nova]) {+ for (const model of [astra, nova, tiny]) {for (const stored of [null, "", "default", ...OMNIRUSH_REASONING_EFFORTS, "ultra", "turbo", "High"]) {const shown = getModelBehaviorSummary("omnirush", model, stored).value;expect(shown).not.toBeNull();@@ -46,15 +47,18 @@ describe("the effort a send carries is the one the picker shows", () => {});test("no choice (a new chat, or one copied from a chat that had none) sends the default", () => {- expect(resolveModelBehaviorValue("omnirush", astra, null)).toBe("xhigh");- // A model without xhigh: the level nearest medium, as the server's engine default.+ // High, what the picker has always shown for Astra and Sol.+ expect(resolveModelBehaviorValue("omnirush", astra, null)).toBe("high");expect(resolveModelBehaviorValue("omnirush", nova, null)).toBe("high");+ // A model without high: the level nearest medium, as the server's engine default.+ expect(resolveModelBehaviorValue("omnirush", tiny, null)).toBe("low");});test("a user choice is kept, an effort the model lacks falls back to the default", () => {expect(resolveModelBehaviorValue("omnirush", astra, "low")).toBe("low");expect(resolveModelBehaviorValue("omnirush", astra, "max")).toBe("max");- expect(resolveModelBehaviorValue("omnirush", astra, "medium")).toBe("xhigh");+ expect(resolveModelBehaviorValue("omnirush", astra, "xhigh")).toBe("xhigh");+ expect(resolveModelBehaviorValue("omnirush", astra, "medium")).toBe("high");expect(resolveModelBehaviorValue("omnirush", nova, "xhigh")).toBe("high");});@@ -70,7 +74,7 @@ describe("send paths", () => {const { rememberProviderCatalog, resolveSendVariant } = await import("../src/react-app/domains/session/surface/session-model-store");expect(resolveSendVariant(astraRef, null, {})).toBeNull();rememberProviderCatalog(catalog);- expect(resolveSendVariant(astraRef, null)).toBe("xhigh");+ expect(resolveSendVariant(astraRef, null)).toBe("high");expect(resolveSendVariant(astraRef, "low")).toBe("low");expect(resolveSendVariant({ providerID: "omnirush", modelID: "nova-9" }, undefined)).toBe("high");expect(resolveSendVariant(null, "low")).toBe("low");@@ -144,7 +148,7 @@ describe("queued message drain", () => {restore.push(stop);const deadline = Date.now() + 3_000;while (calls.length < 1 && Date.now() < deadline) await new Promise((resolve) => setTimeout(resolve, 10));- expect(calls[0]).toMatchObject({ kind: "prompt", input: { variant: "xhigh", model: astraRef } });+ expect(calls[0]).toMatchObject({ kind: "prompt", input: { variant: "high", model: astraRef } });// The stored choice stays the user's (none); only the send resolves it.expect(getSessionModelSelection(sessionId)?.variant).toBeNull();diff --git a/apps/server/src/omnirush-model-catalog.test.ts b/apps/server/src/omnirush-model-catalog.test.tsindex a99a30ee..ecd205fc 100644--- a/apps/server/src/omnirush-model-catalog.test.ts+++ b/apps/server/src/omnirush-model-catalog.test.ts@@ -282,24 +282,24 @@ describe("omnirush engine models from the catalog", () => {}});- test("every model with efforts gets a model-level default: xhigh where offered, else the level nearest medium", () => {+ test("every model with efforts gets a model-level default: high where offered, else the level nearest medium", () => {const catalog = sanitizeOmniRushModelCatalog({data: [{ id: "gpt-6-astra", reasoning_levels: ["low", "high", "xhigh", "max"] },{ id: "muse", reasoning_levels: ["minimal", "low", "medium", "high", "xhigh"] },{ id: "nova", reasoning_levels: ["low", "high"] },- { id: "tiny", reasoning_levels: ["minimal", "low"] },+ { id: "tiny", reasoning_levels: ["minimal", "low", "xhigh"] },{ id: "mid", reasoning_levels: ["none", "medium", "max"] },{ id: "plain", reasoning_levels: [], capabilities: { reasoning: false } },],})!;const models = engineModelsFromCatalog(catalog);const defaults: Record<string, string | null> = Object.fromEntries(Object.entries(models).map(([id, model]) => [id, (model.options as { reasoningEffort?: string } | undefined)?.reasoningEffort ?? null]));- expect(defaults).toEqual({ "gpt-6-astra": "xhigh", muse: "xhigh", nova: "high", tiny: "low", mid: "medium", plain: null });+ expect(defaults).toEqual({ "gpt-6-astra": "high", muse: "high", nova: "high", tiny: "low", mid: "medium", plain: null });expect(models.plain!.options).toBeUndefined();expect(models.nova!.options).not.toHaveProperty("reasoning_effort");for (const model of catalog) expect<string | null>(omnirushDefaultEffort(model.reasoning_levels)).toBe(defaults[model.id] ?? null);- expect(OMNIRUSH_DEFAULT_EFFORT).toBe("xhigh");+ expect(OMNIRUSH_DEFAULT_EFFORT).toBe("high");});test("labels Muse by family, keeps 1.3 beta and text-only, and never sets attachment", () => {diff --git a/apps/server/src/omnirush-model-catalog.ts b/apps/server/src/omnirush-model-catalog.tsindex fe9ec9de..701ef393 100644--- a/apps/server/src/omnirush-model-catalog.ts+++ b/apps/server/src/omnirush-model-catalog.ts@@ -25,8 +25,8 @@ import { modelHasWebSearch, type WebSearchSwitch } from "./web-search.js";/** Every effort a catalog model may list, lowest first. */export const OMNIRUSH_MODEL_EFFORTS = ["none", "minimal", "low", "medium", "high", "xhigh", "max"] as const;export type OmniRushModelEffort = (typeof OMNIRUSH_MODEL_EFFORTS)[number];-/** The CLI's default effort (omnirush-cli DEFAULT_ENGINE_EFFORT). */-export const OMNIRUSH_DEFAULT_EFFORT: OmniRushModelEffort = "xhigh";+/** The default effort: High, what the desktop picker has always shown for Astra and Sol. */+export const OMNIRUSH_DEFAULT_EFFORT: OmniRushModelEffort = "high";const MODEL_STATUSES = ["active", "beta", "deprecated"] as const;export type OmniRushModelStatus = (typeof MODEL_STATUSES)[number];@@ -213,8 +213,8 @@ export async function clearOmniRushModelCatalog(config: ServerConfig): Promise<v}/**- * The effort a catalog model runs at when the chat picked none: xhigh where the- * model offers it (the CLI's default), otherwise the level closest to medium+ * The effort a catalog model runs at when the chat picked none: high where the+ * model offers it, otherwise the level closest to medium* (the higher one on a tie). Null for a model without effort control.** PARITY: apps/app/src/app/lib/model-behavior.ts (getModelBehaviorSummary'sdiff --git a/apps/server/src/omnirush-runtime-config.test.ts b/apps/server/src/omnirush-runtime-config.test.tsindex c459bbed..a86d3036 100644--- a/apps/server/src/omnirush-runtime-config.test.ts+++ b/apps/server/src/omnirush-runtime-config.test.ts@@ -249,8 +249,8 @@ describe("omnirush runtime config file", () => {for (const id of ["gpt-6-astra", "gpt-6.1-sol", "gpt-6-sol"]) {expect(Object.keys(models[id]!.variants as object).sort()).toEqual(Object.keys(variants).sort());expect(enabledVariants(models[id]!)).toEqual(["low", "high", "xhigh", "max"]);- // The default effort (the CLI's xhigh), for a message that names no variant.- expect(models[id]!.options).toEqual({ reasoningEffort: "xhigh" });+ // The default effort (High, as the picker shows), for a message that names no variant.+ expect(models[id]!.options).toEqual({ reasoningEffort: "high" });}expect(parsed.model).toBe("omnirush/gpt-6-astra");expect((parsed.plugin as string[]).some((plugin) => /omnirush-reasoning-effort\.(?:ts|js)$/.test(plugin))).toBe(true);@@ -668,7 +668,7 @@ describe("omnirush runtime config file", () => {* The omnirush provider as v1.0.9 declared it (the INTERNAL_MODELS and* internalGatewayModel it hardcoded), with two deliberate changes: variants* carry the camelCase `reasoningEffort` the engine's OpenAI adapter reads, and- * each model has the CLI's default effort (`options.reasoningEffort`). Astra+ * each model has a default effort (`options.reasoningEffort`, High). Astra* and Sol must keep these bytes otherwise: they feed the engine-pool* fingerprint, and any other drift (an `attachment` flag, a family, a status)* would change how the engine treats them.@@ -689,7 +689,7 @@ function v109OmniRushProvider(baseURL: string) {minimal: { disabled: true },medium: { disabled: true },},- options: { reasoningEffort: "xhigh" },+ options: { reasoningEffort: "high" },limit: { context: 400_000, output: 128_000 },modalities: { input: ["text", "image", "pdf"], output: ["text"] },});@@ -779,7 +779,7 @@ describe("omnirush runtime config from the model catalog", () => {structured_output: true,temperature: true,variants: museVariants,- options: { reasoningEffort: "xhigh" },+ options: { reasoningEffort: "high" },limit: { context: 158_000, output: 32_000 },modalities: { input: ["text", "image", "pdf"], output: ["text"] },});@@ -792,7 +792,7 @@ describe("omnirush runtime config from the model catalog", () => {structured_output: true,temperature: true,variants: museVariants,- options: { reasoningEffort: "xhigh" },+ options: { reasoningEffort: "high" },limit: { context: 99_000, output: 16_000 },modalities: { input: ["text"], output: ["text"] },});diff --git a/apps/server/src/opencode-plugins/omnirush-reasoning-effort.test.ts b/apps/server/src/opencode-plugins/omnirush-reasoning-effort.test.tsindex bf047761..398051ae 100644--- a/apps/server/src/opencode-plugins/omnirush-reasoning-effort.test.ts+++ b/apps/server/src/opencode-plugins/omnirush-reasoning-effort.test.ts@@ -106,10 +106,10 @@ describe("OmniRushReasoningEffort", () => {const result = await run(hooks,{ agent: "explore", model: astra, message: { id: "msg_8", model: {} } },- { reasoningEffort: "xhigh" },+ { reasoningEffort: "high" },);- expect(result.options).toEqual({ reasoningEffort: "xhigh" });- expect(result.headers).toEqual({ "x-omnirush-reasoning-effort": "xhigh" });+ expect(result.options).toEqual({ reasoningEffort: "high" });+ expect(result.headers).toEqual({ "x-omnirush-reasoning-effort": "high" });});test("a chosen variant wins over the model-level default", async () => {@@ -118,7 +118,7 @@ describe("OmniRushReasoningEffort", () => {const result = await run(hooks,{ agent: "omnirush", model: astra, message: { id: "msg_9", model: { variant: "low" } } },- { ...{ reasoningEffort: "xhigh" }, ...{ reasoningEffort: "low" } },+ { ...{ reasoningEffort: "high" }, ...{ reasoningEffort: "low" } },);expect(result.options.reasoningEffort).toBe("low");expect(result.headers["x-omnirush-reasoning-effort"]).toBe("low");@@ -129,7 +129,7 @@ describe("OmniRushReasoningEffort", () => {// As the engine reports a model's variants: its own OpenAI defaults merged with the config's.const variants = { low: { reasoningEffort: "low", reasoningSummary: "auto" }, high: { reasoningEffort: "high" }, xhigh: { reasoningEffort: "xhigh" } };// smallOptions(first variant) merged with the model options (the default).- const small = { store: false, reasoningEffort: "xhigh", reasoningSummary: "auto" };+ const small = { store: false, reasoningEffort: "high", reasoningSummary: "auto" };const title = await run(hooks,{ agent: "title", model: { ...astra, variants }, message: { id: "msg_10", model: { variant: "max" } } },@@ -146,7 +146,7 @@ describe("OmniRushReasoningEffort", () => {expect(copyName.options).toEqual({ store: false, reasoningEffort: "low", reasoningSummary: "auto" });expect(copyName.headers).toEqual({ "x-omnirush-reasoning-effort": "low" });// A model without variants: no effort at all on its side requests.- const bare = await run(hooks, { agent: "title", model: astra, message: { id: "msg_12", model: {} } }, { reasoningEffort: "xhigh" });+ const bare = await run(hooks, { agent: "title", model: astra, message: { id: "msg_12", model: {} } }, { reasoningEffort: "high" });expect(bare.options).toEqual({});// Another provider's title request is not touched.const external = await run(diff --git a/apps/server/src/web-search.test.ts b/apps/server/src/web-search.test.tsindex 57dedae8..137bfd8d 100644--- a/apps/server/src/web-search.test.ts+++ b/apps/server/src/web-search.test.ts@@ -119,8 +119,8 @@ describe("engine config", () => {const off = buildOmniRushRuntimeConfigObjectFromSnapshot({}, gateway, {}, catalog) as { provider: { omnirush: { models: Record<string, Record<string, unknown>> } } };const on = buildOmniRushRuntimeConfigObjectFromSnapshot({}, gateway, {}, catalog, undefined, undefined, setting) as typeof off;const models = on.provider.omnirush.models;- for (const id of serverBlock.models) expect(models[id]!.options).toEqual({ reasoningEffort: "xhigh", hostedWebSearch: { searchContextSize: "low" } });- for (const id of ["meta-muse-spark", "muse-spark-1.1", "muse-spark-1.3"]) expect(models[id]!.options).toEqual({ reasoningEffort: "xhigh" });+ for (const id of serverBlock.models) expect(models[id]!.options).toEqual({ reasoningEffort: "high", hostedWebSearch: { searchContextSize: "low" } });+ for (const id of ["meta-muse-spark", "muse-spark-1.1", "muse-spark-1.3"]) expect(models[id]!.options).toEqual({ reasoningEffort: "high" });for (const [id, model] of Object.entries(models)) {// Only hostedWebSearch is added; the default effort and the rest stay as they were.const { hostedWebSearch: _search, ...options } = model.options as Record<string, unknown>;