This repository was archived by the owner on Apr 26, 2026. It is now read-only.
feat: support --effort flag via provider option and model suffix#15
Open
waveywaves wants to merge 1 commit into
Open
feat: support --effort flag via provider option and model suffix#15waveywaves wants to merge 1 commit into
waveywaves wants to merge 1 commit into
Conversation
Adds an `effort` provider option ("low" | "medium" | "high" | "xhigh" |
"max") that forwards to `claude --effort <level>`. Also supports a
per-model override using a `modelId:effort` suffix (e.g. `opus:high`),
which lets a single provider expose multiple effort tiers without
duplicating provider entries.
Usage:
"provider": {
"claude-code": {
"npm": "opencode-claude-code-plugin",
"models": {
"opus": { ... },
"opus:max": { ... }
},
"options": { "cliPath": "claude", "effort": "high" }
}
}
If the model ID contains a valid effort suffix, it overrides the
provider-level default and is stripped before being passed to `--model`.
17 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
effortprovider option (low | medium | high | xhigh | max) that forwards toclaude --effort <level>.modelId:effortsuffix (e.g.opus:high), so one provider entry can expose multiple effort tiers without duplicating the whole block.Why
Claude CLI's
--effortcontrols reasoning depth, and there's currently no way to set it from opencode — the plugin only forwards--modeland--dangerously-skip-permissions. This unblocks using e.g.opusathigheffort alongsidesonnetat default effort.Usage
{ "provider": { "claude-code": { "npm": "opencode-claude-code-plugin", "models": { "opus": { "name": "Opus" }, "opus:max": { "name": "Opus (max)" }, "sonnet": { "name": "Sonnet" } }, "options": { "cliPath": "claude", "effort": "high" } } } }Resolution order:
modelIdhas a:<effort>suffix and the suffix is valid, the suffix wins and is stripped before--model.options.effort.--effortis omitted (current behavior).Invalid suffixes are left untouched (treated as part of the model name) so existing configs keep working.
Test plan
bun run typecheckbun run buildDEBUG=opencode-claude-code opencodewitheffort: "high"set, verify--effort highappears in the spawnedclaudeargs.opus:max, verify--model opus --effort maxis spawned.