Buckets:
| import { ModelV2 } from "@opencode-ai/core/model" | |
| import { Location } from "@opencode-ai/core/location" | |
| import { Schema } from "effect" | |
| import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi" | |
| import { ServiceUnavailableError } from "../errors" | |
| import { LocationQuery, locationQueryOpenApi, LocationMiddleware } from "./location" | |
| export const ModelGroup = HttpApiGroup.make("server.model") | |
| .add( | |
| HttpApiEndpoint.get("model.list", "/api/model", { | |
| query: LocationQuery, | |
| success: Location.response(Schema.Array(ModelV2.Info)), | |
| error: ServiceUnavailableError, | |
| }) | |
| .annotateMerge(locationQueryOpenApi) | |
| .annotateMerge( | |
| OpenApi.annotations({ | |
| identifier: "v2.model.list", | |
| summary: "List models", | |
| description: "Retrieve available models ordered by release date.", | |
| }), | |
| ), | |
| ) | |
| .annotateMerge( | |
| OpenApi.annotations({ | |
| title: "models", | |
| description: "Experimental model routes.", | |
| }), | |
| ) | |
| .middleware(LocationMiddleware) | |
Xet Storage Details
- Size:
- 1.04 kB
- Xet hash:
- 6c6c0e7871677ab77e886a99de9d9131d359fdd7c4a480b04dd4f1af16c5bd67
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.