Model Router.Test
Path:
loom-builder-sol/src/model-router.test.tsRelative: src/model-router.test.tsSubproject: loom-builder-solCategory: dispatch-system-solLines: 44Bytes: 1,653Imports: 4Exports: 0has tests
Content Preview
- import { describe, expect, test } from "bun:test";
- import { PreFlightError } from "./preflight.js";
- import { routeModelForSpec, transientProviderErrorRegex, type ModelRoster } from "./model-router.js";
- import type { DispatchSpec } from "./types.js";
- const baseSpec: DispatchSpec = {
- id: "router-test",
- promptFile: "/tmp/prompt.md",
- targetCwd: "/tmp",
- model: { provider: "openrouter", id: "tencent/hy3-preview" },
- validation: [],
- budget: { maxToolCalls: 1, maxWallclockMs: 1000 },
- };
- con