Skip to content

fix: honor opencode-go max reasoning effort - #21501

Closed
danshapiro wants to merge 1 commit into
NousResearch:mainfrom
danshapiro:yente/opencode-go-max-reasoning-upstream-pr
Closed

fix: honor opencode-go max reasoning effort#21501
danshapiro wants to merge 1 commit into
NousResearch:mainfrom
danshapiro:yente/opencode-go-max-reasoning-upstream-pr

Conversation

@danshapiro

@danshapiro danshapiro commented May 7, 2026

Copy link
Copy Markdown

Summary

  • accept max as a reasoning effort level in config and gateway command handling
  • have the opencode-go provider profile send deepseek-v4-* reasoning effort as a top-level Chat Completions reasoning_effort parameter
  • keep non-DeepSeek OpenCode Go models unchanged and avoid generic extra_body.reasoning for the DeepSeek V4 profile path

Tests

  • uv run --frozen --extra dev pytest tests/providers/test_provider_profiles.py::TestOpenCodeGoProfile tests/providers/test_transport_parity.py::TestOpenCodeGoParity tests/gateway/test_reasoning_command.py::TestReasoningCommand::test_parse_reasoning_command_args_accepts_ascii_and_smart_global_flags
  • uv run --frozen --extra dev pytest tests/providers/test_provider_profiles.py tests/providers/test_transport_parity.py tests/gateway/test_reasoning_command.py
  • git diff --check

Accept max as a reasoning effort level and have the opencode-go provider profile send deepseek-v4 reasoning_effort as a top-level Chat Completions parameter.

Add provider-profile, transport-profile, and gateway command regression coverage.
@danshapiro
danshapiro force-pushed the yente/opencode-go-max-reasoning-upstream-pr branch from 217e382 to 2f37a02 Compare May 7, 2026 20:24
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery comp/cli CLI entry point, hermes_cli/, setup wizard labels May 7, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused OpenCode Go regression coverage. The provider/config portion of this change is already present on current main, but the gateway command portion remains useful and needs a manual salvage.

Problems

  • Current /reasoning execution lives in gateway/slash_commands.py:2634, not the old gateway/run.py location changed by this PR. Its accepted-level set at gateway/slash_commands.py:2732 still omits max, so the gateway defect remains while the branch is conflicting.
  • Current main's OpenCodeGoProfile already maps max to top-level DeepSeek reasoning_effort at plugins/model-providers/opencode-zen/__init__.py:115-125, including prefixed model IDs covered by tests/plugins/model_providers/test_opencode_go_profile.py:115-123. Replacing it with the older profile would discard newer Kimi/GLM and normalization behavior.

Suggested changes

  • Transplant the gateway acceptance change into gateway/slash_commands.py:2732 and add max to hermes_cli/commands.py:155-157.
  • Add direct session and --global /reasoning max tests; tests/gateway/test_reasoning_command.py:84-87 currently checks only argument parsing.

This is an automated hermes-sweeper review.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 13, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Closing — fully superseded on current main. max is accepted in config/gateway handling (#62650, strings completed in #65651), and the opencode-zen profile now sends DeepSeek reasoning effort as a top-level reasoning_effort Chat Completions param with max/ultra clamping (see plugins/model-providers/opencode-zen/__init__.py). Thanks for the contribution!

@teknium1 teknium1 closed this Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants