chore(opencode): suppress dead v1 model types
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -1386,6 +1386,7 @@ test("mode cost preserves over-200k pricing from base model", () => {
|
||||
},
|
||||
},
|
||||
},
|
||||
// @ts-expect-error dead V1 fixture uses the removed pre-normalized ModelsDev provider type.
|
||||
} as unknown as ModelsDev.Provider
|
||||
|
||||
const model = Provider.fromModelsDevProvider(provider).models["gpt-5.4-fast"]
|
||||
@@ -1415,6 +1416,7 @@ test("models.dev normalization fills required response fields", () => {
|
||||
limit: { context: 1_050_000, input: 922_000, output: 128_000 },
|
||||
},
|
||||
},
|
||||
// @ts-expect-error dead V1 fixture uses the removed pre-normalized ModelsDev provider type.
|
||||
} as unknown as ModelsDev.Provider
|
||||
|
||||
const model = Provider.fromModelsDevProvider(provider).models["gpt-5.4"]
|
||||
|
||||
Reference in New Issue
Block a user