fix(core): restore catalog status schema export
This commit is contained in:
@@ -1,16 +1,13 @@
|
||||
import { describe, expect, test } from "bun:test"
|
||||
import { Schema } from "effect"
|
||||
import { ConfigProviderV1 } from "@opencode-ai/core/v1/config/provider"
|
||||
// @ts-expect-error dead V1 test retains the former value-style ModelsDev status import.
|
||||
import { CatalogModelStatus, ModelStatus } from "@/provider/model-status"
|
||||
import { ModelsDev } from "@opencode-ai/core/models-dev"
|
||||
import { Provider } from "@/provider/provider"
|
||||
|
||||
describe("provider model status schemas", () => {
|
||||
test("keeps catalog status separate from normalized provider status", () => {
|
||||
// @ts-expect-error dead V1 test treats the normalized catalog status type as a schema value.
|
||||
expect(Schema.decodeUnknownSync(CatalogModelStatus)("deprecated")).toBe("deprecated")
|
||||
// @ts-expect-error dead V1 test treats the normalized catalog status type as a schema value.
|
||||
expect(() => Schema.decodeUnknownSync(CatalogModelStatus)("active")).toThrow()
|
||||
expect(Schema.decodeUnknownSync(ModelStatus)("active")).toBe("active")
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user