From ff09f8022d5f29ab91bf58bd7457fed1f2b9fa7f Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Tue, 5 May 2026 21:13:40 -0700 Subject: [PATCH] test(docker): scope live gateway discovery --- scripts/lib/docker-e2e-scenarios.mjs | 2 +- src/gateway/gateway-models.profiles.live.test.ts | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/lib/docker-e2e-scenarios.mjs b/scripts/lib/docker-e2e-scenarios.mjs index 8baa783f47f..e6d72dc131c 100644 --- a/scripts/lib/docker-e2e-scenarios.mjs +++ b/scripts/lib/docker-e2e-scenarios.mjs @@ -133,7 +133,7 @@ export const mainLanes = [ "live-gateway", liveDockerScriptCommand( "test-live-gateway-models-docker.sh", - "OPENCLAW_IMAGE=openclaw:local-live-gateway OPENCLAW_DOCKER_BUILD_EXTENSIONS=matrix", + "OPENCLAW_IMAGE=openclaw:local-live-gateway OPENCLAW_DOCKER_BUILD_EXTENSIONS=matrix OPENCLAW_LIVE_GATEWAY_PROVIDERS=claude-cli,codex-cli,google-gemini-cli", { skipBuild: false }, ), { diff --git a/src/gateway/gateway-models.profiles.live.test.ts b/src/gateway/gateway-models.profiles.live.test.ts index ae4e439c482..b99b6726f1a 100644 --- a/src/gateway/gateway-models.profiles.live.test.ts +++ b/src/gateway/gateway-models.profiles.live.test.ts @@ -114,6 +114,12 @@ function parseFilter(raw?: string): Set | null { return ids.length ? new Set(ids) : null; } +function providerFilterList(): string[] | undefined { + return PROVIDERS + ? [...PROVIDERS].toSorted((left, right) => left.localeCompare(right)) + : undefined; +} + function shouldSuppressGatewayLiveOllamaWarnings(): boolean { return PROVIDERS !== null && !PROVIDERS.has("ollama"); } @@ -2365,7 +2371,9 @@ describeLive("gateway live (dev agent, profile keys)", () => { logProgress("[all-models] discover candidates"); clearRuntimeConfigSnapshot(); const cfg = getRuntimeConfig(); - await ensureOpenClawModelsJson(cfg); + await ensureOpenClawModelsJson(cfg, undefined, { + providerDiscoveryProviderIds: providerFilterList(), + }); const agentDir = resolveDefaultAgentDir(cfg); const authStorage = discoverAuthStorage(agentDir);