refactor(provider): share model status schema (#26595)
Co-authored-by: Developer <temp@example.com>
This commit is contained in:
parent
00c3248295
commit
6849f96825
6 changed files with 78 additions and 4 deletions
|
|
@ -8,6 +8,7 @@ import { Flock } from "@opencode-ai/core/util/flock"
|
|||
import { Hash } from "@opencode-ai/core/util/hash"
|
||||
import { AppFileSystem } from "@opencode-ai/core/filesystem"
|
||||
import { withTransientReadRetry } from "@/util/effect-http-client"
|
||||
import { CatalogModelStatus } from "./model-status"
|
||||
|
||||
const Cost = Schema.Struct({
|
||||
input: Schema.Finite,
|
||||
|
|
@ -71,7 +72,7 @@ export const Model = Schema.Struct({
|
|||
),
|
||||
}),
|
||||
),
|
||||
status: Schema.optional(Schema.Literals(["alpha", "beta", "deprecated", "active"])),
|
||||
status: Schema.optional(CatalogModelStatus),
|
||||
provider: Schema.optional(
|
||||
Schema.Struct({ npm: Schema.optional(Schema.String), api: Schema.optional(Schema.String) }),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue