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

推荐订阅源

博客园_首页
J
Java Code Geeks
博客园 - 聂微东
量子位
C
Check Point Blog
T
The Blog of Author Tim Ferriss
T
Tailwind CSS Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
B
Blog
罗磊的独立博客
腾讯CDC
GbyAI
GbyAI
博客园 - 【当耐特】
A
About on SuperTechFans
M
MIT News - Artificial intelligence
U
Unit 42
D
Docker
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Y
Y Combinator Blog
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
S
SegmentFault 最新的问题
有赞技术团队
有赞技术团队

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: tighten arcee provider assertions · openclaw/opencl...
steipete · 2026-05-11 · via Recent Commits to openclaw:main

@@ -20,19 +20,21 @@ describe("arcee provider plugin", () => {

2020

providers: [provider],

2121

choice: "arceeai-api-key",

2222

});

23-

expect(directChoice).toMatchObject({

24-

provider: { id: "arcee" },

25-

method: { id: "arcee-platform" },

26-

});

23+

if (!directChoice) {

24+

throw new Error("expected direct Arcee auth choice");

25+

}

26+

expect(directChoice.provider.id).toBe("arcee");

27+

expect(directChoice.method.id).toBe("arcee-platform");

27282829

const orChoice = resolveProviderPluginChoice({

2930

providers: [provider],

3031

choice: "arceeai-openrouter",

3132

});

32-

expect(orChoice).toMatchObject({

33-

provider: { id: "arcee" },

34-

method: { id: "openrouter" },

35-

});

33+

if (!orChoice) {

34+

throw new Error("expected OpenRouter Arcee auth choice");

35+

}

36+

expect(orChoice.provider.id).toBe("arcee");

37+

expect(orChoice.method.id).toBe("openrouter");

3638

});

37393840

