MCPcopy Index your code
hub / github.com/anomalyco/opencode / resolveModelInfo

Function resolveModelInfo

packages/opencode/src/cli/cmd/run/runtime.boot.ts:178–184  ·  view source on GitHub ↗
(
  sdk: RunInput["sdk"],
  directory: string,
  model: RunInput["model"],
)

Source from the content-addressed store, hash-verified

176
177// Fetches available variants and context limits for every provider/model pair.
178export async function resolveModelInfo(
179 sdk: RunInput["sdk"],
180 directory: string,
181 model: RunInput["model"],
182): Promise<ModelInfo> {
183 return runtime.runPromise((svc) => svc.resolveModelInfo(sdk, directory, model)).catch(() => emptyModelInfo())
184}
185
186// Fetches session messages to determine if this is the first turn and build prompt history.
187export async function resolveSessionInfo(

Callers 2

runInteractiveRuntimeFunction · 0.90

Calls 1

emptyModelInfoFunction · 0.85

Tested by

no test coverage detected