refactor(provider): share model status schema (#26595)

Co-authored-by: Developer <temp@example.com>
This commit is contained in:
Kit Langton
2026-05-09 19:20:31 -04:00
committed by GitHub
parent 00c3248295
commit 6849f96825
6 changed files with 78 additions and 4 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
import { withStatics } from "@opencode-ai/core/schema"
import { ModelStatus } from "@/provider/model-status"
import { Array, Context, Effect, HashMap, Layer, Option, Order, pipe, Schema } from "effect"
import { DateTimeUtcFromMillis } from "effect/Schema"
@@ -114,7 +115,7 @@ export class Info extends Schema.Class<Info>("Model.Info")({
released: DateTimeUtcFromMillis,
}),
cost: Cost.pipe(Schema.Array),
status: Schema.Literals(["alpha", "beta", "deprecated", "active"]),
status: ModelStatus,
limit: Schema.Struct({
context: Schema.Int,
input: Schema.Int.pipe(Schema.optional),