DeepTutor icon indicating copy to clipboard operation
DeepTutor copied to clipboard

feat: add per-model reasoning effort setting

Open dongyu-will opened this issue 4 months ago • 0 comments

Summary

  • add an optional Reasoning effort selector to each editable LLM model
  • persist the selection as the existing model-level reasoning_effort field
  • make Auto remove the field so provider defaults remain unchanged
  • offer conservative provider/model-specific choices instead of one misleading universal enum
  • localize the new control and guidance in English and Chinese

Why

DeepTutor's runtime already resolves reasoning_effort from the active catalog model and maps it into each provider's request shape, but the Web model editor did not expose the field. Users therefore had to edit model_catalog.json manually.

This is the model-default layer discussed in #641; a future per-conversation override can take precedence over it.

Safety

  • Gemini 3 and Gemini 2.5 Pro offer minimal, not the invalid none value reported in #734
  • Gemini 2.5 non-Pro models may explicitly select none
  • OpenAI, Anthropic, and binary thinking providers receive conservative family-specific choices
  • unknown model families remain hidden unless an existing manual override needs to be displayed or cleared
  • Auto deletes reasoning_effort rather than persisting an empty string

Validation

  • pnpm --dir web run test:node — 368 passed
  • pnpm --dir web exec tsc --noEmit
  • targeted ESLint — 0 errors (6 pre-existing placeholder warnings in ServiceConfigEditor.tsx)
  • pnpm --dir web run i18n:check — locale parity OK
  • pnpm --dir web build
  • ./.venv/bin/pytest tests/services/llm/test_reasoning_params.py — 17 passed
  • ./.venv/bin/pytest tests/services/config/test_provider_runtime.py -k reasoning_effort — 1 passed
  • Impeccable detector — no findings
  • browser verification on /settings/llm:
    • OpenAI gpt-5.2 shows Auto, Minimal, Low, Medium, High, and Extra high
    • Gemini gemini-3.6-flash shows Auto, Minimal, Low, Medium, and High, with no none
    • selecting High and returning to Auto works
    • Chinese copy renders correctly and the console has zero errors

Fixes #735 Related: #641, #734

dongyu-will avatar Jul 31 '26 09:07 dongyu-will