MCPcopy Create free account
hub / github.com/anomalyco/opencode / isModelValid

Function isModelValid

packages/tui/src/context/local.tsx:64–67  ·  view source on GitHub ↗
(model: { providerID: string; modelID: string })

Source from the content-addressed store, hash-verified

62 const permission = usePermission()
63
64 function isModelValid(model: { providerID: string; modelID: string }) {
65 const provider = sync.data.provider.find((item) => item.id === model.providerID)
66 return !!provider?.models[model.modelID]
67 }
68
69 function getFirstValidModel(...modelFns: (() => { providerID: string; modelID: string } | undefined)[]) {
70 for (const modelFn of modelFns) {

Callers 6

getFirstValidModelFunction · 0.85
createModelFunction · 0.85
cycleFavoriteFunction · 0.85
setFunction · 0.85
toggleFavoriteFunction · 0.85
local.tsxFile · 0.85

Calls 1

findMethod · 0.65

Tested by

no test coverage detected