(_url, init)
| 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 }), |
no test coverage detected