diff --git a/src/renderer/utils/teamModelCatalog.ts b/src/renderer/utils/teamModelCatalog.ts index 1f34c84a..c0693ec5 100644 --- a/src/renderer/utils/teamModelCatalog.ts +++ b/src/renderer/utils/teamModelCatalog.ts @@ -526,7 +526,7 @@ export function getVisibleTeamProviderModels( providerStatus?: RuntimeAwareProviderStatus | null ): string[] { const sourceModels = - providerId === 'opencode' && models.length === 0 + providerId === 'opencode' ? (getRuntimeCatalogLaunchModels(providerId, providerStatus) ?? models) : models; diff --git a/test/renderer/utils/teamModelAvailability.test.ts b/test/renderer/utils/teamModelAvailability.test.ts index 48548670..081ee217 100644 --- a/test/renderer/utils/teamModelAvailability.test.ts +++ b/test/renderer/utils/teamModelAvailability.test.ts @@ -245,8 +245,8 @@ describe('teamModelAvailability', () => { ).toBe('openrouter/moonshotai/kimi-k2'); }); - it('uses the OpenCode model catalog when runtime models are missing', () => { - const providerStatus = createOpenCodeProviderStatus([], { + it('uses the OpenCode model catalog when runtime models are summary-only', () => { + const providerStatus = createOpenCodeProviderStatus(['opencode/big-pickle'], { modelCatalog: { schemaVersion: 1, providerId: 'opencode', diff --git a/test/renderer/utils/teamModelCatalog.test.ts b/test/renderer/utils/teamModelCatalog.test.ts index ed92275d..b2476477 100644 --- a/test/renderer/utils/teamModelCatalog.test.ts +++ b/test/renderer/utils/teamModelCatalog.test.ts @@ -221,9 +221,9 @@ describe('teamModelCatalog', () => { ]); }); - it('uses the OpenCode model catalog when the runtime model list is empty', () => { + it('uses the OpenCode model catalog when the runtime model list is summary-only', () => { expect( - getVisibleTeamProviderModels('opencode', [], { + getVisibleTeamProviderModels('opencode', ['opencode/big-pickle'], { providerId: 'opencode', authMethod: 'opencode_managed', backend: { kind: 'opencode-cli', label: 'OpenCode CLI' },