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

Function findContextLimit

packages/opencode/src/acp/usage.ts:113–119  ·  view source on GitHub ↗
(
  providers: Record<ProviderV2.ID, Provider.Info>,
  providerID: ProviderV2.ID,
  modelID: ModelV2.ID,
)

Source from the content-addressed store, hash-verified

111}
112
113export function findContextLimit(
114 providers: Record<ProviderV2.ID, Provider.Info>,
115 providerID: ProviderV2.ID,
116 modelID: ModelV2.ID,
117): number | undefined {
118 return providers[providerID]?.models[modelID]?.limit.context
119}
120
121export const contextLimitLoaderLayer = Layer.effect(
122 ContextLimitLoader,

Callers 1

usage.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected