11import {
2- ProviderDriverKind ,
32 type ModelCapabilities ,
43 type OpenCodeSettings ,
54 type ServerProviderModel ,
@@ -25,7 +24,6 @@ import {
2524} from "../opencodeRuntime.ts" ;
2625import type { Agent , ProviderListResponse } from "@opencode-ai/sdk/v2" ;
2726
28- const PROVIDER = ProviderDriverKind . make ( "opencode" ) ;
2927const OPENCODE_PRESENTATION = {
3028 displayName : "OpenCode" ,
3129 showInteractionModeToggle : false ,
@@ -259,7 +257,6 @@ export const makePendingOpenCodeProvider = (
259257 const checkedAt = yield * Effect . map ( DateTime . now , DateTime . formatIso ) ;
260258 const models = providerModelsFromSettings (
261259 [ ] ,
262- PROVIDER ,
263260 openCodeSettings . customModels ,
264261 DEFAULT_OPENCODE_MODEL_CAPABILITIES ,
265262 ) ;
@@ -319,12 +316,7 @@ export const checkOpenCodeProviderStatus = Effect.fn("checkOpenCodeProviderStatu
319316 presentation : OPENCODE_PRESENTATION ,
320317 enabled : openCodeSettings . enabled ,
321318 checkedAt,
322- models : providerModelsFromSettings (
323- [ ] ,
324- PROVIDER ,
325- customModels ,
326- DEFAULT_OPENCODE_MODEL_CAPABILITIES ,
327- ) ,
319+ models : providerModelsFromSettings ( [ ] , customModels , DEFAULT_OPENCODE_MODEL_CAPABILITIES ) ,
328320 probe : {
329321 installed : failure . installed ,
330322 version,
@@ -340,12 +332,7 @@ export const checkOpenCodeProviderStatus = Effect.fn("checkOpenCodeProviderStatu
340332 presentation : OPENCODE_PRESENTATION ,
341333 enabled : false ,
342334 checkedAt,
343- models : providerModelsFromSettings (
344- [ ] ,
345- PROVIDER ,
346- customModels ,
347- DEFAULT_OPENCODE_MODEL_CAPABILITIES ,
348- ) ,
335+ models : providerModelsFromSettings ( [ ] , customModels , DEFAULT_OPENCODE_MODEL_CAPABILITIES ) ,
349336 probe : {
350337 installed : false ,
351338 version : null ,
@@ -391,12 +378,7 @@ export const checkOpenCodeProviderStatus = Effect.fn("checkOpenCodeProviderStatu
391378 presentation : OPENCODE_PRESENTATION ,
392379 enabled : openCodeSettings . enabled ,
393380 checkedAt,
394- models : providerModelsFromSettings (
395- [ ] ,
396- PROVIDER ,
397- customModels ,
398- DEFAULT_OPENCODE_MODEL_CAPABILITIES ,
399- ) ,
381+ models : providerModelsFromSettings ( [ ] , customModels , DEFAULT_OPENCODE_MODEL_CAPABILITIES ) ,
400382 probe : {
401383 installed : true ,
402384 version,
@@ -444,7 +426,6 @@ export const checkOpenCodeProviderStatus = Effect.fn("checkOpenCodeProviderStatu
444426
445427 const models = providerModelsFromSettings (
446428 flattenOpenCodeModels ( inventoryExit . value ) ,
447- PROVIDER ,
448429 customModels ,
449430 DEFAULT_OPENCODE_MODEL_CAPABILITIES ,
450431 ) ;
0 commit comments