惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

I
InfoQ
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
B
Blog
罗磊的独立博客
GbyAI
GbyAI
博客园 - 三生石上(FineUI控件)
雷峰网
雷峰网
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Microsoft Security Blog
Microsoft Security Blog
宝玉的分享
宝玉的分享
The GitHub Blog
The GitHub Blog
人人都是产品经理
人人都是产品经理
博客园 - Franky
有赞技术团队
有赞技术团队
WordPress大学
WordPress大学
博客园 - 聂微东
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
Visual Studio Blog
MyScale Blog
MyScale Blog
Google DeepMind News
Google DeepMind News
G
Google Developers Blog
aimingoo的专栏
aimingoo的专栏

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
test: bound gateway live model discovery · openclaw/openc...
steipete · 2026-05-27 · via Recent Commits to openclaw:main

@@ -27,6 +27,7 @@ import { isModelNotFoundErrorMessage } from "../agents/live-model-errors.js";

2727

import {

2828

DEFAULT_HIGH_SIGNAL_LIVE_MODEL_LIMIT,

2929

getHighSignalLiveModelPriorityIndex,

30+

getHighSignalLiveModelProviders,

3031

isHighSignalLiveModelRef,

3132

resolveHighSignalLiveModelLimit,

3233

selectHighSignalLiveItems,

@@ -169,7 +170,9 @@ function providerScopedModelRegistryProviders(params: {

169170

return params.providerList;

170171

}

171172

if (!params.useExplicit) {

172-

return undefined;

173+

return getHighSignalLiveModelProviders().filter((provider) =>

174+

params.providerFilter ? params.providerFilter.has(provider) : true,

175+

);

173176

}

174177

return providerListFromExplicitModelFilter({

175178

modelFilter: params.modelFilter,

@@ -402,28 +405,44 @@ function enterProductionEnvForLiveRun() {

402405

const previous = {

403406

vitest: process.env.VITEST,

404407

nodeEnv: process.env.NODE_ENV,

408+

testFast: process.env.OPENCLAW_TEST_FAST,

405409

};

406410

delete process.env.VITEST;

411+

delete process.env.OPENCLAW_TEST_FAST;

407412

process.env.NODE_ENV = "production";

408413

return previous;

409414

}

410415411416

function restoreProductionEnvForLiveRun(previous: {

412417

vitest: string | undefined;

413418

nodeEnv: string | undefined;

419+

testFast: string | undefined;

414420

}) {

415421

if (previous.vitest === undefined) {

416422

delete process.env.VITEST;

417423

} else {

418424

process.env.VITEST = previous.vitest;

419425

}

426+

if (previous.testFast === undefined) {

427+

delete process.env.OPENCLAW_TEST_FAST;

428+

} else {

429+

process.env.OPENCLAW_TEST_FAST = previous.testFast;

430+

}

420431

if (previous.nodeEnv === undefined) {

421432

delete process.env.NODE_ENV;

422433

} else {

423434

process.env.NODE_ENV = previous.nodeEnv;

424435

}

425436

}

426437438+

function restoreOptionalEnv(key: string, value: string | undefined): void {

439+

if (value === undefined) {

440+

delete process.env[key];

441+

} else {

442+

process.env[key] = value;

443+

}

444+

}

445+427446

function formatFailurePreview(

428447

failures: Array<{ model: string; error: string }>,

429448

maxItems: number,

@@ -932,6 +951,28 @@ describe("resolveExplicitLiveModelCandidates", () => {

932951

});

933952934953

describe("providerScopedModelRegistryProviders", () => {

954+

it("uses curated high-signal providers for default modern sweeps", () => {

955+

expect(

956+

providerScopedModelRegistryProviders({

957+

providerList: undefined,

958+

useExplicit: false,

959+

modelFilter: null,

960+

providerFilter: null,

961+

}),

962+

).toEqual(getHighSignalLiveModelProviders());

963+

});

964+965+

it("intersects default modern sweeps with provider filters", () => {

966+

expect(

967+

providerScopedModelRegistryProviders({

968+

providerList: undefined,

969+

useExplicit: false,

970+

modelFilter: null,

971+

providerFilter: new Set(["openai", "not-high-signal"]),

972+

}),

973+

).toEqual(["openai"]);

974+

});

975+935976

it("uses explicit provider-qualified model refs without enumerating the full registry", () => {

936977

expect(

937978

providerScopedModelRegistryProviders({

@@ -1002,6 +1043,31 @@ describe("buildLiveGatewayConfig", () => {

10021043

});

10031044

});

100410451046+

describe("enterProductionEnvForLiveRun", () => {

1047+

it("clears Vitest fast-reply flags while preserving caller state", () => {

1048+

const previous = {

1049+

vitest: process.env.VITEST,

1050+

nodeEnv: process.env.NODE_ENV,

1051+

testFast: process.env.OPENCLAW_TEST_FAST,

1052+

};

1053+

process.env.VITEST = "1";

1054+

process.env.NODE_ENV = "test";

1055+

process.env.OPENCLAW_TEST_FAST = "1";

1056+1057+

const runtimeEnv = enterProductionEnvForLiveRun();

1058+

try {

1059+

expect(process.env.VITEST).toBeUndefined();

1060+

expect(process.env.NODE_ENV).toBe("production");

1061+

expect(process.env.OPENCLAW_TEST_FAST).toBeUndefined();

1062+

} finally {

1063+

restoreProductionEnvForLiveRun(runtimeEnv);

1064+

restoreOptionalEnv("VITEST", previous.vitest);

1065+

restoreOptionalEnv("NODE_ENV", previous.nodeEnv);

1066+

restoreOptionalEnv("OPENCLAW_TEST_FAST", previous.testFast);

1067+

}

1068+

});

1069+

});

1070+10051071

function isGoogleModelNotFoundText(text: string): boolean {

10061072

const trimmed = text.trim();

10071073

if (!trimmed) {