GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(opencode): show Reasoning selector for OpenCode models by maria-rcks · Pull Request #9287 · pingdotgg/t3code

fix(opencode): show Reasoning selector for OpenCode models #9287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
maria-rcks merged 2 commits into pingdotgg:main from maria-rcks:t3code/add-opencode-reasoning-selector
Sep 3, 2026

Uh oh!

There was an error while loading. Please reload this page.

Merged

fix(opencode): show Reasoning selector for OpenCode models #9287

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit Hold shift + click to select a range
6fe6ced
fix(opencode): show Reasoning selector for OpenCode models
maria-rcks Sep 2, 2026
2dad23a
fix(tests, fmt): update TraitsPicker unavailable label and format Ope…
maria-rcks Sep 2, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Next Next commit
fix(opencode): show Reasoning selector for OpenCode models
OpenCode previously exposed its reasoning effort as a 'Variant'
option and only when a model advertised variants. Models without
variants (including custom models and several first-party providers)
showed only the Agent chip, leaving the composer with no reasoning
control while Codex/Grok/Cursor all offer one.

Add a Reasoning descriptor for all OpenCode models: keep the stored
'id' as 'variant' for compatibility but label it 'Reasoning', and
synthesize standard levels (low/medium/high/xhigh) when a model
advertises no variants so the TraitsPicker always has a primary
select to render. Provide the same fallback capabilities for custom
models and update the saved-option label for unavailable models.

This restores parity with other providers and makes the selected
effort visible in the composer footer (e.g. 'Medium · Build').
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@maria-rcks
maria-rcks committed Sep 2, 2026
commit 6fe6ced3ee59a3a32ef6dee12d4233b2fefd87e0

There are no files selected for viewing

38 changes: 35 additions & 3 deletions 38 apps/server/src/provider/Layers/OpenCodeProvider.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,47 @@ function inferDefaultAgent(agents: ReadonlyArray<Agent>): string | undefined {
}

const DEFAULT_OPENCODE_MODEL_CAPABILITIES: ModelCapabilities = createModelCapabilities({
optionDescriptors: [],
optionDescriptors: [
{
id: "variant",
label: "Reasoning",
type: "select",
options: [
{ id: "low", label: "Low" },
{ id: "medium", label: "Medium", isDefault: true },
{ id: "high", label: "High" },
{ id: "xhigh", label: "Extra High" },
],
currentValue: "medium",
},
{
id: "agent",
label: "Agent",
type: "select",
options: [
{ id: "build", label: "Build", isDefault: true },
{ id: "plan", label: "Plan" },
],
currentValue: "build",
},
],
});

function openCodeCapabilitiesForModel(input: {
readonly providerID: string;
readonly model: ProviderListResponse["all"][number]["models"][string];
readonly agents: ReadonlyArray<Agent>;
}): ModelCapabilities {
const variantValues = Object.keys(input.model.variants ?? {});
const rawVariantValues = Object.keys(input.model.variants ?? {});
// When a model advertises no variants, synthesize the standard reasoning
// levels so the composer still offers a Reasoning selector (mirrors the
// Codex/Grok experience where reasoning is always configurable). The set
// covers the common OpenCode variant spectrum; `inferDefaultVariant`
// picks the provider-appropriate default (e.g. medium for openai/opencode).
const variantValues =
rawVariantValues.length > 0
? rawVariantValues
: ["low", "medium", "high", "xhigh"];
const defaultVariant = inferDefaultVariant(input.providerID, variantValues);
const variantOptions = variantValues.map((value) =>
defaultVariant === value
Expand All @@ -201,7 +233,7 @@ function openCodeCapabilitiesForModel(input: {
? [
{
id: "variant",
label: "Variant",
label: "Reasoning",
type: "select" as const,
options: variantOptions,
...(defaultVariant ? { currentValue: defaultVariant } : {}),
Expand Down
2 changes: 1 addition & 1 deletion 2 apps/web/src/components/chat/TraitsPicker.tsx
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const SAVED_OPTION_LABELS: Readonly<Record<string, string>> = {
agent: "Agent",
effort: "Effort",
reasoningEffort: "Reasoning effort",
variant: "Variant",
variant: "Reasoning",
};

function savedOptionLabel(id: string): string {
Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.