Skip to content

[BUG] Thinking models (e.g. kimi-k2-thinking) fail with Reasoning is mandatory via Kilo Gateway #6297

@cbrunnkvist

Description

@cbrunnkvist

Description

Some thinking models like kimi-k2-thinking fail when invoked via the Kilo Gateway with the error:

Reasoning is mandatory for this endpoint and cannot be disabled.

This affects:

  • kimi-k2-thinking (and potentially other -thinking suffix models) via @kilocode/kilo-gateway
Image

Expected Behavior

Thinking models should work out of the box without requiring manual reasoning toggle.

Root Cause

The ProviderTransform.options() function in packages/opencode/src/provider/transform.ts was not adding reasoning: { enabled: true } for thinking models accessed via Kilo Gateway.

Fix

Add logic to automatically enable reasoning for models that:

  1. Use @kilocode/kilo-gateway SDK
  2. Have reasoning capability
  3. Have "thinking" in their model ID

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingkilo-auto-fixAuto-generated label by Kilokilo-triagedAuto-generated label by Kilo

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions