Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
fix(omp): list OMP in the model picker before its models are read
AdityaUmale37d2eb346200
diff --git a/server/drivers/acp/omp.test.ts b/server/drivers/acp/omp.test.tsindex e9dccd3c38..870ec20bb9 100644--- a/server/drivers/acp/omp.test.ts+++ b/server/drivers/acp/omp.test.ts@@ -96,6 +96,12 @@ describe("OMP ACP driver", () => {expect(existsSync(join(scratch, "launch.json"))).toBe(false);});+ it("offers OMP's own default before its models are read, so the picker lists it", async () => {+ const { instance } = await create();+ expect(instance.models).toEqual({ default: "agent-default", options: [{ id: "agent-default", label: "OMP default (configured)", custom: true }] });+ expect(instance.modelsUnconfirmed).toBe(true);+ });+it("runs `omp acp` with its local credentials and the picked model", async () => {const { instance, recorder } = await create({ ANTHROPIC_API_KEY: "engine-fixture-key", OPENCODE_API_KEY: "workspace-fixture-key" });const { turnId } = await instance.adapter.sendTurn({diff --git a/server/drivers/acp/omp.ts b/server/drivers/acp/omp.tsindex 61ff806c8b..e5ceb3e7ed 100644--- a/server/drivers/acp/omp.ts+++ b/server/drivers/acp/omp.ts@@ -9,8 +9,8 @@ import { PROVIDER_CREDENTIAL_ENV, WORKSPACE_CREDENTIAL_ENV } from "../../credentimport { createAcpDriver, type AcpConfig, type AcpSupport } from "./core.ts";import { discoverAcpModels, type AcpDiscoveryOptions } from "./custom-model-catalog.ts";-const EMPTY: ModelCatalog = { default: "", options: [] };const AGENT_DEFAULT = { id: "agent-default", label: "OMP default (configured)" };+const MODELS: ModelCatalog = { default: AGENT_DEFAULT.id, options: [{ ...AGENT_DEFAULT, custom: true }] };const WORKSPACE_CREDENTIALS = new Set<string>(WORKSPACE_CREDENTIAL_ENV);const CREDENTIAL_ENV = PROVIDER_CREDENTIAL_ENV.filter((key) => !WORKSPACE_CREDENTIALS.has(key));const MAX_DISCOVERED_MODELS = 4096;@@ -40,7 +40,7 @@ const SUPPORT: AcpSupport = {driverKind: "ompAgent",displayName: "OMP",access: "custom",- models: EMPTY,+ models: MODELS,defaultCli: "omp",cliVersion: /\bomp\//i,nativeSource: "omp.acp",