Skip to content

fix(opencode): later same-price variants no longer mark GPT-6.2 Astra and Sol legacy - #46675

Open
juliusmarminge wants to merge 2 commits into
mainfrom
factory/issue-46663
Open

juliusmarminge wants to merge 2 commits into
mainfrom
factory/issue-46663

Conversation

@juliusmarminge

Copy link
Copy Markdown
Member

OpenCode's GPT-6.2 Astra and Sol models (and their Fast and Pro versions) were marked legacy, which hid them from @-mentions and put them behind "Show more". The cause was that OpenAI later released Healthcare variants in the same OpenCode family at the same price. Now a release that only adds a variant suffix to an existing model line (e.g. gpt-astra-healthcare next to gpt-astra) no longer supersedes that model by price. Renamed sizes at the same price (e.g. Gemini 4 Argon -> Carbon) still mark the older one legacy.

Fixes #46663

Reproduction on main

Commit a5a39fa (origin/main). Real OpenCode v2.4.3 on the VM, with OpenAI connected through the hub; its catalog has the same GPT-6.x Astra/Sol/Healthcare models, families, release dates and prices as the issue's table (checked with opencode api get /api/model). Started the real server from the checkout: T3CODE_DEV_SEED=0 node apps/server/src/bin.ts serve --base-dir <scratch> --port 38663 --host 127.0.0.1. Enabled the OpenCode instance in that base dir's settings.json (providerInstances.opencode.enabled: true). The server hot-reloaded the setting, probed OpenCode (status ready, version 2.4.3) and wrote caches/opencode.json. The snapshot has isLegacy: true for openai/gpt-6.2-astra, -astra-fast, -astra-pro, gpt-6.2-sol, -sol-fast and -sol-pro. gpt-6.2-astra-ultrafast, gpt-6.2-sol-ultrafast and all *-healthcare variants are current. This is exactly the issue's table. Older versions (gpt-6-astra, gpt-6.1-sol, etc.) are legacy through the release-line clause, as expected. The composer's @-mention list skips legacy models (composerModelMentions.ts), so these never show up under OpenCode. I did not drive the web composer UI; the snapshot flag it reads is what I checked. Failing test: branch factory/repro-46663 (e470a10) adds one test to packages/provider-opencode/src/server/status.test.ts. It calls openCode2ProviderModels with gpt-6.2-astra, gpt-6.2-astra-pro, gpt-6.2-astra-healthcare, gpt-6.2-sol and gpt-6.1-sol-healthcare (same family, Healthcare a week later at the same price) and expects none to be legacy. On main it gets [openai/gpt-6.2-astra, openai/gpt-6.2-astra-pro, openai/gpt-6.2-sol].

Evidence

Being captured: before and after in the real app. This section is filled in before the pull request can merge.

Tests

  • vp test run src/server/status.test.ts (packages/provider-opencode): 48 passed; without the fix the repro test fails (1 failed, 47 passed)
  • A throwaway test fed the real OpenCode 2.4.3 catalog into openCode2ProviderModels: on main the six gpt-6.2 Astra/Sol models are legacy; with the fix they are current and no other model's flag changed
  • vp run check:changed: format, lint, knip, typecheck (10 packages) and tests all pass
  • vp run typecheck (packages/provider-opencode): no errors (only existing schemaClassMissingBrand suggestions)

Not in this change

  • gpt-6-astra-flex and gpt-6.1-sol-flex stay current even though newer versions of their lines exist, because no newer -flex release exists in the catalog; this behaviour was already there and is unchanged by this fix.

Who did the work

  • Written by Claude Opus 5.5, in Claude Code
  • Reviewed by GPT-6.1 Sol, in Codex, and by Claude Opus 5.5, each on its own
  • Proof captured by GPT-6.1 Sol and checked by Claude Opus 5.5

Run by the t3code factory in T3 Code.

juliusmarminge and others added 2 commits December 1, 2026 09:28
…2 current

Reproduces #46663: markOpenCodeLegacy's price clause marks GPT-6.2 Astra,
Astra Pro and Sol legacy because Healthcare variants in the same family
shipped a week later at the same price.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… and Sol legacy

OpenCode lists OpenAI's Healthcare variants in the same family as GPT-6.2
Astra and Sol, a week later and at the same price, so the price clause in
markOpenCodeLegacy treated them as replacements. A release whose line
extends another line in its family (gpt-astra-healthcare extends
gpt-astra) is a variant of that model, so its price no longer supersedes
anything. Renamed sizes such as gemini-4-argon -> gemini-4-carbon still do.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Dec 1, 2026
@macroscopeapp

macroscopeapp Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs Human Approval

Macroscope's review found this PR requires human approval — The change keeps base OpenCode models current when later same-price variants appear. Legacy status also controls scheduled-task default selection, so the resulting change in model preselection needs human confirmation.

You can add or adjust custom eligibility rules. Learn more.

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 21.5 KiB 21.5 KiB 0 B (0.0%) 24.4 KiB ✅
Codex Live turn messages 1 1 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.9 KiB 21.9 KiB 0 B (0.0%) 24.4 KiB ✅
Claude Live turn messages 1 1 0 (0.0%) 8 ✅

Other scenarios

All 64 scenario measurements match main.

All 64 scenario measurements
Provider Scenario Metric Main baseline This PR Impact PR ceiling
Codex short turn resume WebSocket decoded 10.5 KiB 10.5 KiB 0 B (0.0%) 12.7 KiB ✅
Codex short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn running, cold open HTTP decoded 281.7 KiB 281.7 KiB 0 B (0.0%) 302.7 KiB ✅
Codex long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Codex long turn running, history page HTTP decoded 92.5 KiB 92.5 KiB 0 B (0.0%) 107.4 KiB ✅
Codex long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Codex long turn finished, cold open HTTP decoded 381.5 KiB 381.5 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, socket cold open WebSocket decoded 381.6 KiB 381.6 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, work page HTTP decoded 78.3 KiB 78.3 KiB 0 B (0.0%) 200.2 KiB ✅
Codex long turn finished, work page rows 75 75 0 (0.0%) 150 ✅
Codex idle thread resume WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell snapshot HTTP decoded 42.4 KiB 42.4 KiB 0 B (0.0%) 53.7 KiB ✅
Codex fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Codex fleet shell subscribe WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Codex fleet shell resume check rows 0 0 0 0 ✅
Codex stale shell reload HTTP decoded 42.4 KiB 42.4 KiB 0 B (0.0%) 53.7 KiB ✅
Codex stale shell reload rows 27 27 0 (0.0%) 27 ✅
Codex stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Codex stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex stale todo list cold open HTTP decoded 72.4 KiB 72.4 KiB 0 B (0.0%) 83.0 KiB ✅
Codex stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Codex stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅
Claude short turn resume WebSocket decoded 10.6 KiB 10.6 KiB 0 B (0.0%) 12.7 KiB ✅
Claude short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn running, cold open HTTP decoded 283.3 KiB 283.3 KiB 0 B (0.0%) 302.7 KiB ✅
Claude long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Claude long turn running, history page HTTP decoded 93.4 KiB 93.4 KiB 0 B (0.0%) 107.4 KiB ✅
Claude long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Claude long turn finished, cold open HTTP decoded 384.2 KiB 384.2 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, socket cold open WebSocket decoded 384.3 KiB 384.3 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, work page HTTP decoded 79.2 KiB 79.2 KiB 0 B (0.0%) 200.2 KiB ✅
Claude long turn finished, work page rows 75 75 0 (0.0%) 150 ✅
Claude idle thread resume WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell snapshot HTTP decoded 43.0 KiB 43.0 KiB 0 B (0.0%) 53.7 KiB ✅
Claude fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Claude fleet shell subscribe WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Claude fleet shell resume check rows 0 0 0 0 ✅
Claude stale shell reload HTTP decoded 43.0 KiB 43.0 KiB 0 B (0.0%) 53.7 KiB ✅
Claude stale shell reload rows 27 27 0 (0.0%) 27 ✅
Claude stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Claude stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude stale todo list cold open HTTP decoded 73.4 KiB 73.4 KiB 0 B (0.0%) 83.0 KiB ✅
Claude stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Claude stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅

Baseline: 36983d6 · PR result: 8522ea1 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@coderabbitai

coderabbitai Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

OpenCode legacy matching now excludes nested model-line variants from same-price supersession. Release-line normalization retains hyphens, and a regression test checks GPT-6.2 releases against later variants.

Changes: OpenCode model legacy matching

Layer / File(s) Summary
Variant-aware legacy matching
packages/provider-opencode/src/server/status.ts, packages/provider-opencode/src/server/status.test.ts
releaseLine retains hyphens between normalized tokens. Before legacy matching, the code clears the price of an active release whose normalized line extends another active release’s line. The regression test checks GPT-6.2 models with matching prices across variant types, including releases a week later.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Possibly related issues

  • Issue 46664: This change does not update catalogFingerprint or refresh behavior, so stale legacy flags after a family change remain unaddressed.
Merge Risk: Minimal · up to 8522e

This change keeps GPT-6.2 Astra and Sol models, including their variants, from being wrongly marked legacy, so they stay available in the composer. The change is small and covered by a regression test. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the fix and the affected models: later same-price variants no longer mark GPT-6.2 Astra and Sol legacy. It matches the main change in markOpenCodeLegacy and the status tests. It uses t…
Description check Passed The description follows the template's sections in substance. Problem and Change are clear and specific, and the scope links issue #46663 as the bug. Verification lists focused tests, the real-catalog…
Linked Issues check Passed Issue #46663 requires that OpenCode GPT-6.2 Astra and Sol models, including Fast and Pro variants, not be marked legacy because same-price Healthcare variants were released later. The head changes `ma…
Out of Scope Changes check Passed All changed hunks serve the #46663 fix. The status.ts changes update the legacy rule and its doc comment. The releaseLine change supports the new prefix comparison. The status.test.ts changes add th…
Full details: Title check

Explanation

The title names the fix and the affected models: later same-price variants no longer mark GPT-6.2 Astra and Sol legacy. It matches the main change in markOpenCodeLegacy and the status tests. It uses the conventional commit format from the template.

Full details: Description check

Explanation

The description follows the template's sections in substance. Problem and Change are clear and specific, and the scope links issue #46663 as the bug. Verification lists focused tests, the real-catalog replay, and check results, and it states the untested UI path. It also names the model and harness, as the template asks. The Evidence section is explicitly still pending, and the template requires before/after evidence for UI changes. This change is not a UI change, but the author marks the merge as blocked on evidence capture, so the gap is visible. The description also contains extra sections (Not in this change, Who did the work) that the template does not define. The template's Verification section asks for observed results, and the author gives them.

Full details: Linked Issues check

Explanation

Issue #46663 requires that OpenCode GPT-6.2 Astra and Sol models, including Fast and Pro variants, not be marked legacy because same-price Healthcare variants were released later. The head changes markOpenCodeLegacy in packages/provider-opencode/src/server/status.ts. Before the price comparison, the function clears the price of any active release whose releaseLine starts with another active release's line plus -. Healthcare, Pro, Fast and Ultrafast variants (for example gpt-astra-healthcare, gpt-astra-pro, gpt-sol-fast) extend the base line, so they can no longer supersede or be superseded by price. Their version-based supersession is unchanged. releaseLine now joins tokens with - and drops empty tokens, so the prefix check works. Renamed sizes with different lines (for example gemini-argon and gemini-carbon) keep their price, so they remain legacy by price. The added test in status.test.ts calls openCode2ProviderModels with the astra, sol, pro and Healthcare cases from #46663 and expects no legacy models. The diff covers the reported cases. Fast variants are covered by the same prefix logic but are not in the new test. The author reports the test suite passes; I did not re-run it. Argon to Carbon legacy behavior relies on existing tests that are not in this diff, which I did not inspect.

Full details: Out of Scope Changes check

Explanation

All changed hunks serve the #46663 fix. The status.ts changes update the legacy rule and its doc comment. The releaseLine change supports the new prefix comparison. The status.test.ts changes add the import and a regression test for the reported models. No changes touch the web composer, settings, or the workaround tracked in #46664. One side effect is that releaseLine now keeps hyphens, so ids that differed only by a hyphen placement (previously joined to the same string) now compare as different lines. This is a narrow behavior change tied to the line-matching logic, not an unrelated change.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 36983d6 and 8522ea1.

Files selected for processing: 2

  • packages/provider-opencode/src/server/status.test.ts
  • packages/provider-opencode/src/server/status.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: OpenCode's GPT-6.2 Astra and Sol are marked legacy because same-price Healthcare variants were released later

1 participant