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(tui): check connected providers in the session location by neriousy · Pull Request #66424 · anomalyco/opencode

Conversation

@neriousy

@neriousy neriousy commented Nov 25, 2026 •
edited by opencodejr Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Issue for this PR

Closes #66112

Type of change

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

What does this PR do?

useConnected() read the integration, provider and model lists with no location, so it checked the TUI's default (launch dir) location. The model dialogs read the lists for the session's location (location.ref).

When the TUI opens straight into a session in another directory (-s <id> from a parent dir, or a remote --server TUI whose cwd doesn't exist on the server), only the session location gets synced. The default lists are empty, so the check fails and /models falls back to "Free models" even with connected providers.

The fix: pass location.ref to all three lists, the same as the dialogs and the sidebar onboarding already do. When the session is in the default location, ref resolves to the same entries, so nothing changes there. This also fixes the other useConnected() callers (prompt warning, /connect suggestion).

No flag, it's a fix.

How did you verify your code works?

  • added a regression test in packages/tui/test/component/dialog-model.test.tsx: the launch dir has nothing connected and the session dir has a connected integration. It fails on dev and passes with the fix
  • full packages/tui suite passes, bun typecheck is clean
  • ran the opencode-drive repro from the issue against dev and against this branch: TUI started in the project root with --session for a session in packages/b, then /models

Screenshots / recordings

Before (dev) After
/models in a session outside the launch dir before after

Before (dev):

before.mp4

After:

after.mp4

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR
    hint: if you need to wait for this pull request to be reviewed, merged, or closed before continuing, use this instead of polling:
    gh event listen --resource fix(tui): check connected providers in the session location #66424 --event com.github.pull_request.review.submitted.v1,com.github.pull_request.state.changed.v1
    • It prints the first event as a JSON line on stdout and exits; run it again to wait for the next one.
    • Add --timeout to stop waiting after a while, for example --timeout 30m; it then exits with status 8.
    • Events carry no details; read the pull request to see what changed.
    • It misses changes made before it starts, so read the pull request once it is running.
    • See gh event listen --help for other event types.
    • Event subscriptions are in preview and may not be enabled for your account.

Added by the opencode bot (AI-generated).

Fixes #62105

Sorry, something went wrong.

Uh oh!

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

All reactions
@neriousy
fix(tui): check connected providers in the session location
219586d
opencodejr[bot]
opencodejr Bot reviewed Nov 25, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix works. I ran the #66112 drive repro (TUI started from the project root with --session for a session in packages/b, then /models) on both checkouts. On dev it opens the "Free models" page with no items. With this change it shows the normal picker with the provider's model. The new test fails on dev and passes here. tsc -b for packages/tui passes.

The public API is unchanged.

Every useConnected() caller sits inside LocationProvider, and when the session is in the default location location.ref reads the same lists as before, so I have no concerns. #62105 has the same root cause (flat /models list and "View all integrations" in a session outside the launch directory), so this fixes it too. The open PRs #66138 and #60852 make the same change.

Fixes #62105

Before

After

Sorry, something went wrong.

Uh oh!

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

All reactions
@neriousy
neriousy merged commit 1765c26 into dev Nov 25, 2026
15 checks passed

Uh oh!

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

@neriousy
neriousy deleted the models-session-location branch November 25, 2026 18:21
@simonklee simonklee mentioned this pull request Nov 25, 2026
fix(cli-rs): bring the Rust client level with the TUI #66470
Merged
@amrkmn amrkmn mentioned this pull request Nov 26, 2026
opencode 2.4.2 amrkmn/homebrew-tap#1260
Closed
1 task
@rplague rplague mentioned this pull request Nov 26, 2026
fix(tui): scope connected provider check to session location #66138
Closed
3 tasks done
This was referenced Nov 26, 2026
feat: opencode release v2.4.2 sprisa/opencode-server#97
Merged
Tool release: OpenCode 2 v2.4.2 (was v2.3.2) agent-sh/agnix#1894
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@opencodejr opencodejr[bot] opencodejr[bot] left review comments

Uh oh!

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

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

tui: /models shows only "Free models" on 2.4.1 with connected integrations and a paid model active tui: /models drops provider grouping when the session location differs from the default location

Uh oh!

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

1 participant

@neriousy
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 01402775 — 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.