Skip to content

fix(app): reflect configured reasoning effort in web ui#17587

Open
kdybicz wants to merge 13 commits intoanomalyco:devfrom
kdybicz:fix/app-thinking-effort-config
Open

fix(app): reflect configured reasoning effort in web ui#17587
kdybicz wants to merge 13 commits intoanomalyco:devfrom
kdybicz:fix/app-thinking-effort-config

Conversation

@kdybicz
Copy link
Copy Markdown

@kdybicz kdybicz commented Mar 15, 2026

Issue for this PR

Closes #17588

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The web UI did not reflect the reasoning/thinking effort configured through model options in opencode.json.

For configs like:

{
  "provider": {
    "openai": {
      "models": {
        "gpt-5.4": {
          "options": {
            "reasoningEffort": "high"
          }
        }
      }
    }
  }
}

New sessions still showed the variant selector as Default, and the first user message was sent without a variant. That also meant refresh could not preserve the selected thinking effort from session history.

This change makes the app infer the UI variant from configured model options when no explicit session or agent variant is set. It matches the effective reasoning/thinking fields used by provider variants, so provider-added defaults like reasoningSummary do not block the mapping.

This keeps the existing precedence intact:

  • explicit session selection wins
  • explicit Default still overrides configured inference
  • agent-configured variant still wins over model-option inference

How did you verify your code works?

  • Ran bun test src/context/model-variant.test.ts in packages/app
  • Ran bun typecheck in packages/app
  • Verified locally with:
    • backend: bun run --conditions=browser ./src/index.ts serve --port 4096 from packages/opencode
    • app: bun dev -- --port 4444 from packages/app
  • Confirmed a new session shows the configured High effort in the UI when reasoningEffort: "high" is set in config

Screenshots / recordings

Not added

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

@github-actions
Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Mar 15, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

Web UI does not reflect configured reasoning effort from model options

1 participant