Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

fix(devin): list a model catalog of more than 128 models

AdityaUmale12c5d0f4272f
diff --git a/server/drivers/acp/devin.test.ts b/server/drivers/acp/devin.test.ts
index cbcd7277be..1db92096c2 100644
--- a/server/drivers/acp/devin.test.ts
+++ b/server/drivers/acp/devin.test.ts
@@ -188,6 +188,14 @@ describe("Devin ACP driver", () => {
expect(catalog.options.map((option) => option.id)).toEqual(["agent-default", ...MODELS.split(",")]);
});
+ it("lists a catalog of more than 128 models (a Devin Pro account has 145) without switching to each one", async () => {
+ const models = Array.from({ length: 145 }, (_, index) => `fixture-model-${index}`);
+ const rpc = join(scratch, "discovery-rpc.json");
+ const catalog = await resolveDevinModels({ ...process.env, FAKE_ACP_MODELS: models.join(","), FAKE_ACP_RPC_DUMP: rpc }, { cli: FAKE_CLI });
+ expect(catalog.options.map((option) => option.id)).toEqual(["agent-default", ...models]);
+ expect(JSON.parse(readFileSync(rpc, "utf8"))).not.toContain("session/set_config_option");
+ });
+
it("starts nothing when the instance is created", async () => {
await create();
expect(existsSync(join(scratch, "launch.json"))).toBe(false);
diff --git a/server/drivers/acp/devin.ts b/server/drivers/acp/devin.ts
index 464311b8ed..a592a8c216 100644
--- a/server/drivers/acp/devin.ts
+++ b/server/drivers/acp/devin.ts
@@ -43,8 +43,9 @@ export function devinSignedIn(env: Record<string, string | undefined>, platform:
}
/** No exit grace: devin 3000.12.57 exits on EOF but orphans the MCP servers it started from its own config, which then
- * hold the discovery folder for seconds where the tree kill would have stopped them. */
-const DISCOVERY: AcpDiscoveryOptions = { passthrough: AGENT_DEFAULT };
+ * hold the discovery folder for seconds where the tree kill would have stopped them. A Devin Pro account advertises
+ * 145 models, past discovery's default cap of 128; above 128 the per-model variant switches are skipped, as for OMP. */
+const DISCOVERY: AcpDiscoveryOptions = { passthrough: AGENT_DEFAULT, variantLimit: 128, maxModels: 4096 };
export function resolveDevinModels(env: Record<string, string | undefined>, config: Pick<AcpConfig, "cli">): Promise<ModelCatalog> {
return discoverAcpModels(env, config.cli, SPAWN_ARGS, DISCOVERY);