Skip to content

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

fix(omp): address review feedback

fenglin.liub362edbb02ae
diff --git a/docs/verification/engines.md b/docs/verification/engines.md
index ee095b9477..9230e1abcf 100644
--- a/docs/verification/engines.md
+++ b/docs/verification/engines.md
@@ -59,7 +59,7 @@ pnpm exec vitest run server/drivers/acp/omp.test.ts server/drivers/acp/custom-mo
The contract tests use the repository's fake ACP CLI and disposable folders. They cover fresh and existing fleets, catalogs larger than 128 models without per-model discovery prompts, temporary discovery-session cleanup, model selection, local credential forwarding and denied permissions. Model discovery uses `PI_CODING_AGENT_SESSION_DIR` in a temporary directory so refreshes do not add empty sessions to the person's OMP history.
-The real 18.13.1 CLI was also checked with isolated homes and keyless synthetic providers: ACP initialization and authentication, model and thinking selection, a 2,000-model catalog, discovery-session isolation, a streamed turn through the production driver, and a second turn after recreating that driver with the same native session. The loopback provider received both turns and the resumed request contained the first turn's history. These checks do not prove a real provider account, a paid turn, native Windows behavior or packaged desktop integration.
+The following is a one-time author qualification against OMP 18.13.1, not a checked-in repeatable native fixture: with isolated homes and keyless synthetic providers, ACP initialization and authentication, model and thinking selection, a 2,000-model catalog, discovery-session isolation, a streamed turn through the production driver, and a second turn after recreating that driver with the same native session. The loopback provider received both turns and the resumed request contained the first turn's history. These checks do not prove a real provider account, a paid turn, native Windows behavior or packaged desktop integration.
## Slow or empty CLI version responses
diff --git a/server/drivers/acp/omp.ts b/server/drivers/acp/omp.ts
index b3a99c2348..61ff806c8b 100644
--- a/server/drivers/acp/omp.ts
+++ b/server/drivers/acp/omp.ts
@@ -13,9 +13,17 @@ const EMPTY: ModelCatalog = { default: "", options: [] };
const AGENT_DEFAULT = { id: "agent-default", label: "OMP default (configured)" };
const WORKSPACE_CREDENTIALS = new Set<string>(WORKSPACE_CREDENTIAL_ENV);
const CREDENTIAL_ENV = PROVIDER_CREDENTIAL_ENV.filter((key) => !WORKSPACE_CREDENTIALS.has(key));
-// ponytail: variant probing stops at 128 models; add cached background surveys if large catalogs need every list upfront.
-const DISCOVERY: AcpDiscoveryOptions = { passthrough: AGENT_DEFAULT, custom: true, variants: true, variantLimit: 128, maxModels: 4096 };
+const MAX_DISCOVERED_MODELS = 4096;
+const VARIANT_DISCOVERY_MODEL_LIMIT = 128;
+const DISCOVERY: AcpDiscoveryOptions = {
+ passthrough: AGENT_DEFAULT,
+ custom: true,
+ variants: true,
+ variantLimit: VARIANT_DISCOVERY_MODEL_LIMIT,
+ maxModels: MAX_DISCOVERED_MODELS,
+};
+/** Discovers OMP models in a temporary session directory, so a refresh leaves no session in the person's history. */
export async function resolveOmpModels(
env: Record<string, string | undefined>,
config: Pick<AcpConfig, "cli">,