fix(core): restore catalog status schema export

This commit is contained in:
Dax Raad 2026-07-09 14:20:36 -04:00
commit 0ac8f91ed6
3 changed files with 3 additions and 6 deletions

View file

@ -1,6 +1,5 @@
import { Schema } from "effect"
// @ts-expect-error dead V1 retains the former value-style ModelsDev status re-export.
export { CatalogModelStatus } from "@opencode-ai/core/models-dev"
export const ModelStatus = Schema.Literals(["alpha", "beta", "deprecated", "active"])

View file

@ -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")
})