mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-24 22:33:37 +00:00
chore: generate
This commit is contained in:
parent
63a883a4f7
commit
03bba464d4
1 changed files with 2 additions and 8 deletions
|
|
@ -28,12 +28,7 @@ import {
|
|||
GoUsageLimitError,
|
||||
BlackUsageLimitError,
|
||||
} from "./error"
|
||||
import {
|
||||
buildCostChunk,
|
||||
createStreamPartConverter,
|
||||
createResponseConverter,
|
||||
UsageInfo,
|
||||
} from "./provider/provider"
|
||||
import { buildCostChunk, createStreamPartConverter, createResponseConverter, UsageInfo } from "./provider/provider"
|
||||
import { anthropicHelper } from "./provider/anthropic"
|
||||
import { googleHelper } from "./provider/google"
|
||||
import { openaiHelper } from "./provider/openai"
|
||||
|
|
@ -97,8 +92,7 @@ export async function handler(
|
|||
const body = input.request.body
|
||||
if (!body) throw new Error("Missing request body")
|
||||
requestBody = opts.format === "google" ? undefined : await prepareRequestBody(body)
|
||||
const model =
|
||||
opts.format === "google" ? opts.parseModel(url, undefined) : (requestBody?.model ?? "")
|
||||
const model = opts.format === "google" ? opts.parseModel(url, undefined) : (requestBody?.model ?? "")
|
||||
const googleStream = opts.format === "google" ? opts.parseIsStream(url, undefined) : undefined
|
||||
const rawIp = input.request.headers.get("x-real-ip") ?? ""
|
||||
const ip = rawIp.includes(":") ? rawIp.split(":").slice(0, 4).join(":") : rawIp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue