Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Tests: pick a model the installed CLI can run, and check a too-new one is refused
milind-sonic9c0b49e4ae3
diff --git a/scripts/testing/control-omb-ui.e2e.test.ts b/scripts/testing/control-omb-ui.e2e.test.tsindex cd4aecb61d..2f6edefe6e 100644--- a/scripts/testing/control-omb-ui.e2e.test.ts+++ b/scripts/testing/control-omb-ui.e2e.test.ts@@ -264,7 +264,8 @@ describe("control-omb ui drives the real renderer", () => {const models = await runControlOmb(["models", "--url", info.url]) as any;const options = models.instances.find((instance: any) => instance.instanceId === originalBot.modelSelection.instanceId).models.options;const originalLabel = options.find((option: any) => option.id === originalModel).label;- const nextModel = options.find((option: any) => option.id !== originalModel);+ // A model the installed CLI is too old for is listed but cannot be picked.+ const nextModel = options.find((option: any) => option.id !== originalModel && !option.needsCliUpdate);// The picker sets the bot's model, which every chat of it uses.const threadModel = async () => (await savedBot()).tasks.find((task: any) => task.threadId === originalBot.threadId).modelSelection.model;await ui("click", info.ui, "--name", originalLabel);diff --git a/server/create-bot-model.e2e.test.ts b/server/create-bot-model.e2e.test.tsindex 80c70ee587..87a4a040ef 100644--- a/server/create-bot-model.e2e.test.ts+++ b/server/create-bot-model.e2e.test.ts@@ -44,12 +44,15 @@ it("Chief creation uses the workspace default or a validated explicit model with};const before = (await api("GET", "/api/bots")).bots.length;const first = applied(await create("Default specialist"));- const explicit = { instanceId: "claude", model: claude.models.options.find((item: any) => item.id !== claude.models.default).id, effort: "low" };+ // The installed CLI is too old for the newest model: a proposal may not name it, and the explicit pick is one it can run.+ const tooNew = claude.models.options.find((item: any) => item.needsCliUpdate);+ expect(tooNew).toBeTruthy();+ const explicit = { instanceId: "claude", model: claude.models.options.find((item: any) => item.id !== claude.models.default && !item.needsCliUpdate).id, effort: "low" };const second = applied(await create("Chosen specialist", explicit));expect((await api("GET", "/api/bots")).bots.length).toBe(before + 2);for (const invalid of [null, {}, { instanceId: "missing", model: "missing" },{ ...explicit, model: "not-in-catalog" }, { ...explicit, effort: "invalid" },- { ...explicit, variant: "a-variant" }]) {+ { ...explicit, variant: "a-variant" }, { instanceId: "claude", model: tooNew.id }]) {await create("Invalid specialist", invalid, 400);}await create("Third specialist");