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

推荐订阅源

月光博客
月光博客
小众软件
小众软件
爱范儿
爱范儿
Y
Y Combinator Blog
博客园 - Franky
美团技术团队
博客园 - 【当耐特】
The Cloudflare Blog
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
Jina AI
Jina AI
IT之家
IT之家
人人都是产品经理
人人都是产品经理
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 聂微东
WordPress大学
WordPress大学
V
Visual Studio Blog
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
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: clear capability broad matchers · openclaw/openclaw...
steipete · 2026-05-10 · via Recent Commits to openclaw:main

@@ -461,7 +461,21 @@ describe("capability cli", () => {

461461

}

462462463463

function firstAudioTranscriptionCall() {

464-

const calls = mocks.transcribeAudioFile.mock.calls as unknown as Array<[{ filePath?: string }]>;

464+

const calls = mocks.transcribeAudioFile.mock.calls as unknown as Array<

465+

[{ filePath?: string; language?: unknown; prompt?: unknown }]

466+

>;

467+

return calls[0]?.[0];

468+

}

469+470+

function firstTextToSpeechCall() {

471+

const calls = mocks.textToSpeech.mock.calls as unknown as Array<[Record<string, unknown>]>;

472+

return calls[0]?.[0];

473+

}

474+475+

function firstEmbeddingProviderCall() {

476+

const calls = mocks.createEmbeddingProvider.mock.calls as unknown as Array<

477+

[Record<string, unknown>]

478+

>;

465479

return calls[0]?.[0];

466480

}

467481

@@ -1692,13 +1706,10 @@ describe("capability cli", () => {

16921706

],

16931707

});

169417081695-

expect(mocks.transcribeAudioFile).toHaveBeenCalledWith(

1696-

expect.objectContaining({

1697-

filePath: expect.stringMatching(/memo\.m4a$/),

1698-

language: "en",

1699-

prompt: "Focus on names",

1700-

}),

1701-

);

1709+

const transcribeCall = firstAudioTranscriptionCall();

1710+

expect(path.basename(transcribeCall?.filePath ?? "")).toBe("memo.m4a");

1711+

expect(transcribeCall?.language).toBe("en");

1712+

expect(transcribeCall?.prompt).toBe("Focus on names");

17021713

});

1703171417041715

it("uses request-scoped TTS overrides without mutating prefs", async () => {

@@ -1718,19 +1729,16 @@ describe("capability cli", () => {

17181729

],

17191730

});

172017311721-

expect(mocks.textToSpeech).toHaveBeenCalledWith(

1722-

expect.objectContaining({

1723-

overrides: expect.objectContaining({

1724-

provider: "openai",

1725-

providerOverrides: expect.objectContaining({

1726-

openai: expect.objectContaining({

1727-

modelId: "gpt-4o-mini-tts",

1728-

voiceId: "alloy",

1729-

}),

1730-

}),

1731-

}),

1732-

}),

1733-

);

1732+

const ttsCall = firstTextToSpeechCall();

1733+

const overrides = ttsCall?.overrides as

1734+

| {

1735+

provider?: unknown;

1736+

providerOverrides?: { openai?: { modelId?: unknown; voiceId?: unknown } };

1737+

}

1738+

| undefined;

1739+

expect(overrides?.provider).toBe("openai");

1740+

expect(overrides?.providerOverrides?.openai?.modelId).toBe("gpt-4o-mini-tts");

1741+

expect(overrides?.providerOverrides?.openai?.voiceId).toBe("alloy");

17341742

expect(mocks.setTtsProvider).not.toHaveBeenCalled();

17351743

});

17361744

@@ -1751,11 +1759,7 @@ describe("capability cli", () => {

17511759

],

17521760

});

175317611754-

expect(mocks.textToSpeech).toHaveBeenCalledWith(

1755-

expect.objectContaining({

1756-

disableFallback: true,

1757-

}),

1758-

);

1762+

expect(firstTextToSpeechCall()?.disableFallback).toBe(true);

17591763

});

1760176417611765

it("does not infer and forward a local provider guess for gateway TTS overrides", async () => {

@@ -1774,15 +1778,9 @@ describe("capability cli", () => {

17741778

],

17751779

});

177617801777-

expect(mocks.callGateway).toHaveBeenCalledWith(

1778-

expect.objectContaining({

1779-

method: "tts.convert",

1780-

params: expect.objectContaining({

1781-

provider: undefined,

1782-

voiceId: "alloy",

1783-

}),

1784-

}),

1785-

);

1781+

expect(firstGatewayCall()?.method).toBe("tts.convert");

1782+

expect(firstGatewayCall()?.params?.provider).toBeUndefined();

1783+

expect(firstGatewayCall()?.params?.voiceId).toBe("alloy");

17861784

});

