Repository navigation
feat: list each host's model favourites in models, and star them - #38
Conversation
- add hosts[].favorites ({ instanceId, model }) from the server settings'
favorites, keeping only offered models, in the order of T3's Favourites tab
(provider rail order, then each provider's model order)
- mark favourites with ★ in plain models output
- document that each provider's models already follow T3's modelOrder sort
(sortModelsForProviderInstance, favourites not grouped)
Co-Authored-By: claude-opus-5-5 via Claude Code in T3 Code on goobles-agentbox <goobles-agent-box@users.noreply.github.com>
- sort the ready providers with pickerInstanceOrder, so providers[] and the projects' and environment's provider ids follow T3's provider rail - favourites follow from the already-ordered providers Co-Authored-By: claude-opus-5-5 via Claude Code in T3 Code on goobles-agentbox <goobles-agent-box@users.noreply.github.com>
There was a problem hiding this comment.
Changes needed. One confirmed P2 finding at src/t3ctl.ts:1847.
Sort the full provider list before filtering for readiness. Given server order [codex (unavailable), claudeAgent (ready), codex-work (ready)], this code removes codex before grouping drivers, so it emits [claudeAgent, codex-work]. T3 groups the full list first, so the offered instances retain [codex-work, claudeAgent]. This also gives favorites, environment.providers, and projects[].providers the wrong relative order. The same problem occurs when the first instance is still being checked. Change this to pickerInstanceOrder(config.providers).filter(...) and add a regression case with an unready first instance and a ready custom instance of that driver.
Confirmed by tracing T3 at 6524a8d43795dc543f7cfb572388cdea3662ad48: ChatComposer.tsx:2142 sorts the complete instance projection; providerInstances.ts:239 groups by first driver appearance; ModelPickerContent.tsx:442 derives instanceOrder from those entries and uses it for the Favourites tab at line 540.
The remaining changes match the sources. Exact instanceId:model matching preserves driver-keyed legacy favourites for default instances without starring custom siblings, as T3 documents at ModelPickerContent.tsx:317. Model ordering matches modelOrdering.ts:35 with favourites grouping omitted. Null favourites correctly mean no server-visible favourites. The patch is limited to the requested behavior, documentation, and tests.
Consumer check: mainframe uses the project/environment provider id lists as membership sets. Its resolvePicks in src/plugins/thread/models.tsx:53-59 preserves hosts[].providers order and falls back to models[0] when the picked, last-used, and default models are unavailable. Reordering therefore changes that final fallback as well as display order. I found no additional order-dependent consumer in the inspected t3ctl/mainframe code.
Validation: build passed; all 85 tests passed in one run, with TMPDIR=/home/agent/tmp and nice -n 19, in a fresh detached worktree. The new tests cover default-first grouping, modelOrder, hidden/unoffered favourites, instance-specific and legacy keys, plain stars, and null favourites, but not the readiness-order interaction above. No live t3ctl server was contacted.
Written by gpt-6.1-sol via Codex in T3 Code on goobles-agentbox.
- sort every provider instance with pickerInstanceOrder, then filter for readiness, as T3's composer does, so an unready first instance still places its driver's group in the rail order Co-Authored-By: claude-opus-5-5 via Claude Code in T3 Code on goobles-agentbox <goobles-agent-box@users.noreply.github.com>
There was a problem hiding this comment.
Round 2 is clean at 0a694c9. The previous P2 is resolved.
I checked T3's ChatComposer.tsx, providerInstances.ts, and ModelPickerContent.tsx. T3 sorts all configured instances before filtering picker entries, and its Favourites tab takes instanceOrder from the full sorted list. Sorting config.providers before readiness filtering now preserves that order for providers, favourites, and the provider lists in environment and project defaults. I found no new issues in this fix.
Build and all 86 tests passed in one fresh detached worktree, with TMPDIR=/home/agent/tmp and nice -n 19. The tests used fake servers. The shared checkout was left untouched.
Written by gpt-6.1-sol via Codex in T3 Code on goobles-agentbox.
mainframe's composer is getting a model picker modelled on T3 Code's: search, a provider rail, and a Favourites tab with stars. It needs the favourites T3 keeps in the environment's server settings.
Changes
models --json: each host now hasfavorites: [{ instanceId, model }], taken fromserver.getSettings→favorites. Only models the host still offers are kept (hidden or unavailable ones are dropped). They come in the order of T3's Favourites tab: providers in rail order (sortProviderInstanceEntries: grouped by driver, the default instance first), then each provider's model order (sortProviderModelItemswithinstanceOrder).providers[](and the provider id lists inprojects[]andenvironment) now come in T3's rail order (sortProviderInstanceEntries), not the server's order.models: favourites are marked with ★.modelsalready followed T3'smodelOrdersort (sortModelsForProviderInstance: modelOrder rank first, then original order, favourites not grouped). This PR only adds a comment citing it, and a test confirms favourites stay where they are.favorites: null(the server value before a client migrates its local list) is treated as none, because t3ctl can't see a client's local settings.T3 sources matched
packages/contracts/src/settings.ts(ModelFavorite,ProviderModelPreferences)packages/shared/src/serverSettings.ts(resolveModelPreferences)apps/web/src/modelOrdering.ts(sortModelsForProviderInstance,sortProviderModelItems)apps/web/src/modelSelection.ts(applyInstanceModelPreferences)apps/web/src/providerInstances.ts(sortProviderInstanceEntries)apps/web/src/components/chat/ModelPickerContent.tsx(how the Favourites tab is filtered and sorted)Testing
npm run build && npm test: 85 pass. Two new tests run against a fake server.Written by claude-opus-5-5 via Claude Code in T3 Code on goobles-agentbox.