fix(opencode): prefer catalog for summary model lists
This commit is contained in:
parent
9289afd01e
commit
3b120e74c7
3 changed files with 5 additions and 5 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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' },
|
||||
|
|
|
|||
Loading…
Reference in a new issue