Repository navigation
fix(native-chat): show the model picker in a new OMP or Antigravity chat - #30713
Conversation
A fresh OMP chat had no model picker until its first message. omp acp cannot delete a session, so the listing one goes to a throwaway --session-dir.
Antigravity lists models only in a session, so its first chat had no picker.
9dc83a3 to
c76b754
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to
|
#30713's OMP listing session uses the shared version check this branch already calls; its test reads the version through the reader signature.
ELI5
A new OMP or Antigravity chat now shows the model picker straight away. Before, it only appeared after you sent the first message.
What Changed
Before: a fresh OMP chat showed only the permission pill. The picker turned up once the first message started OMP. Every later OMP chat on that machine had it, because Orca saved the list from that first chat.
After: when an OMP chat opens, Orca asks OMP for its models, and the picker is there before you type anything. A model picked at that point is the one the first turn runs on.
Orca now fetches OMP's models the way it already does for OpenCode 2. It opens a session in the chat's folder and reads the model list OMP returns.
omp acpcan't delete a session, and an empty one would show up in OMP's resume list, in other editors and in Orca's Session History. So the fetch starts OMP with--session-dirpointed at a throwaway folder in Orca's data folder. Orca deletes that folder as soon as OMP exits. Anything a crash leaves behind is cleared the next time Orca fetches.The per-run folder handling already existed for agents that need their own temp folder. It is now one small helper (
acpRunFolder) that both use. Agents that can't delete a session still aren't asked unless their spec opts in, and only OMP does.Antigravity had the same gap: it lists models only inside a signed-in session, so its first chat had no picker. Its chats always sign in through Orca first, and that sign-in already opens a session to confirm it worked, then deletes its files. That session's model list is now saved the way a running chat saves its own, under the same account key a new chat reads, so the first chat after signing in has the picker. Nothing new is launched.
Why
omp models --jsondoesn't apply OMP'senabledModelssetting, so it can list models a chat then refuses. A session lists exactly what a chat in that folder offers.bb (get-bb/bb) does the same session fetch for OMP but leaves the empty session in OMP's store. That works for bb because it never reads OMP's sessions. Orca's Session History does, so the session has to stay out of OMP's store. Hiding empty sessions in Session History was the other option, but it would still leave them in OMP's own session list.
For Antigravity, a fetch like OMP's would need its whole launch path (installed-runtime check, sign-in lock, private temp folder, authentication) on every refresh. Reusing the sign-in session needs none of that. A host that signed in before this change and never opened a chat still gets the picker only after its first message.
Linked Issue
N/A. No open issue covers this.
Visual Proof
No screenshots attached. In a hidden dev build, a fresh OMP chat showed the picker 1.5s after opening, with nothing sent, listing every configured model.
Testing
OMP 17.0.5 (oldest supported) and 18.12.2:
omp acp --session-dir <dir>writes the session only to<dir>and lists the same models as without the flag.Dev build on macOS: Orca's fetch ran
omp acp --session-dir <Orca data>/acp-listing-sessions/omp/run-…. Afterwards OMP's sessions folder had no session files and the run folder was gone. Picking a model before the first message switched the chat's session to it before the first turn.Probe test covers the arguments, the folder location and its removal; it fails with either removed.
Sign-in test, using the model option from a recorded Antigravity 1.3.0
session/new, checks the list lands in the catalog a new chat reads; it fails without the save. Not run against a real Google sign-in.I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
The fetch runs on whichever host runs OMP, so SSH hosts behave the same once they run this build. On Windows a file still held open after OMP exits can block the delete; the next fetch clears it.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)