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

Function providerByID

packages/opencode/test/server/httpapi-provider.test.ts:51–53  ·  view source on GitHub ↗
(input: unknown, key: "all" | "providers", id: string)

Source from the content-addressed store, hash-verified

49}
50
51function providerByID(input: unknown, key: "all" | "providers", id: string) {
52 return providerList(input, key).find((provider) => isRecord(provider) && provider.id === id)
53}
54
55function hasNonZeroModelCost(input: unknown, key: "all" | "providers", id: string) {
56 const provider = providerByID(input, key, id)

Callers 2

hasNonZeroModelCostFunction · 0.85

Calls 3

providerListFunction · 0.70
isRecordFunction · 0.70
findMethod · 0.65

Tested by

no test coverage detected