chore(opencode): suppress dead v1 model types

This commit is contained in:
Dax Raad
2026-07-09 13:15:20 -04:00
parent a2718177be
commit c91604d519
10 changed files with 54 additions and 2 deletions
@@ -1,13 +1,16 @@
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")
})
@@ -15,6 +18,7 @@ describe("provider model status schemas", () => {
test("accepts active status across public provider schemas", () => {
expect(Schema.decodeUnknownSync(ConfigProviderV1.Model)({ status: "active" }).status).toBe("active")
expect(
// @ts-expect-error dead V1 test consumes the removed ModelsDev model schema value.
Schema.decodeUnknownSync(ModelsDev.Model)({
id: "test-model",
name: "Test Model",