Lu Wang
43b4e27699
fix(thinking): apply Claude profile to anthropic-messages catalog rows ( #92053 )
...
* fix(thinking): apply Claude profile to anthropic-messages catalog rows
When a custom provider (e.g. `jdcloud-anthropic`) fronted Claude Opus over
the native anthropic-messages adapter, `--thinking xhigh` was silently
clamped to `off`. The thinking-profile dispatcher resolves bundled plugin
policy surfaces by exact provider id, so a renamed Anthropic-compatible
provider never reached the anthropic plugin's policy and `xhigh` was not
in the resulting profile.
`auto-reply/thinking.ts` already had a fallback keyed on
`context.api === "anthropic-messages"` that attached
`CLAUDE_FABLE_5_THINKING_PROFILE` for Fable models. Generalize it to use
`resolveClaudeThinkingProfile(modelId, params)` instead — the same
canonical helper the anthropic plugin uses — which still returns the Fable
profile for Fable models and now returns the correct Opus 4.7/4.8 profile
(with `xhigh`/`adaptive`/`max`) for Claude Opus regardless of provider id.
Non-Claude models on anthropic-messages routes still get the base
profile, and a Claude id on a non-Anthropic transport (e.g. an
openai-completions catalog row) is unaffected.
Fixes #91975
* fix(thinking): match native Anthropic includeNativeMax in fallback
Address ClawSweeper P2 review on #92053 . The anthropic-messages fallback
in `resolveThinkingProfile` calls `resolveClaudeThinkingProfile` but
omits the `{ includeNativeMax: true }` option that the bundled anthropic
plugin uses (extensions/anthropic/provider-policy-api.ts:38,45).
For native-xhigh Claude families (Opus 4.7/4.8) this had no effect since
the native-xhigh branch already exposes `max`. But adaptive Claude
families that take the adaptive-default branch (e.g. claude-sonnet-4-6,
claude-opus-4-6) silently lost `max` parity on custom anthropic-messages
providers compared to native Anthropic policy.
Also add a regression test on `claude-sonnet-4-6` that verifies the
adaptive-branch path keeps `max` for custom providers.
* docs(thinking): document deliberate compat.xhigh bypass on anthropic-messages
Self-review surfaced a subtle behavior change worth documenting: when the
anthropic-messages fallback was generalized, non-Claude models on this
transport stop honoring catalog `compat.supportedReasoningEfforts: ["xhigh"]`
because they take the Claude base profile instead of falling through to the
later `catalogSupportsXHigh` upgrade path.
This is intentional — anthropic-messages does not carry a generic xhigh
contract; xhigh on this protocol is a Claude-family capability. Add an
inline comment at the resolver site and a regression test that locks the
suppression so the next reader (or a future patch) doesn't accidentally
restore the upgrade path.
* fix(thinking): extract Claude profile to leaf to break import cycle
The previous commits added a `resolveClaudeThinkingProfile` import from
`auto-reply/thinking.ts` to `plugin-sdk/provider-model-shared.ts`. The
shared barrel re-exports `provider-replay-helpers` and `plugins/types`,
which transitively reach back into `auto-reply` via the gateway server
methods chain — creating the madge cycle reported by
`check:madge-import-cycles`:
auto-reply/thinking.ts
-> ... -> plugin-sdk/provider-model-shared.ts
-> plugins/{config-schema, host-hooks, ...} -> plugins/types.ts
Move `BASE_CLAUDE_THINKING_LEVELS`, `isClaudeAdaptiveThinkingDefaultModelId`,
and `resolveClaudeThinkingProfile` to a new leaf module
`src/plugins/provider-claude-thinking.ts` whose only imports are
`@openclaw/llm-core` and the existing leaf `provider-thinking.types`.
`provider-model-shared.ts` continues to re-export both helpers so existing
consumers (`extensions/anthropic/*`, the public test surface) are
unaffected. `auto-reply/thinking.ts` now imports the leaf directly,
breaking the cycle.
* test(thinking): add live proof harness for #91975 anthropic-messages clamp
---------
Co-authored-by: wanglu241 <wanglu241@jd.com >
2026-06-11 19:24:46 +09:00
..
2026-06-06 17:36:28 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:14:41 -04:00
2026-06-04 19:14:41 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-05 08:40:35 -07:00
2026-06-05 08:40:35 -07:00
2026-06-04 22:22:21 -04:00
2026-05-31 11:30:33 +01:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:22:21 -04:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:21:04 -04:00
2026-06-09 21:38:22 -07:00
2026-06-03 15:20:39 -07:00
2026-06-09 21:38:22 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:45:30 -04:00
2026-05-27 19:24:04 +01:00
2026-06-04 22:16:29 -04:00
2026-05-30 17:48:18 +01:00
2026-06-03 15:20:39 -07:00
2026-05-16 12:38:51 +01:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:20:19 -04:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:14:41 -04:00
2026-06-04 22:22:21 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:16:24 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 17:58:09 -07:00
2026-06-04 22:13:13 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:16:24 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:16:24 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:14:41 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:24:26 -04:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:38:03 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:32:37 -04:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:24:26 -04:00
2026-06-03 15:20:39 -07:00
2026-05-13 13:33:38 +01:00
2026-06-04 19:16:24 -04:00
2026-06-04 19:21:04 -04:00
2026-06-06 22:56:48 -07:00
2026-06-04 22:16:29 -04:00
2026-06-04 19:21:04 -04:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:16:29 -04:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:21:04 -04:00
2026-06-04 19:21:04 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-06 22:56:48 -07:00
2026-06-04 19:21:04 -04:00
2026-06-03 15:20:39 -07:00
2026-06-06 22:56:48 -07:00
2026-05-24 23:03:35 +03:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:16:24 -04:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:21:04 -04:00
2026-05-31 10:34:56 +01:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-07 19:03:38 +09:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:21:04 -04:00
2026-06-07 19:03:38 +09:00
2026-06-07 19:03:38 +09:00
2026-05-27 09:26:06 +01:00
2026-06-03 15:20:39 -07:00
2026-05-27 09:26:06 +01:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:14:41 -04:00
2026-06-04 19:21:04 -04:00
2026-06-04 22:38:03 -04:00
2026-06-04 19:21:04 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-05-27 09:26:06 +01:00
2026-05-27 09:26:06 +01:00
2026-05-27 09:26:06 +01:00
2026-06-03 18:45:11 -04:00
2026-05-27 09:26:06 +01:00
2026-06-03 15:20:39 -07:00
2026-05-27 09:26:06 +01:00
2026-06-10 13:35:19 +05:30
2026-06-10 13:35:19 +05:30
2026-05-27 09:26:06 +01:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:14:41 -04:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:21:04 -04:00
2026-06-03 15:20:39 -07:00
2026-05-27 09:26:06 +01:00
2026-06-03 15:20:39 -07:00
2026-05-27 09:26:06 +01:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:14:41 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:16:24 -04:00
2026-06-04 19:21:04 -04:00
2026-06-04 19:21:04 -04:00
2026-06-03 15:20:39 -07:00
2026-06-06 08:23:55 -07:00
2026-05-27 09:26:06 +01:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:14:41 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-05-30 11:07:45 +02:00
2026-05-13 20:07:10 +01:00
2026-05-18 01:47:44 -05:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:16:29 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-05-27 09:26:06 +01:00
2026-05-31 10:34:56 +01:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:14:41 -04:00
2026-06-03 15:20:39 -07:00
2026-05-21 22:41:45 +01:00
2026-06-03 15:20:39 -07:00
2026-05-18 14:56:06 +01:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:46:51 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:21:04 -04:00
2026-05-26 02:24:02 +01:00
2026-05-27 09:26:06 +01:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-05-27 09:26:06 +01:00
2026-06-09 19:58:10 +09:00
2026-06-09 19:58:10 +09:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:13:13 -04:00
2026-06-04 22:18:33 -04:00
2026-05-30 00:04:06 +10:00
2026-06-04 19:21:04 -04:00
2026-06-04 19:14:41 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 20:31:41 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:21:04 -04:00
2026-06-04 20:31:41 -07:00
2026-06-04 22:22:21 -04:00
2026-06-04 19:21:04 -04:00
2026-06-04 22:20:19 -04:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:20:19 -04:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:14:54 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:14:54 -04:00
2026-05-29 02:23:42 +01:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:27:50 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:24:26 -04:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:14:41 -04:00
2026-06-04 19:21:04 -04:00
2026-05-27 13:59:33 +01:00
2026-05-30 22:00:51 +01:00
2026-05-23 21:17:55 +01:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:14:41 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:18:33 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:18:33 -04:00
2026-06-04 22:26:17 -04:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:21:04 -04:00
2026-06-04 22:41:26 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:22:21 -04:00
2026-05-15 18:44:04 +01:00
2026-05-31 11:30:33 +01:00
2026-05-31 11:30:33 +01:00
2026-05-13 15:04:49 +01:00
2026-06-03 15:20:39 -07:00
2026-05-31 12:56:38 +01:00
2026-06-06 18:38:45 -07:00
2026-06-06 18:38:45 -07:00
2026-06-03 15:20:39 -07:00
2026-06-06 18:38:45 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:20:19 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-05-10 12:37:10 +01:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:21:04 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-05-14 12:50:22 +08:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-10 14:52:22 +05:30
2026-06-03 15:20:39 -07:00
2026-05-10 12:37:10 +01:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-05-10 12:37:10 +01:00
2026-05-23 21:26:55 +01:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:24:26 -04:00
2026-06-04 22:24:26 -04:00
2026-06-04 22:26:17 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-05-17 02:05:22 +01:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-05-31 01:33:00 +01:00
2026-06-04 19:14:41 -04:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:16:29 -04:00
2026-06-04 22:26:17 -04:00
2026-06-04 19:14:41 -04:00
2026-06-06 22:56:48 -07:00
2026-06-06 22:56:48 -07:00
2026-05-27 09:26:06 +01:00
2026-05-27 09:26:06 +01:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:21:04 -04:00
2026-06-03 15:20:39 -07:00
2026-06-10 14:52:22 +05:30
2026-06-04 19:14:41 -04:00
2026-06-06 22:56:48 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:14:41 -04:00
2026-06-03 15:20:39 -07:00
2026-06-02 06:38:00 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-05-31 00:29:44 +01:00
2026-06-04 19:21:04 -04:00
2026-06-04 19:21:04 -04:00
2026-06-07 14:16:00 -07:00
2026-06-07 14:16:00 -07:00
2026-06-08 22:55:06 -05:00
2026-06-08 22:55:06 -05:00
2026-06-07 14:16:00 -07:00
2026-06-07 14:16:00 -07:00
2026-06-07 14:16:00 -07:00
2026-06-07 14:16:00 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:16:29 -04:00
2026-06-04 19:21:04 -04:00
2026-06-04 19:21:04 -04:00
2026-06-03 15:20:39 -07:00
2026-05-16 12:16:42 +08:00
2026-06-11 11:11:21 +09:00
2026-06-11 19:24:46 +09:00
2026-06-03 15:20:39 -07:00
2026-06-09 20:12:25 +09:00
2026-06-04 22:31:20 -04:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:21:04 -04:00
2026-06-04 19:21:04 -04:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:14:54 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-10 08:08:35 -07:00
2026-06-04 19:21:04 -04:00
2026-06-09 16:25:15 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:21:04 -04:00
2026-06-04 19:14:41 -04:00
2026-06-03 15:20:39 -07:00
2026-05-31 17:35:41 +01:00
2026-05-28 22:04:22 -04:00
2026-06-04 22:16:29 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-05-30 07:53:51 +02:00
2026-06-04 22:22:21 -04:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:21:04 -04:00
2026-06-04 22:14:54 -04:00
2026-06-04 19:21:04 -04:00
2026-06-04 22:40:12 -04:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:22:21 -04:00
2026-06-03 15:20:39 -07:00
2026-06-07 14:16:00 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 20:31:41 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:40:12 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-05-15 18:44:04 +01:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:21:04 -04:00
2026-06-04 22:32:37 -04:00
2026-06-03 15:20:39 -07:00
2026-05-15 08:41:09 +01:00
2026-06-03 15:20:39 -07:00
2026-05-31 11:30:33 +01:00
2026-06-04 23:26:24 -04:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:16:29 -04:00
2026-06-03 15:20:39 -07:00
2026-06-10 14:52:22 +05:30
2026-06-03 15:20:39 -07:00
2026-06-04 22:27:50 -04:00
2026-05-10 12:37:10 +01:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:18:33 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-10 23:35:34 +09:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:14:41 -04:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:21:04 -04:00
2026-06-03 15:20:39 -07:00
2026-05-10 12:37:10 +01:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:18:33 -04:00
2026-05-18 14:56:06 +01:00
2026-06-03 15:20:39 -07:00
2026-06-10 16:34:06 +09:00
2026-06-04 19:21:04 -04:00
2026-06-04 22:20:19 -04:00
2026-06-04 22:31:20 -04:00
2026-05-10 12:37:10 +01:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-05-30 11:07:45 +02:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-05-29 10:05:37 -04:00
2026-06-04 19:21:04 -04:00
2026-06-04 22:24:26 -04:00
2026-05-23 23:53:27 +01:00
2026-05-15 11:00:29 +01:00
2026-05-13 13:33:38 +01:00
2026-06-04 19:21:04 -04:00
2026-06-04 19:14:41 -04:00
2026-05-31 01:33:00 +01:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:22:21 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:16:24 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:21:04 -04:00
2026-06-03 15:20:39 -07:00
2026-05-27 19:24:04 +01:00
2026-05-30 11:07:45 +02:00
2026-06-03 15:20:39 -07:00
2026-05-17 03:00:39 +01:00
2026-05-30 11:07:45 +02:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:14:41 -04:00
2026-05-31 01:33:00 +01:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:21:04 -04:00
2026-06-04 22:20:19 -04:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:13:13 -04:00
2026-06-04 19:16:24 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:21:04 -04:00
2026-06-04 20:31:41 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:34:53 -04:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:34:53 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:14:41 -04:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:16:24 -04:00
2026-06-03 15:20:39 -07:00
2026-06-04 19:16:24 -04:00
2026-06-03 15:20:39 -07:00
2026-06-04 22:18:33 -04:00
2026-06-04 22:26:17 -04:00
2026-06-03 15:20:39 -07:00