it("stores the OpenRouter onboarding path under the OpenRouter auth profile", async () => {

@@ -58,14 +60,12 @@ describe("arcee provider plugin", () => {

5860

toApiKeyCredential: () => null,

5961

} as never);

606261-

expect(config?.auth?.profiles?.["openrouter:default"]).toMatchObject({

62-

provider: "openrouter",

63-

mode: "api_key",

64-

});

65-

expect(config?.models?.providers?.arcee).toMatchObject({

66-

baseUrl: "https://openrouter.ai/api/v1",

67-

api: "openai-completions",

68-

});

63+

const openRouterProfile = config?.auth?.profiles?.["openrouter:default"];

64+

expect(openRouterProfile?.provider).toBe("openrouter");

65+

expect(openRouterProfile?.mode).toBe("api_key");

66+

const arceeConfig = config?.models?.providers?.arcee;

67+

expect(arceeConfig?.baseUrl).toBe("https://openrouter.ai/api/v1");

68+

expect(arceeConfig?.api).toBe("openai-completions");

6969

expect(config?.models?.providers?.arcee?.models?.map((model) => model.id)).toEqual([

7070

"arcee/trinity-mini",

7171

"arcee/trinity-large-preview",

@@ -94,12 +94,11 @@ describe("arcee provider plugin", () => {

9494

"trinity-large-preview",

9595

"trinity-large-thinking",

9696

]);

97-

expect(

98-

catalogProvider.models?.find((model) => model.id === "trinity-large-thinking")?.compat,

99-

).toMatchObject({

100-

supportsTools: false,

101-

supportsReasoningEffort: false,

102-

});

97+

const thinkingCompat = catalogProvider.models?.find(

98+

(model) => model.id === "trinity-large-thinking",

99+

)?.compat;

100+

expect(thinkingCompat?.supportsTools).toBe(false);

101+

expect(thinkingCompat?.supportsReasoningEffort).toBe(false);

103102

});

104103105104

it("builds the OpenRouter-backed Arcee AI model catalog", async () => {

@@ -120,31 +119,27 @@ describe("arcee provider plugin", () => {

120119

"arcee/trinity-large-preview",

121120

"arcee/trinity-large-thinking",

122121

]);

123-

expect(

124-

catalogProvider.models?.find((model) => model.id === "arcee/trinity-large-thinking")?.compat,

125-

).toMatchObject({

126-

supportsTools: false,

127-

supportsReasoningEffort: false,

128-

});

122+

const thinkingCompat = catalogProvider.models?.find(

123+

(model) => model.id === "arcee/trinity-large-thinking",

124+

)?.compat;

125+

expect(thinkingCompat?.supportsTools).toBe(false);

126+

expect(thinkingCompat?.supportsReasoningEffort).toBe(false);

129127

});

130128131129

it("normalizes Arcee OpenRouter models to vendor-prefixed runtime ids", async () => {

132130

const provider = await registerSingleProviderPlugin(arceePlugin);

133131134-

expect(

135-

provider.normalizeResolvedModel?.({

136-

modelId: "arcee/trinity-large-thinking",

137-

model: {

138-

provider: "arcee",

139-

id: "trinity-large-thinking",

140-

name: "Trinity Large Thinking",

141-

api: "openai-completions",

142-

baseUrl: "https://openrouter.ai/api/v1",

143-

},

144-

} as never),

145-

).toMatchObject({

146-

id: "arcee/trinity-large-thinking",

147-

});

132+

const openRouterModel = provider.normalizeResolvedModel?.({

133+

modelId: "arcee/trinity-large-thinking",

134+

model: {

135+

provider: "arcee",

136+

id: "trinity-large-thinking",

137+

name: "Trinity Large Thinking",

138+

api: "openai-completions",

139+

baseUrl: "https://openrouter.ai/api/v1",

140+

},

141+

} as never);

142+

expect(openRouterModel?.id).toBe("arcee/trinity-large-thinking");

148143149144

expect(

150145

provider.normalizeResolvedModel?.({

@@ -163,34 +158,28 @@ describe("arcee provider plugin", () => {

163158

it("canonicalizes stale OpenRouter /v1 config and transport metadata", async () => {

164159

const provider = await registerSingleProviderPlugin(arceePlugin);

165160166-

expect(

167-

provider.normalizeConfig?.({

168-

provider: "arcee",

169-

providerConfig: {

170-

api: "openai-completions",

171-

baseUrl: "https://openrouter.ai/v1/",

172-

models: [],

173-

},

174-

} as never),

175-

).toMatchObject({

176-

baseUrl: "https://openrouter.ai/api/v1",

177-

});

161+

const normalizedConfig = provider.normalizeConfig?.({

162+

provider: "arcee",

163+

providerConfig: {

164+

api: "openai-completions",

165+

baseUrl: "https://openrouter.ai/v1/",

166+

models: [],

167+

},

168+

} as never);

169+

expect(normalizedConfig?.baseUrl).toBe("https://openrouter.ai/api/v1");

178170179-

expect(

180-

provider.normalizeResolvedModel?.({

181-

modelId: "arcee/trinity-large-thinking",

182-

model: {

183-

provider: "arcee",

184-

id: "trinity-large-thinking",

185-

name: "Trinity Large Thinking",

186-

api: "openai-completions",

187-

baseUrl: "https://openrouter.ai/v1",

188-

},

189-

} as never),

190-

).toMatchObject({

191-

id: "arcee/trinity-large-thinking",

192-

baseUrl: "https://openrouter.ai/api/v1",

193-

});

171+

const normalizedModel = provider.normalizeResolvedModel?.({

172+

modelId: "arcee/trinity-large-thinking",

173+

model: {

174+

provider: "arcee",

175+

id: "trinity-large-thinking",

176+

name: "Trinity Large Thinking",

177+

api: "openai-completions",

178+

baseUrl: "https://openrouter.ai/v1",

179+

},

180+

} as never);

181+

expect(normalizedModel?.id).toBe("arcee/trinity-large-thinking");

182+

expect(normalizedModel?.baseUrl).toBe("https://openrouter.ai/api/v1");

194183195184

expect(

196185

provider.normalizeTransport?.({