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

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
The Blog of Author Tim Ferriss
博客园 - 司徒正美
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
有赞技术团队
有赞技术团队
量子位
S
SegmentFault 最新的问题
博客园 - 聂微东
博客园 - 【当耐特】
J
Java Code Geeks
美团技术团队
Hugging Face - Blog
Hugging Face - Blog
H
Help Net Security
V
V2EX
人人都是产品经理
人人都是产品经理
博客园 - Franky
罗磊的独立博客
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell
云风的 BLOG
云风的 BLOG
Y
Y Combinator Blog
Apple Machine Learning Research
Apple Machine Learning Research

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
docs: document auto-reply runtime helpers · openclaw/open...
steipete · 2026-06-04 · via Recent Commits to openclaw:main

@@ -1,3 +1,4 @@

1+

// Thinking/reasoning level catalog helpers for auto-reply model controls.

12

import { normalizeProviderId } from "@openclaw/model-catalog-core/provider-id";

23

import {

34

BASE_THINKING_LEVELS,

@@ -43,6 +44,7 @@ import {

4344

} from "../plugins/provider-thinking.js";

4445

import type { ProviderThinkingProfile } from "../plugins/provider-thinking.types.js";

454647+

/** UI-facing thinking level option. */

4648

export type ThinkingLevelOption = {

4749

id: ThinkLevel;

4850

label: string;

@@ -172,6 +174,7 @@ function appendProfileLevel(profile: ResolvedThinkingProfile, id: ThinkLevel) {

172174

profile.levels = profile.levels.toSorted((a, b) => a.rank - b.rank);

173175

}

174176177+

/** Resolve supported thinking levels and default for a provider/model pair. */

175178

export function resolveThinkingProfile(params: {

176179

provider?: string | null;

177180

model?: string | null;

@@ -238,6 +241,7 @@ export function resolveThinkingProfile(params: {

238241

return profile;

239242

}

240243244+

/** Return whether provider/model exposes only off/on thinking controls. */

241245

export function isBinaryThinkingProvider(provider?: string | null, model?: string | null): boolean {

242246

const profile = resolveThinkingProfile({ provider, model });

243247

return profile.levels.length === 2 && profile.levels.some((level) => level.label === "on");

@@ -254,10 +258,12 @@ function supportsThinkingLevel(

254258

);

255259

}

256260261+

/** Return whether provider/model supports the xhigh thinking level. */

257262

export function supportsXHighThinking(provider?: string | null, model?: string | null): boolean {

258263

return supportsThinkingLevel(provider, model, "xhigh");

259264

}

260265266+

/** List thinking level ids supported by provider/model. */

261267

export function listThinkingLevels(

262268

provider?: string | null,

263269

model?: string | null,

@@ -267,6 +273,7 @@ export function listThinkingLevels(

267273

return profile.levels.map((level) => level.id);

268274

}

269275276+

/** List labeled thinking level options supported by provider/model. */

270277

export function listThinkingLevelOptions(

271278

provider?: string | null,

272279

model?: string | null,

@@ -276,6 +283,7 @@ export function listThinkingLevelOptions(

276283

return profile.levels.map(({ id, label }) => ({ id, label }));

277284

}

278285286+

/** List display labels for thinking levels supported by provider/model. */

279287

export function listThinkingLevelLabels(

280288

provider?: string | null,

281289

model?: string | null,

@@ -284,6 +292,7 @@ export function listThinkingLevelLabels(

284292

return listThinkingLevelOptions(provider, model, catalog).map((level) => level.label);

285293

}

286294295+

/** Format supported thinking level labels for command/status output. */

287296

export function formatThinkingLevels(

288297

provider?: string | null,

289298

model?: string | null,

@@ -294,6 +303,7 @@ export function formatThinkingLevels(

294303

return profile.levels.map(({ label }) => label).join(separator);

295304

}

296305306+

/** Resolve the default thinking level for a provider/model pair. */

297307

export function resolveThinkingDefaultForModel(params: {

298308

provider: string;

299309

model: string;

@@ -314,6 +324,7 @@ export function resolveThinkingDefaultForModel(params: {

314324

return resolveSupportedThinkingLevelFromProfile(profile, "medium");

315325

}

316326327+

/** Resolve the highest non-off thinking level supported by provider/model. */

317328

export function resolveLargestSupportedThinkingLevel(

318329

provider?: string | null,

319330

model?: string | null,

@@ -331,6 +342,7 @@ export function resolveLargestSupportedThinkingLevel(

331342

return bestLevel?.id ?? "off";

332343

}

333344345+

/** Return whether a specific thinking level is supported by provider/model. */

334346

export function isThinkingLevelSupported(params: {

335347

provider?: string | null;

336348

model?: string | null;

@@ -356,6 +368,7 @@ function resolveSupportedThinkingLevelFromProfile(

356368

);

357369

}

358370371+

/** Clamp a requested thinking level to the closest supported provider/model level. */

359372

export function resolveSupportedThinkingLevel(params: {

360373

provider?: string | null;

361374

model?: string | null;