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

推荐订阅源

人人都是产品经理
人人都是产品经理
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
宝玉的分享
宝玉的分享
月光博客
月光博客
爱范儿
爱范儿
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
阮一峰的网络日志
阮一峰的网络日志
博客园_首页
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
博客园 - 聂微东
小众软件
小众软件
量子位
MongoDB | Blog
MongoDB | Blog
Blog — PlanetScale
Blog — PlanetScale
The Cloudflare Blog
Stack Overflow Blog
Stack Overflow Blog
U
Unit 42
Hugging Face - Blog
Hugging Face - Blog
T
The Blog of Author Tim Ferriss
H
Help Net Security
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC

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
fix(openrouter): retire stealth model catalog entries · o...
steipete · 2026-04-27 · via Recent Commits to openclaw:main

@@ -3,7 +3,10 @@ import { registerSingleProviderPlugin } from "../../test/helpers/plugins/plugin-

33

import { registerProviderPlugin } from "../../test/helpers/plugins/provider-registration.js";

44

import { expectPassthroughReplayPolicy } from "../../test/helpers/provider-replay-policy.ts";

55

import openrouterPlugin from "./index.js";

6-

import { buildOpenrouterProvider } from "./provider-catalog.js";

6+

import {

7+

buildOpenrouterProvider,

8+

isOpenRouterProxyReasoningUnsupportedModel,

9+

} from "./provider-catalog.js";

710811

describe("openrouter provider hooks", () => {

912

it("registers OpenRouter speech alongside model and media providers", async () => {

@@ -26,6 +29,18 @@ describe("openrouter provider hooks", () => {

2629

);

2730

});

283132+

it("does not include retired stealth models in the bundled catalog", () => {

33+

expect(buildOpenrouterProvider().models?.map((model) => model.id)).not.toEqual(

34+

expect.arrayContaining(["openrouter/hunter-alpha", "openrouter/healer-alpha"]),

35+

);

36+

});

37+38+

it("keeps stale Hunter Alpha configs out of OpenRouter proxy reasoning", () => {

39+

expect(isOpenRouterProxyReasoningUnsupportedModel("openrouter/hunter-alpha")).toBe(true);

40+

expect(isOpenRouterProxyReasoningUnsupportedModel("openrouter/hunter-alpha:free")).toBe(true);

41+

expect(isOpenRouterProxyReasoningUnsupportedModel("openrouter/healer-alpha")).toBe(false);

42+

});

43+2944

it("owns passthrough-gemini replay policy for Gemini-backed models", async () => {

3045

await expectPassthroughReplayPolicy({

3146

plugin: openrouterPlugin,

@@ -88,6 +103,26 @@ describe("openrouter provider hooks", () => {

88103

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

89104

});

90105106+

expect(

107+

provider.normalizeResolvedModel?.({

108+

provider: "openrouter",

109+

model: {

110+

provider: "openrouter",

111+

id: "openrouter/hunter-alpha",

112+

name: "Hunter Alpha",

113+

api: "openai-completions",

114+

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

115+

reasoning: true,

116+

input: ["text"],

117+

cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },

118+

contextWindow: 1_048_576,

119+

maxTokens: 65_536,

120+

},

121+

} as never),

122+

).toMatchObject({

123+

reasoning: false,

124+

});

125+91126

expect(

92127

provider.normalizeTransport?.({

93128

provider: "openrouter",

@@ -141,4 +176,43 @@ describe("openrouter provider hooks", () => {

141176

},

142177

});

143178

});

179+180+

it("does not inject OpenRouter reasoning for Hunter Alpha", async () => {

181+

const provider = await registerSingleProviderPlugin(openrouterPlugin);

182+

let capturedPayload: Record<string, unknown> | undefined;

183+

const baseStreamFn = vi.fn(

184+

(

185+

...args: Parameters<import("@mariozechner/pi-agent-core").StreamFn>

186+

): ReturnType<import("@mariozechner/pi-agent-core").StreamFn> => {

187+

void args[2]?.onPayload?.({}, args[0]);

188+

return { async *[Symbol.asyncIterator]() {} } as never;

189+

},

190+

);

191+192+

const wrapped = provider.wrapStreamFn?.({

193+

provider: "openrouter",

194+

modelId: "openrouter/hunter-alpha",

195+

streamFn: baseStreamFn,

196+

thinkingLevel: "high",

197+

} as never);

198+199+

void wrapped?.(

200+

{

201+

provider: "openrouter",

202+

api: "openai-completions",

203+

id: "openrouter/hunter-alpha",

204+

compat: {},

205+

} as never,

206+

{ messages: [] } as never,

207+

{

208+

onPayload: (payload: unknown) => {

209+

capturedPayload = payload as Record<string, unknown>;

210+

return payload;

211+

},

212+

} as never,

213+

);

214+215+

expect(capturedPayload).toEqual({});

216+

expect(baseStreamFn).toHaveBeenCalledOnce();

217+

});

144218

});