Buckets:
| import { describe, expect, test } from "bun:test" | |
| import { Schema } from "effect" | |
| import { ModelV2 } from "@opencode-ai/core/model" | |
| import { ProviderV2 } from "@opencode-ai/core/provider" | |
| const decode = Schema.decodeUnknownSync(ModelV2.Ref) | |
| describe("ModelV2.Ref", () => { | |
| test("accepts a model selection without a variant", () => { | |
| expect(decode({ id: "claude-sonnet", providerID: "anthropic" })).toEqual({ | |
| id: ModelV2.ID.make("claude-sonnet"), | |
| providerID: ProviderV2.ID.make("anthropic"), | |
| }) | |
| }) | |
| test("preserves an explicit model variant", () => { | |
| expect(decode({ id: "claude-sonnet", providerID: "anthropic", variant: "high" })).toEqual({ | |
| id: ModelV2.ID.make("claude-sonnet"), | |
| providerID: ProviderV2.ID.make("anthropic"), | |
| variant: ModelV2.VariantID.make("high"), | |
| }) | |
| }) | |
| }) | |
Xet Storage Details
- Size:
- 831 Bytes
- Xet hash:
- 39d7674dd8c73fcf079e7ed22ff935cf26b922885c97bae8068e7cf45a2a88b2
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.