Skip to content

[FEATURE]: Auto-select reasoning effort based on task complexity #21483

@naochan3

Description

@naochan3

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Summary

Currently, reasoning effort (variants like low/medium/high) must be manually switched by the user. It would be great if OpenCode could automatically select the appropriate reasoning effort based on the complexity of the task.

Problem

In v1.4.0, GitHub Copilot Anthropic models moved from a hardcoded thinking_budget: 4000 to user-selectable reasoningEffort variants. This is a great improvement, but users now have to manually switch between variants depending on the task.

  • Simple tasks (file search, small edits) waste tokens on high
  • Complex tasks (architecture decisions, debugging) suffer on low

Proposed Solution

Automatically classify the task complexity and select the reasoning effort:

Task type Suggested effort
Simple questions, file lookups low
Standard code edits, refactoring medium
Complex design, multi-file debugging high

Possible approaches:

  1. Heuristic-based: Analyze prompt length, number of files mentioned, keywords (e.g. "debug", "architect", "refactor") to estimate complexity
  2. Two-pass: Use a fast/cheap model call to classify complexity first, then route to the appropriate effort level
  3. Per-agent defaults: Allow configuring default effort per agent type (already partially possible, but could be more granular)

Additional Context

  • Related change: commit 5a6d10c (v1.4.0)
  • This would be especially valuable for GitHub Copilot users where rate limits matter more than per-token cost

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions