Files
AirCoding/packages/core/test/model.test.ts
airlongdian af3016fe27 feat(aircoding): AirCoding V2 baseline — deterministic multi-agent architecture
Forked from OpenCode v1.17.4 with multi-agent system:
- 5 agents: aircoding, scheduler, worker, architect, reviewer
- Deterministic DAG scheduling engine (coordinator_tick)
- Tool whitelists as hard enforcement
- AirCoding validation plugin
- System prompt injection for routing
- V1 requirements: C4 docs, ADR, AGENTS.md, debug-log.md
- Design documents in docs/
2026-06-13 21:41:54 +08:00

24 lines
831 B
TypeScript

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