fix(provider): loosen models.dev reasoning options

This commit is contained in:
Aiden Cline 2026-06-30 23:22:41 -05:00
commit 6413d66aa2
4 changed files with 101 additions and 8 deletions

View file

@ -44,10 +44,7 @@ const Cost = Schema.Struct({
),
})
const ReasoningEffortValue = Schema.Union([
Schema.Null,
Schema.Literals(["none", "minimal", "low", "medium", "high", "xhigh", "max", "default"]),
])
const ReasoningEffortValue = Schema.Union([Schema.Null, Schema.String])
export const ReasoningOption = Schema.Union([
Schema.Struct({
@ -72,7 +69,9 @@ export const Model = Schema.Struct({
release_date: Schema.String,
attachment: Schema.Boolean,
reasoning: Schema.Boolean,
reasoning_options: Schema.optional(Schema.Array(ReasoningOption)),
// models.dev is external metadata and reasoning controls are expected to evolve.
// Keep the fetched value opaque here; provider normalization extracts the known subset.
reasoning_options: Schema.optional(Schema.Unknown),
temperature: Schema.Boolean,
tool_call: Schema.Boolean,
interleaved: Schema.optional(