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

推荐订阅源

雷峰网
雷峰网
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
Google DeepMind News
Google DeepMind News
V
V2EX
T
The Blog of Author Tim Ferriss
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Hugging Face - Blog
Hugging Face - Blog
Stack Overflow Blog
Stack Overflow Blog
I
InfoQ
博客园_首页
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Last Week in AI
Last Week in AI
Recent Announcements
Recent Announcements
Vercel News
Vercel News
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Tailwind CSS Blog
美团技术团队
Martin Fowler
Martin Fowler
宝玉的分享
宝玉的分享
Blog — PlanetScale
Blog — PlanetScale
GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
J
Java Code Geeks

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(anthropic): expose bundled thinking policy · openclaw...
vincentkoc · 2026-05-04 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -29,6 +29,7 @@ Docs: https://docs.openclaw.ai

2929
3030

### Fixes

3131
32+

- Plugins/Anthropic: expose Claude thinking profiles from the bundled provider-policy artifact so non-runtime callers keep Opus 4.7 `adaptive`, `xhigh`, and `max` instead of downgrading to `high`. Fixes #76779. Thanks @tomascupr and @iAbhi001.

3233

- Discord/native commands: skip slash-command registration and cleanup REST calls when `channels.discord.commands.native=false`, letting low-power gateways start without waiting on disabled native-command lifecycle requests. Fixes #76202. Thanks @vincentkoc.

3334

- Plugins/commands: normalize empty plugin command handler results and let Telegram native plugin commands send the empty-response fallback instead of throwing when a handler returns `undefined`. Fixes #74800. Thanks @vincentkoc.

3435

- Plugins/tools: cold-load selected plugin tool registries when the active registry only has partial tool coverage, so wildcard-expanded allowlists no longer hide installed plugin tools from `tools.effective`. Fixes #76780. Thanks @lilesjtu.

Original file line numberDiff line numberDiff line change

@@ -1,6 +1,10 @@

11

import type { ModelDefinitionConfig } from "openclaw/plugin-sdk/provider-model-types";

22

import { describe, expect, it } from "vitest";

3-

import { applyConfigDefaults, normalizeConfig } from "./provider-policy-api.js";

3+

import {

4+

applyConfigDefaults,

5+

normalizeConfig,

6+

resolveThinkingProfile,

7+

} from "./provider-policy-api.js";

48
59

function createModel(id: string, name: string): ModelDefinitionConfig {

610

return {

@@ -87,4 +91,41 @@ describe("anthropic provider policy public artifact", () => {

8791

ttl: "1h",

8892

});

8993

});

94+
95+

it("exposes Claude Opus 4.7 thinking levels without loading the full provider plugin", () => {

96+

expect(

97+

resolveThinkingProfile({

98+

provider: "anthropic",

99+

modelId: "claude-opus-4-7",

100+

}),

101+

).toMatchObject({

102+

levels: expect.arrayContaining([{ id: "xhigh" }, { id: "adaptive" }, { id: "max" }]),

103+

defaultLevel: "off",

104+

});

105+

});

106+
107+

it("keeps adaptive-only Claude profiles aligned with the runtime provider", () => {

108+

const profile = resolveThinkingProfile({

109+

provider: "anthropic",

110+

modelId: "claude-opus-4-6",

111+

});

112+
113+

expect(profile).toMatchObject({

114+

levels: expect.arrayContaining([{ id: "adaptive" }]),

115+

defaultLevel: "adaptive",

116+

});

117+

if (!profile) {

118+

throw new Error("Expected Anthropic policy profile");

119+

}

120+

expect(profile.levels.some((level) => level.id === "xhigh" || level.id === "max")).toBe(false);

121+

});

122+
123+

it("does not expose Anthropic thinking profiles for unrelated providers", () => {

124+

expect(

125+

resolveThinkingProfile({

126+

provider: "openai",

127+

modelId: "claude-opus-4-7",

128+

}),

129+

).toBeNull();

130+

});

90131

});

Original file line numberDiff line numberDiff line change

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

1+

import { resolveClaudeThinkingProfile } from "openclaw/plugin-sdk/provider-model-shared";

12

import type { ModelProviderConfig } from "openclaw/plugin-sdk/provider-model-types";

23

import {

34

applyAnthropicConfigDefaults,

@@ -11,3 +12,13 @@ export function normalizeConfig(params: { provider: string; providerConfig: Mode

1112

export function applyConfigDefaults(params: Parameters<typeof applyAnthropicConfigDefaults>[0]) {

1213

return applyAnthropicConfigDefaults(params);

1314

}

15+
16+

export function resolveThinkingProfile(params: { provider: string; modelId: string }) {

17+

switch (params.provider.trim().toLowerCase()) {

18+

case "anthropic":

19+

case "claude-cli":

20+

return resolveClaudeThinkingProfile(params.modelId);

21+

default:

22+

return null;

23+

}

24+

}