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

推荐订阅源

T
The Blog of Author Tim Ferriss
WordPress大学
WordPress大学
博客园 - Franky
The Cloudflare Blog
T
Tailwind CSS Blog
宝玉的分享
宝玉的分享
小众软件
小众软件
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
B
Blog
Y
Y Combinator Blog
V
V2EX
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
博客园 - 司徒正美
IT之家
IT之家
G
Google Developers Blog
C
Check Point Blog
Engineering at Meta
Engineering at Meta
Microsoft Security Blog
Microsoft Security Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻

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: update models list static fast path expectation · o...
shakkernerd · 2026-04-24 · via Recent Commits to openclaw:main

@@ -21,6 +21,7 @@ const loadModelCatalog = vi.fn(async () => []);

2121

const loadProviderCatalogModelsForList = vi.fn<() => Promise<Array<Record<string, unknown>>>>(

2222

async () => [],

2323

);

24+

const hasProviderStaticCatalogForFilter = vi.fn().mockResolvedValue(false);

2425

const shouldSuppressBuiltInModel = vi.fn().mockReturnValue(false);

2526

const modelRegistryState = {

2627

models: [] as Array<Record<string, unknown>>,

@@ -103,6 +104,14 @@ vi.mock("./models/list.runtime.js", () => {

103104

};

104105

});

105106107+

vi.mock("./models/list.provider-catalog.js", async (importOriginal) => {

108+

const actual = await importOriginal<typeof import("./models/list.provider-catalog.js")>();

109+

return {

110+

...actual,

111+

hasProviderStaticCatalogForFilter,

112+

};

113+

});

114+106115

vi.mock("../agents/model-suppression.js", () => ({

107116

shouldSuppressBuiltInModel,

108117

}));

@@ -152,6 +161,8 @@ beforeEach(() => {

152161

loadModelCatalog.mockResolvedValue([]);

153162

loadProviderCatalogModelsForList.mockReset();

154163

loadProviderCatalogModelsForList.mockResolvedValue([]);

164+

hasProviderStaticCatalogForFilter.mockReset();

165+

hasProviderStaticCatalogForFilter.mockResolvedValue(false);

155166

shouldSuppressBuiltInModel.mockReset();

156167

shouldSuppressBuiltInModel.mockReturnValue(false);

157168

readConfigFileSnapshotForWrite.mockClear();

@@ -359,13 +370,14 @@ describe("models list/status", () => {

359370360371

it("models list all includes unauthenticated provider catalog rows", async () => {

361372

setDefaultZaiRegistry({ available: false });

373+

hasProviderStaticCatalogForFilter.mockResolvedValueOnce(true);

362374

loadProviderCatalogModelsForList.mockResolvedValueOnce([MOONSHOT_MODEL]);

363375

const runtime = makeRuntime();

364376365377

await modelsListCommand({ all: true, provider: "moonshot", json: true }, runtime);

366378367379

const payload = parseJsonLog(runtime);

368-

expect(loadModelCatalog).toHaveBeenCalledTimes(1);

380+

expect(loadModelCatalog).not.toHaveBeenCalled();

369381

expect(payload.models).toEqual([

370382

expect.objectContaining({

371383

key: "moonshot/kimi-k2.6",