1787178517881786

it("fails clearly when gateway TTS output is requested against a remote gateway", async () => {

@@ -1821,19 +1819,11 @@ describe("capability cli", () => {

18211819

argv: ["capability", "embedding", "create", "--text", "hello", "--json"],

18221820

});

182318211824-

expect(mocks.createEmbeddingProvider).toHaveBeenCalledWith(

1825-

expect.objectContaining({

1826-

provider: "auto",

1827-

fallback: "none",

1828-

}),

1829-

);

1830-

expect(mocks.runtime.writeJson).toHaveBeenCalledWith(

1831-

expect.objectContaining({

1832-

capability: "embedding.create",

1833-

provider: "openai",

1834-

model: "text-embedding-3-small",

1835-

}),

1836-

);

1822+

expect(firstEmbeddingProviderCall()?.provider).toBe("auto");

1823+

expect(firstEmbeddingProviderCall()?.fallback).toBe("none");

1824+

expect(firstJsonOutput()?.capability).toBe("embedding.create");

1825+

expect(firstJsonOutput()?.provider).toBe("openai");

1826+

expect(firstJsonOutput()?.model).toBe("text-embedding-3-small");

18371827

});

1838182818391829

it("derives the embedding provider from a provider/model override", async () => {

@@ -1851,13 +1841,9 @@ describe("capability cli", () => {

18511841

],

18521842

});

185318431854-

expect(mocks.createEmbeddingProvider).toHaveBeenCalledWith(

1855-

expect.objectContaining({

1856-

provider: "openai",

1857-

fallback: "none",

1858-

model: "text-embedding-3-large",

1859-

}),

1860-

);

1844+

expect(firstEmbeddingProviderCall()?.provider).toBe("openai");

1845+

expect(firstEmbeddingProviderCall()?.fallback).toBe("none");

1846+

expect(firstEmbeddingProviderCall()?.model).toBe("text-embedding-3-large");

18611847

});

1862184818631849

it("cleans provider auth profiles and usage stats on logout", async () => {

@@ -1906,15 +1892,15 @@ describe("capability cli", () => {

19061892

argv: ["capability", "model", "auth", "logout", "--provider", "openai", "--json"],

19071893

});

190818941909-

expect(updatedStore).toMatchObject({

1910-

profiles: {

1911-

"anthropic:default": { id: "anthropic:default" },

1912-

},

1913-

order: {},

1914-

lastGood: {},

1915-

usageStats: {

1916-

"anthropic:default": { errorCount: 3 },

1917-

},

1895+

expect(updatedStore).not.toBeNull();

1896+

const storeSnapshot = updatedStore as unknown as Record<string, any>;

1897+

expect(storeSnapshot.profiles).toEqual({

1898+

"anthropic:default": { id: "anthropic:default" },

1899+

});

1900+

expect(storeSnapshot.order).toEqual({});

1901+

expect(storeSnapshot.lastGood).toEqual({});

1902+

expect(storeSnapshot.usageStats).toEqual({

1903+

"anthropic:default": { errorCount: 3 },

19181904

});

19191905

expect(mocks.runtime.writeJson).toHaveBeenCalledWith({

19201906

provider: "openai",

@@ -2022,11 +2008,10 @@ describe("capability cli", () => {

20222008

argv: ["capability", "embedding", "providers", "--json"],

20232009

});

202420102025-

expect(mocks.registerBuiltInMemoryEmbeddingProviders).toHaveBeenCalledWith(

2026-

expect.objectContaining({

2027-

registerMemoryEmbeddingProvider: expect.any(Function),

2028-

}),

2029-

);

2011+

const bootstrapArg = mocks.registerBuiltInMemoryEmbeddingProviders.mock.calls[0]?.[0] as

2012+

| { registerMemoryEmbeddingProvider?: unknown }

2013+

| undefined;

2014+

expect(typeof bootstrapArg?.registerMemoryEmbeddingProvider).toBe("function");

20302015

});

2031201620322017

it("marks env-backed audio providers as configured", async () => {