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

Function upstream

packages/core/test/plugin/provider-snowflake-cortex.test.ts:178–181  ·  view source on GitHub ↗
(_url, init)

Source from the content-addressed store, hash-verified

176 bun_it("rewrites max_tokens to max_completion_tokens", async () => {
177 const captured: RequestInit[] = []
178 const upstream: FetchLike = async (_url, init) => {
179 captured.push(init ?? {})
180 return new Response("{}", { status: 200 })
181 }
182 await cortexFetch(upstream)("https://test", {
183 method: "POST",
184 body: JSON.stringify({ model: "claude-sonnet-4-6", max_tokens: 1024 }),

Callers 1

cortexFetchFunction · 0.85

Calls 2

pushMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected