Buckets:
| import type { APIEvent } from "@solidjs/start/server" | |
| import { handler } from "~/routes/zen/util/handler" | |
| import { parseGoogleVariant } from "~/routes/zen/util/variant" | |
| export function POST(input: APIEvent) { | |
| return handler(input, { | |
| format: "google", | |
| modelList: "full", | |
| parseApiKey: (headers: Headers) => headers.get("x-goog-api-key") ?? undefined, | |
| parseModel: (url: string, _body: any) => url.split("/").pop()?.split(":")?.[0] ?? "", | |
| parseVariant: (url: string, body: any) => parseGoogleVariant(body), | |
| parseIsStream: (url: string, _body: any) => | |
| // ie. url: https://opencode.ai/zen/v1/models/gemini-3-pro:streamGenerateContent?alt=sse' | |
| url.split("/").pop()?.split(":")?.[1]?.startsWith("streamGenerateContent") ?? false, | |
| }) | |
| } | |
Xet Storage Details
- Size:
- 768 Bytes
- Xet hash:
- 1d317a3a248ac5a15a7b03d340d14ce225560951411faabf1029878ad38d3818
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.