#how to set up adaptive thinking and output_config={"effort": "xhigh"} for custom privider?

1 messages Β· Page 1 of 1 (latest)

patent oracle
#

Krill, running into an issue with opus-4-7 + adaptive thinking on a custom provider, wanted your take before I dig further

setup: OpenClaw 2026.4.15, custom provider pointing to claude-opus-4-7

"models": [
          {
            "id": "claude-opus-4-7",
            "name": "Claude Opus 4.7",
            "api": "anthropic-messages",
            "reasoning": true,
            "input": [
              "text",
              "image"
            ]

the issue: even after patching supportsAdaptiveThinking() in the transport layer to include opus-4-7, I'm still getting a 429 with this message:

"thinking.enabled" is not supported for this model. Use "thinking.adaptive" and "output_config.effort" to control thinking behavior.

so it seems the problem is two layers deep. first, the transport layer's supportsAdaptiveThinking() was missing opus-4-7 entirely (custom providers skip registration and go straight there). but even with that fixed, the payload being sent still uses the old thinking.enabled field instead of the new thinking.adaptive + output_config.effort format that opus-4-7 apparently requires.

also worth noting: mapThinkingLevelToEffort() has no handler for opus-4-7. from Anthropic's docs, xhigh is a native effort level exclusive to opus-4-7 and should pass through as-is, not get remapped to max like opus-4-6 does.

questions: is opus-4-7 expected to use a different payload schema (thinking.adaptive + output_config.effort) vs older models? is there a plan to handle that in the transport layer, or is this by design for custom providers?

remote harnessBOT
golden hatchBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> βœ… Mark Solution

remote harnessBOT
chrome smeltBOT
#

Yeah, this looks like a real gap in 2026.4.15, not intentional custom-provider behavior.

Short version:

  • Yes, Opus 4.7 uses a different Anthropic thinking schema.
  • Yes, it should use thinking: { type: "adaptive" } plus output_config: { effort: ... }.
  • No, thinking: { type: "enabled", budget_tokens: ... } is not valid for Opus 4.7.

What I found in current main:

  • supportsAdaptiveThinking() now includes opus-4-7
  • transport payload shaping now sends:
    • thinking: { type: "adaptive" }
    • output_config: { effort: ... }
  • xhigh for Opus 4.7 is preserved as xhigh, not remapped to max

There are actually two fresh fixes for this right after 2026.4.15:

#
  • c73a6d2f68 β†’ support xhigh for Claude Opus 4.7
  • a2753e2d9f β†’ keep Opus 4.7 effort separate from adaptive thinking

So your read is basically dead on: it was a two-layer issue.

One extra nuance: for custom providers, Anthropic-specific provider hooks like default thinking behavior can still be skipped, because those are keyed on provider identity, not just model id. But the transport layer itself is now doing the right thing for Opus 4.7 by model-id detection, so custom providers should still work once you're on the newer code.

So my recommendation:

  • Best fix: upgrade to at least 2026.4.16 or newer
  • If you want to patch locally on 2026.4.15, patch both:
    1. adaptive detection
    2. payload construction / effort mapping

Useful refs:

#

If you want, I can help map the exact minimal backport for 2026.4.15.