Skip to content

feat: 支持通过参数关闭 thinking 模式,兼容 Kimi K2 等默认开启思考的模型 #1

Closed

Description

@grissomsh

背景

使用 kimi-k2.6、kimi-k2.5 等默认开启 thinking 模式的模型时,所有子任务审查均失败:

LLM completion error: API error 400: thinking is enabled but reasoning_content
is missing in assistant tool call message at index 2

原因

这些模型默认启用 thinking 模式。OCR 内部进行多轮 tool call 对话时,Kimi API 要求每条 assistant 消息都携带 reasoning_content 字段,但 OCR 构造的 tool call 消息中不包含该字段,导致 API 返回 400。

当前绕过方式

换用默认关闭 thinking 的模型,如 kimi-k2-turbo-preview。

期望

增加配置项,允许用户控制是否启用 thinking 模式,例如:

# 方案 A:专用开关
ocr config set llm.thinking false

# 方案 B:通用 extra_body 透传
ocr config set llm.extra_body '{"thinking": {"type": "disabled"}}'

影响范围

┌───────────────────────┬───────────────────────────┐
│         模型          │           状态            │
├───────────────────────┼───────────────────────────┤
│ kimi-k2.6             │ 默认开启 thinking,不可用 │
├───────────────────────┼───────────────────────────┤
│ kimi-k2.5             │ 默认开启 thinking,不可用 │
├───────────────────────┼───────────────────────────┤
│ kimi-k2-turbo-preview │ 默认关闭 thinking,可用   │
└───────────────────────┴───────────────────────────┘

其他厂商的 thinking 模型(Claude extended thinking、DeepSeek-R1 等)也可能存在相同问题。

Activity

  1. lizhengfeng101 commented on May 22, 2026

    @lizhengfeng101
    Contributor

    感谢反馈,我们决定采用下面这个方案,最快今天修复。

    方案 B:通用 extra_body 透传

    ocr config set llm.extra_body '{"thinking": {"type": "disabled"}}'

  2. added a commit that references this issue on Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions