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

Function providerFetch

packages/opencode/src/session/llm/native-runtime.ts:148–153  ·  view source on GitHub ↗
(input: Pick<StreamInput, "provider" | "auth">)

Source from the content-addressed store, hash-verified

146}
147
148function providerFetch(input: Pick<StreamInput, "provider" | "auth">): typeof globalThis.fetch | undefined {
149 if (input.provider.id !== "openai" || input.auth?.type !== "oauth") return undefined
150 const value: unknown = input.provider.options.fetch
151 if (typeof value !== "function") return undefined
152 return value as typeof globalThis.fetch
153}
154
155function providerHeaders(value: unknown): Record<string, string> | undefined {
156 if (!isRecord(value)) return undefined

Callers 2

statusFunction · 0.85
streamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected