fix(core): derive models.dev reasoning variants (#34726)

This commit is contained in:
Aiden Cline
2026-07-02 00:23:46 -05:00
committed by GitHub
parent cfd35c9354
commit 140224b0fc
29 changed files with 458 additions and 120 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ export const Info = Schema.Struct({
empty: (id: ID) =>
schema.make({
id,
request: { headers: {}, body: {} },
request: { settings: {}, headers: {}, body: {} },
mode: "all",
hidden: false,
permissions: [
+1 -1
View File
@@ -94,7 +94,7 @@ export const Info = Schema.Struct({
name: modelID,
api: { id: modelID, type: "native", settings: {} },
capabilities: { tools: false, input: [], output: [] },
request: { headers: {}, body: {} },
request: { settings: {}, headers: {}, body: {} },
variants: [],
time: { released: 0 },
cost: [],
+6 -2
View File
@@ -1,6 +1,6 @@
export * as Provider from "./provider.js"
import { Schema } from "effect"
import { Effect, Schema } from "effect"
import { optional } from "./schema.js"
import { Integration } from "./integration.js"
import { statics } from "./schema.js"
@@ -43,8 +43,12 @@ export const Api = Schema.Union([AISDK, Native])
.annotate({ identifier: "Provider.Api" })
export type Api = typeof Api.Type
export const Settings = Schema.Record(Schema.String, Schema.Unknown).annotate({ identifier: "Provider.Settings" })
export type Settings = typeof Settings.Type
export interface Request extends Schema.Schema.Type<typeof Request> {}
export const Request = Schema.Struct({
settings: Settings.pipe(Schema.withConstructorDefault(Effect.succeed({}))),
headers: Schema.Record(Schema.String, Schema.String),
body: Schema.Record(Schema.String, Schema.Json),
}).annotate({ identifier: "Provider.Request" })
@@ -66,7 +70,7 @@ export const Info = Schema.Struct({
id,
name: id,
api: { type: "native", settings: {} },
request: { headers: {}, body: {} },
request: { settings: {}, headers: {}, body: {} },
}),
})),
)