Skip to content

feat(llm): add per-model reasoning effort - #676

Open
allenxu09 wants to merge 2 commits into
alibaba:mainfrom
allenxu09:feat/reasoning-effort
Open

feat(llm): add per-model reasoning effort#676
allenxu09 wants to merge 2 commits into
alibaba:mainfrom
allenxu09:feat/reasoning-effort

Conversation

@allenxu09

@allenxu09 allenxu09 commented Aug 2, 2026

Copy link
Copy Markdown

Summary

  • store reasoning effort per model in backward-compatible model_settings
  • send the protocol-specific request fields:
    • OpenAI Chat Completions: reasoning_effort
    • OpenAI Responses: reasoning.effort
    • Anthropic Messages: output_config.effort
  • add reasoning-effort selection to the provider/model TUIs and VS Code configuration UI
  • add CLI, environment, and GitHub Action overrides plus English/Chinese documentation

Why

Reasoning effort is model-specific, and each supported protocol uses a different request shape. Previously OCR had no first-class way to select it, so users had to rely on global extra_body overrides that did not follow model switches cleanly.

User impact

Users can select an effort while adding or switching models, set it with ocr config set reasoning_effort <value>, override it per run with --reasoning-effort or OCR_LLM_REASONING_EFFORT, and reset to the provider default without removing other model settings.

Validation

  • go test ./internal/llm ./internal/agent
  • targeted CLI/config/TUI tests in ./cmd/opencodereview
  • go vet ./internal/llm ./internal/agent ./cmd/opencodereview
  • VS Code Jest suite: 13 suites / 103 tests
  • VS Code webpack compile and ESLint (one pre-existing warning in IdleView.tsx)
  • npm run test:github-actions
  • README and docs translation-sync checks

@CLAassistant

CLAassistant commented Aug 2, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

🔍 OpenCodeReview found 5 issue(s) in this PR.

  • ✅ Successfully posted inline: 5 comment(s)

⚠️ 1 warning(s) occurred during review.


⚠️ Warnings:

  • cmd/opencodereview/provider_tui.go (subtask_error): main_task did not complete before stopping

Comment thread cmd/opencodereview/config_cmd.go
Comment thread extensions/vscode/src/extension/services/configDraft.ts Outdated
Comment thread extensions/vscode/src/extension/services/configParse.ts Outdated
Comment thread extensions/vscode/src/webview/views/ConfigView.tsx
Comment thread extensions/vscode/src/webview/views/ConfigView.tsx
@allenxu09
allenxu09 marked this pull request as ready for review August 2, 2026 03:58
@allenxu09

Copy link
Copy Markdown
Author

@lizhengfeng101 ping

@zhaozhenxiang

Copy link
Copy Markdown

这是一个刚性需求,需要实现。
我没有review pr的代码。

@allenxu09

Copy link
Copy Markdown
Author

@MuoDoo @lizhengfeng101 ptal

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.

3 participants