Skip to content

feat: add per-model reasoning effort setting - #736

Open
dongyou03 wants to merge 1 commit into
HKUDS:devfrom
dongyou03:agent/add-model-reasoning-effort
Open

feat: add per-model reasoning effort setting#736
dongyou03 wants to merge 1 commit into
HKUDS:devfrom
dongyou03:agent/add-model-reasoning-effort

Conversation

@dongyou03

Copy link
Copy Markdown
Contributor

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

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

@dongyou03
dongyou03 marked this pull request as ready for review July 31, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant