core: expose v2 model listing API (#25821)

This commit is contained in:
Dax 2026-05-13 10:43:08 -04:00 committed by GitHub
commit 8345152319
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
138 changed files with 8188 additions and 302 deletions

View file

@ -0,0 +1,18 @@
export * as ToolOutput from "./tool-output"
import { Schema } from "effect"
export class TextContent extends Schema.Class<TextContent>("Tool.TextContent")({
type: Schema.Literal("text"),
text: Schema.String,
}) {}
export class FileContent extends Schema.Class<FileContent>("Tool.FileContent")({
type: Schema.Literal("file"),
uri: Schema.String,
mime: Schema.String,
name: Schema.String.pipe(Schema.optional),
}) {}
export const Content = Schema.Union([TextContent, FileContent]).pipe(Schema.toTaggedUnion("type"))
export const Structured = Schema.Record(Schema.String, Schema.Any)