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
commit 140224b0fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 457 additions and 119 deletions

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: [

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: [],

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: {} },
}),
})),
)