Skip to content

[Feature Request]:Add a per-conversation reasoning-effort selector to the chat composer #641

Open

Description

@crasuna

Do you need to file a feature request?

  • I have searched the existing feature request and this feature request is not already filed.
  • I believe this is a legitimate feature request, not just a question or bug.

Feature Request Description

Please add a reasoning-effort selector directly to the chat composer, similar to the controls available in ChatGPT and Codex.

At present, there is no visible per-conversation control for reasoning effort in the chat interface. Users should be able to change the reasoning level before sending a message, without restarting the backend or changing a global configuration.

A suitable location would be next to the model or capability selector in the chat composer.

For example:

Selected model · Reasoning: High

The available options could include:

Provider default
None or Minimal
Low
Medium
High
XHigh
Max

Only the values supported by the selected model and provider should be shown.

The selected value should:

Apply to the next submitted message.
Remain active in the current conversation until changed.
Not affect other conversations.
Take effect without restarting the backend.
Be clearly visible before a message is sent.
Be shown in the Activity panel or runtime details after the request is completed.

A possible configuration precedence would be:

Current conversation setting
LLM profile default
Global environment configuration
Provider or model default

This would preserve existing configuration methods while allowing task-level control from the chat interface.

For models or providers that do not support reasoning effort, the selector should be hidden or disabled. The application should also avoid sending unsupported parameter values.

Related Module

Frontend/Web

Use Case

Different requests require different balances between response quality, latency, and resource usage.

A lightweight request may only require a low or medium reasoning level, while a more complex request may benefit from a higher level. Allowing users to adjust this setting from the chat composer would avoid applying the same reasoning level to every request and would eliminate the need to restart the backend when changing it.

Additional Context

Suggested acceptance criteria:

Reasoning effort can be changed directly from the chat interface.
The change takes effect on the next message without restarting DeepTutor.
The selected value persists within the current conversation.
Different conversations can use different values.
Only supported values are sent to the selected provider.
The effective value is visible in the Activity panel or runtime details.
Existing global configuration remains available as a fallback.

Activity

  1. added
    enhancement
    on Jul 18, 2026
  2. ImproveRei0 commented on Jul 31, 2026

    @ImproveRei0

    不至于在每一个会话中都单独设置,但是我认为在模型配置界面增加关于OpenAI模型的reasoning_effort配置选项是有必要的
    似乎在调用openai api时,如果这个值未被传入,那么模型能力将默认为medium,
    这不利于发挥模型的全部能力,同时使用高reasoning_effort有时会让小模型发挥出乎意料的表现力和性价比(尤其是在openai大幅降低5.6-luna定价的情况下),如果默认为medium,那么小模型将会几乎一无是处

  3. QuanHongnan commented on Oct 28, 2026

    @QuanHongnan

    补充 #641 实现所需的端到端契约检查,避免另开重复的选择器需求。这里不声称当前UI已经提供完整的会话级推理选择器,而是说明服务层已有字段在请求及恢复链路中的断点。

    版本与范围

    DeepTutor v1.6.15,核对提交a31d82624c27d75f4e771d4fcb78dce16470b383。涉及会话级模型选择,不涉及任何特定模型账号或教学主题。

    问题

    服务层services/model_selection/llm.py::LLMSelection声明并接受可选reasoning_effort,但端到端契约不一致:

    1. core/turn_request.py::LLMSelection只有profile_id和model_id,同时设置extra="forbid";因此加入reasoning_effort会得到extra_forbidden。
    2. 生成的前端LLMSelection接口没有该字段。
    3. ChatStateAdapter.tsx::asLLMSelection恢复已保存选择时,只保留两个ID,丢弃额外的推理设置。

    这意味着仅修改服务层或保存设置,不能保证请求、刷新和重试后仍使用相同的推理参数。

    最小复现

    使用合成配置值进行模型校验即可,无需访问模型接口:

    {"profile_id":"profile-test","model_id":"model-test","reasoning_effort":"low"}
    • 传给服务层LLMSelection.from_payload:该层实现支持此字段。
    • 传给核心请求模型LLMSelection.model_validate:上游原始类返回extra_forbidden,位置为reasoning_effort。
    • 把同一对象传给asLLMSelection:输出只剩两个ID。

    固定上游提交的独立函数探测结果:

    {"wire_model_validation":{"accepted":false,"error":"extra_forbidden","field":"reasoning_effort"},"hydration":{"input":{"profile_id":"profile-test","model_id":"model-test","reasoning_effort":"low"},"output":{"profile_id":"profile-test","model_id":"model-test"}}}

    请求模型一侧可直接运行:

    from deeptutor.core.turn_request import LLMSelection
    LLMSelection.model_validate({"profile_id": "profile-test", "model_id": "model-test", "reasoning_effort": "low"})

    无需在线模型或真实凭据;前端一侧为asLLMSelection的输入/输出往返检查。

    预期

    服务层、核心请求模型、生成协议类型、持久化和恢复逻辑采用一致的可选字段与验证规则;旧的仅含两个ID的请求继续有效。

    建议修复与验收

    • 在权威请求模型声明可选推理参数,限定允许值;重新生成协议与前端类型,避免只修改生成文件。
    • 前端恢复时校验并保留合法值;非法值明确拒绝或按既定兼容策略处理。
    • 覆盖low、high、缺省值、非法值,以及保存→刷新→发送→重试的完整往返。
    • 保持显式会话覆盖、模型条目默认值与全局默认值的优先级;不要统一强制低推理。

    上游源码

    另核对 dev@9ce7ba9059e3d2ae0aa5fa9427b112a4148abce0:核心LLMSelection仍无该字段,前端恢复函数仍只保留两个ID。相关但独立的当前模型重试/编辑问题已分别记录于 #2105、#2106。

  4. added a commit that references this issue on Nov 16, 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

    enhancement

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions