MoonshotAI / MoonshotAI/kimi-code

[TUI] Thinking toggle unavailable for reasoning-capable third-party models (openai provider), even though thinkingEffort is sent

Open
#2,023 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
7.5k
Forks
1.2k
Avg merge
11h 53m
Merged PRs (30d)
350

Description

Environment
  • kimi-code 0.26.0 (Windows)
  • Session model: third-party reasoning model via an openai-type provider
Setup
default_model = "kimi-code/k3"

[thinking]
enabled = true
effort = "max"

[providers.deepseek]
type = "openai"
base_url = "https://api.deepseek.com/v1"
api_key = "sk-..."

[models."deepseek/v4-pro"]
provider = "deepseek"
model = "deepseek-v4-pro"
max_context_size = 1000000
# no capabilities declared — docs say thinking/tool_use are auto-matched by model name prefix
Expected

After /model deepseek/v4-pro, the TUI thinking toggle/indicator should be available: deepseek-v4-pro is a reasoning model (models.dev catalog marks it reasoning: true, and the API returns reasoning_content), and the providers doc states third-party reasoning models such as DeepSeek "work out of the box".

Actual

The thinking toggle is unavailable (greyed out) for the session, as if the model had no thinking capability.

Evidence that thinking works at the request level

From this session's wire.jsonl, both llm.request records carried the thinking effort through to the OpenAI-compatible provider:

{"type":"llm.request","provider":"openai","model":"deepseek-v4-pro","modelAlias":"deepseek/v4-pro","thinkingEffort":"max","maxTokens":131072}

And a direct API call confirms the model accepts reasoning_effort ("high" and "max") and returns reasoning_content. So the request path is fine — the gap is in capability detection surfaced to the TUI.

Analysis

The docs say capabilities are "matched automatically by model name prefix" and "you typically do not need to declare them manually". For deepseek/v4-pro this auto-detection apparently does not mark the model as thinking-capable for UI purposes, so the TUI disables the toggle even though thinkingEffort is being sent.

Suggestions
  • Source the thinking capability from the models.dev catalog the CLI already fetches for /provider (catalog marks this model reasoning: true) — related: #1935
  • Or document that third-party aliases need an explicit capabilities = ["thinking"] for the TUI toggle to appear

Related: #250 (capability declaration for external models), #1051 (TUI thinking-effort feedback).

Workaround

Declaring the capability explicitly on the alias restores the toggle:

[models."deepseek/v4-pro"]
capabilities = [ "thinking", "tool_use" ]

中文摘要:通过 openai 类型 provider 接入的第三方推理模型(DeepSeek v4 Pro),请求层面 thinkingEffort 已正常透传、API 也返回 reasoning_content,但 TUI 的 thinking 开关显示不可用——能力自动识别(按模型名前缀)没有给该模型打上 thinking 标记。建议从 models.dev 目录读取 reasoning 能力,或在文档中说明需要手动声明 capabilities;目前可用 capabilities = ["thinking"] 绕过。

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the /provider models.dev catalog and model-name capability matching feed the TUI thinking toggle, using the reported deepseek/v4-pro configuration and wire.jsonl evidence. Compare catalog reasoning data with the explicit capabilities workaround, then verify that a reasoning-capable third-party alias enables the toggle without breaking thinkingEffort requests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ai, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.