Skip to content

Bug: Kiro models fail with REQUEST_BODY_INVALID after setting thinking intensity in dashboard #2716

Description

@OlyMarco

Description

After updating 9router and configuring the thinking intensity option in the dashboard, Kiro models that previously worked correctly start returning HTTP 400 errors.

Affected models include:

  • kiro/claude-sonnet-4.5-thinking-agentic
  • kiro/glm-5-thinking-agentic
  • ...

Error message:

HTTP 400:
[kiro/claude-sonnet-4.5-thinking-agentic]
[400]: {"message":"Improperly formed request.","reason":"REQUEST_BODY_INVALID"}

Expected behavior

For models that do not support explicit thinking intensity parameters, 9router should either:

  1. Not send any thinking/reasoning parameter by default, or
  2. Explicitly disable thinking when no value is configured.

Previously, these models worked normally before the thinking intensity setting was introduced.

Actual behavior

After updating the dashboard and setting thinking intensity support, it seems that all requests are being assigned:

thinking: AUTO

or an equivalent automatic reasoning parameter.

This causes Kiro upstream requests to contain invalid reasoning configuration, resulting in:

REQUEST_BODY_INVALID

Models such as claude-sonnet-4.5-thinking-agentic and glm-5-thinking-agentic can no longer be used.

Steps to reproduce

  1. Update 9router to the latest version.

  2. Open dashboard settings.

  3. Configure thinking intensity.

  4. Use Kiro provider models:

    • kiro/claude-sonnet-4.5-thinking-agentic
    • kiro/glm-5-thinking-agentic
  5. Send a request.

The request fails with HTTP 400.

Possible cause

The new thinking intensity option may be globally injected into all provider requests.

However, different providers/models have different reasoning parameter formats. Kiro's agentic models may not accept:

thinking: AUTO

or similar automatic reasoning values.

Suggested fix

  • Default thinking intensity should be empty/disabled instead of AUTO.
  • Only inject reasoning parameters when the selected provider/model explicitly supports them.
  • Add provider-specific handling for Kiro reasoning models.

Additional information

I have screenshots comparing behavior before and after enabling/configuring thinking intensity, which show that the failure starts only after this change.

Image Image Image

Thanks for maintaining 9router. Hopefully this compatibility issue can be fixed soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions