litellm - 💡(How to fix) Fix [Bug]: `auto_router/complexity_router` rejects `thinking.type=adaptive` for Claude Code requests [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#26224Fetched 2026-04-23 07:24:38
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3

Error Message

  1. Observe the error:

Root Cause

The issue is unexpected because the downstream target model is claude-sonnet-4-6, which should support adaptive thinking.

Code Example

{
  "model": "auto_router/complexity_router",
  "complexity_router_config": {
    "tiers": {
      "SIMPLE": "claude-sonnet-4-6",
      "MEDIUM": "claude-sonnet-4-6",
      "COMPLEX": "claude-sonnet-4-6",
      "REASONING": "claude-sonnet-4-6"
    }
  },
  "complexity_router_default_model": "claude-sonnet-4-6"
}

---

{
  "model": "TEST ROUTER",
  "stream": true,
  "thinking": {
    "type": "adaptive"
  },
  "output_config": {
    "effort": "high"
  },
  "tools": [
    {
      "name": "Agent",
      "description": "test",
      "input_schema": {
        "type": "object",
        "properties": {}
      }
    }
  ],
  "system": [
    {
      "type": "text",
      "text": "You are Claude Code."
    }
  ],
  "messages": [
    {
      "role": "user",
      "content": "hello"
    }
  ]
}

---

400 {"message":"adaptive thinking is not supported on this model"}

---

{
  "model": "claude-sonnet-4-6",
  "stream": true,
  "thinking": {
    "type": "adaptive"
  },
  "output_config": {
    "effort": "high"
  },
  "tools": [
    {
      "name": "Agent",
      "description": "test",
      "input_schema": {
        "type": "object",
        "properties": {}
      }
    }
  ],
  "system": [
    {
      "type": "text",
      "text": "You are Claude Code."
    }
  ],
  "messages": [
    {
      "role": "user",
      "content": "hello"
    }
  ]
}

---

{
  "id": "c9416917-d303-48fe-a954-5c69bfbb6116",
  "model": "global.anthropic.claude-sonnet-4-6",
  "object": "chat.completion",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "안녕하세요! 무엇을 도와드릴까요?"
      },
      "finish_reason": "stop"
    }
  ]
}

---
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

When sending a Claude Code / Anthropic Messages style request through LiteLLM with:

  • thinking: { "type": "adaptive" }
  • output_config: { "effort": "high" }

LiteLLM returns:

400 {"message":"adaptive thinking is not supported on this model"}

This happens in two cases:

  1. When the request is sent to auto_router/complexity_router
  2. When the request is sent directly to claude-sonnet-4-6

The issue is unexpected because the downstream target model is claude-sonnet-4-6, which should support adaptive thinking.

I reduced the request payload to the minimum relevant fields below. The original request was generated by Claude Code / Anthropic Messages style clients and included tools/system content, but the failure appears tied to the thinking.type=adaptive handling rather than the full prompt contents.

Steps to Reproduce

  1. Configure LiteLLM with a router model using auto_router/complexity_router, with all tiers pointing to claude-sonnet-4-6.

Example router config:

{
  "model": "auto_router/complexity_router",
  "complexity_router_config": {
    "tiers": {
      "SIMPLE": "claude-sonnet-4-6",
      "MEDIUM": "claude-sonnet-4-6",
      "COMPLEX": "claude-sonnet-4-6",
      "REASONING": "claude-sonnet-4-6"
    }
  },
  "complexity_router_default_model": "claude-sonnet-4-6"
}
  1. Send a Claude Code / Anthropic Messages style request to the router model.

Minimal router request:

{
  "model": "TEST ROUTER",
  "stream": true,
  "thinking": {
    "type": "adaptive"
  },
  "output_config": {
    "effort": "high"
  },
  "tools": [
    {
      "name": "Agent",
      "description": "test",
      "input_schema": {
        "type": "object",
        "properties": {}
      }
    }
  ],
  "system": [
    {
      "type": "text",
      "text": "You are Claude Code."
    }
  ],
  "messages": [
    {
      "role": "user",
      "content": "hello"
    }
  ]
}
  1. Observe the error:
400 {"message":"adaptive thinking is not supported on this model"}
  1. Send the same style of request directly to claude-sonnet-4-6 instead of the router. Minimal direct model request:
{
  "model": "claude-sonnet-4-6",
  "stream": true,
  "thinking": {
    "type": "adaptive"
  },
  "output_config": {
    "effort": "high"
  },
  "tools": [
    {
      "name": "Agent",
      "description": "test",
      "input_schema": {
        "type": "object",
        "properties": {}
      }
    }
  ],
  "system": [
    {
      "type": "text",
      "text": "You are Claude Code."
    }
  ],
  "messages": [
    {
      "role": "user",
      "content": "hello"
    }
  ]
}
  1. Observe that the direct model request succeeds and returns a normal response. Example successful response:
{
  "id": "c9416917-d303-48fe-a954-5c69bfbb6116",
  "model": "global.anthropic.claude-sonnet-4-6",
  "object": "chat.completion",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "안녕하세요! 무엇을 도와드릴까요?"
      },
      "finish_reason": "stop"
    }
  ]
}

Expected behavior:

  • The router path should handle the same request successfully when all tiers resolve to a model that supports adaptive thinking.
  • Router behavior should match the direct model behavior for the same effective downstream model.

Relevant log output

What part of LiteLLM is this about?

No response

What LiteLLM version are you on ?

v1.83.8

Twitter / LinkedIn details

No response

extent analysis

TL;DR

The issue can be resolved by updating the router configuration to properly handle adaptive thinking requests or by bypassing the router and sending requests directly to the claude-sonnet-4-6 model.

Guidance

  • Verify that the claude-sonnet-4-6 model indeed supports adaptive thinking by checking its documentation or testing it with a simple request.
  • Check the router configuration to ensure it is correctly set up to handle adaptive thinking requests and that all tiers point to models that support this feature.
  • Test the request with a different model that is known to support adaptive thinking to isolate if the issue is model-specific or router-specific.
  • Consider updating the LiteLLM version to the latest available, as the current version (v1.83.8) might have known issues or limitations that are resolved in newer versions.

Example

No specific code example is provided as the issue seems to be related to the configuration and interaction between the router and the model rather than a code-level problem.

Notes

The provided information suggests that the claude-sonnet-4-6 model supports adaptive thinking when accessed directly, but the issue arises when requests are routed through auto_router/complexity_router. This indicates a potential configuration or compatibility issue with the router.

Recommendation

Apply a workaround by sending requests directly to the claude-sonnet-4-6 model until the router configuration issue is resolved, as this approach has been shown to work based on the provided example successful response.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

litellm - 💡(How to fix) Fix [Bug]: `auto_router/complexity_router` rejects `thinking.type=adaptive` for Claude Code requests [1 participants]