Skip to content

Models-first /model picker and OpenCode Go billing pin - #327

Merged
TheGreatAxios merged 8 commits into
mainfrom
cl-5355-models-first-and-go-billing
Aug 5, 2026
Merged

Models-first /model picker and OpenCode Go billing pin#327
TheGreatAxios merged 8 commits into
mainfrom
cl-5355-models-first-and-go-billing

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Pin OpenCode Go to the subscription base URL so Go traffic is not billed as Zen PAYG (CL-5356).
  • Expand Tier A first-class connect catalog (OpenAI dual-path, Zen, Go, Z.AI Coding Plan, Anthropic, Google, xAI, Custom).
  • Open /model on a models-first list (Recent / Favorites / Providers) with Alt+A connect, Alt+F favorite, and auth-only API-key form (CL-5355).
  • Persist recentModels / favoriteModels in global settings; wire through provider manager and modal stack.

Test plan

  • bun run typecheck
  • Targeted tests: agent-modal, model-picker, settings, first-class-providers, opencode-go, config no-drop
  • tests/unit/tui/app.test.tsx (19 pass)
  • Manual: /model opens on model list; Alt+A connect API-key provider; Alt+F favorite; apply updates Recent
  • Manual: OpenCode Go connect uses https://opencode.ai/zen/go/v1 and is not billed as Zen PAYG

Closes CL-5355
Closes CL-5356

Force the Go subscription base URL whenever opencodeGo is set so a
mis-seeded or re-connected provider cannot store bare Zen PAYG.
Connect re-seed always pins catalog URLs for Go and Zen. Surface
subscription/credits product hints and a cross-product helper for Go
models on Zen.

Restructure first-class Connect as Tier A: dual-path OpenAI (ChatGPT
browser login vs API key), drop separate Codex, add Z.AI Coding Plan
and an explicit Custom entry last.
Persist global recentModels/favoriteModels with pure helpers, and
build the ordered models-first picker list (Recent, Favorites, providers).
Default the agent modal to Recent/Favorites/Providers, collect only the
API key on first-class connect, and persist recent/favorite pairs from
the provider manager.
Keep the optional-key no-drop guard green after adding models-first
picker preferences to global settings.
@linear-code

linear-code Bot commented Aug 5, 2026

Copy link
Copy Markdown

CL-5355

CL-5356

Skip success toast when the message is empty (recent/favorite silent
saves). Drop modal-side onRecordRecent so applySelection is the single
writer for recent models.
Serialize recent/favorite disk writes with an absolute in-memory list so
concurrent Alt+F and apply cannot clobber each other. Pin Go base URL when
the provider id is opencode-go even without the flag. Esc from connect and
profiles returns to the step that opened them. Drop the billingProductHint
alias and drive the connect list through connectListProviders.
Centralize Go detection on id and display name so Connect-seeded
"OpenCode Go" rows pin the same as opencode-go. Heal bare Zen baseURLs
on catalog load and settings projection so runtime never trusts a
mis-seeded Go base URL for billing.
Force OPENCODE_GO_BASE_URL in resolveProvider so emergency fallback cannot
mis-bill. Route agent-modal seed, status-bar usage, and gateway error
classification through the shared identity helpers, and unit-test them.
@TheGreatAxios
TheGreatAxios merged commit 630e021 into main Aug 5, 2026
1 check passed
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.

1 participant