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

Function firstModel

packages/app/src/context/local.tsx:101–107  ·  view source on GitHub ↗
(...items: Array<() => ModelKey | undefined>)

Source from the content-addressed store, hash-verified

99 }
100
101 const firstModel = (...items: Array<() => ModelKey | undefined>) => {
102 for (const item of items) {
103 const model = item()
104 if (!model) continue
105 if (validModel(model)) return model
106 }
107 }
108
109 const pickAgent = (name: string | undefined) => {
110 const items = list()

Callers 1

currentFunction · 0.85

Calls 2

validModelFunction · 0.85
itemFunction · 0.50

Tested by

no test coverage detected