Files
oh-my-pi/packages/catalog/test/model-provider-priority.test.ts
T
can1357 1b9d9d0851 refactor(catalog)!: split model catalog from pi-ai
Move bundled models, model cache/manager, thinking metadata, effort helpers,
provider descriptors/discovery, wire constants, and model identity utilities
into the new @oh-my-pi/pi-catalog package.

Update pi-ai to keep provider runtime/auth concerns, move catalog provider
metadata into CATALOG_PROVIDERS, and migrate coding-agent, agent, stats, docs,
and tests to import catalog values from pi-catalog.

Split coding-agent model registry helpers into discovery, roles, and models
config modules while preserving registry orchestration.

BREAKING CHANGE: @oh-my-pi/pi-ai no longer exports catalog subpaths such as
/models, /model-cache, /model-manager, /model-thinking, /effort,
/provider-models*, discovery helpers, and provider wire constants; use the
matching @oh-my-pi/pi-catalog subpaths instead.
2026-06-10 04:06:57 +02:00

18 lines
646 B
TypeScript

import { describe, expect, test } from "bun:test";
import { buildModelProviderPriorityRank } from "@oh-my-pi/pi-catalog/identity/priority";
describe("model provider priority", () => {
test("ranks AIML API with hosted aggregators", () => {
const rank = buildModelProviderPriorityRank();
const aimlRank = rank.get("aimlapi");
const openRouterRank = rank.get("openrouter");
const togetherRank = rank.get("together");
expect(aimlRank).toBeDefined();
expect(openRouterRank).toBeDefined();
expect(togetherRank).toBeDefined();
expect(openRouterRank!).toBeLessThan(aimlRank!);
expect(aimlRank!).toBeLessThan(togetherRank!);
});
});