mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-05-05 09:46:30 +00:00
Introduce runtime-configurable payload mutation/filter rules with file reload support and a settings API so upstream request bodies can be customized per model and protocol without restarts. Expand search support with Google PSE, Linkup, SearchAPI, and SearXNG, including validation, routing, analytics costing, MCP schema updates, and search-type-aware provider selection. Update Pollinations to support anonymous access, endpoint failover, and the latest public model lineup. Add OmniRoute response metadata headers/SSE comments, per-connection model exclusion rules, combo tag-based routing, buffered spend writes, and scheduled daily/weekly/monthly budget resets. Update model catalog and dashboard UIs to surface source labels and hide models excluded by all active connections.
49 lines
1.9 KiB
TypeScript
49 lines
1.9 KiB
TypeScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
|
|
import { getModelsByProviderId } from "../../open-sse/config/providerModels.ts";
|
|
import { resolveCanonicalProviderModel } from "../../open-sse/services/model.ts";
|
|
|
|
test("Pollinations catalog mirrors the current public text model lineup", () => {
|
|
const models = getModelsByProviderId("pollinations");
|
|
const ids = new Set(models.map((model) => model.id));
|
|
const names = models.map((model) => model.name);
|
|
|
|
assert.ok(ids.has("openai-fast"));
|
|
assert.ok(ids.has("openai-large"));
|
|
assert.ok(ids.has("perplexity-fast"));
|
|
assert.ok(ids.has("qwen-coder-large"));
|
|
assert.ok(ids.has("claude-large"));
|
|
assert.equal(ids.has("llama"), false);
|
|
assert.equal(
|
|
names.some((name) => /GPT-5 via Pollinations/i.test(name)),
|
|
false
|
|
);
|
|
});
|
|
|
|
test("Puter catalog exposes the currently documented Sonar models", () => {
|
|
const ids = new Set(getModelsByProviderId("puter").map((model) => model.id));
|
|
|
|
assert.ok(ids.has("perplexity/sonar"));
|
|
assert.ok(ids.has("perplexity/sonar-pro"));
|
|
assert.ok(ids.has("perplexity/sonar-pro-search"));
|
|
assert.ok(ids.has("perplexity/sonar-reasoning-pro"));
|
|
assert.ok(ids.has("perplexity/sonar-deep-research"));
|
|
});
|
|
|
|
test("NVIDIA catalog includes the verified 2026 additions and GPT OSS 20B alias resolution", () => {
|
|
const ids = new Set(getModelsByProviderId("nvidia").map((model) => model.id));
|
|
|
|
assert.ok(ids.has("openai/gpt-oss-20b"));
|
|
assert.ok(ids.has("nvidia/llama-3.1-nemotron-ultra-253b-v1"));
|
|
assert.ok(ids.has("nvidia/nemotron-3-super-120b-a12b"));
|
|
assert.ok(ids.has("nvidia/llama-3.3-nemotron-super-49b-v1.5"));
|
|
assert.ok(ids.has("mistralai/mistral-large-3-675b-instruct-2512"));
|
|
assert.ok(ids.has("qwen/qwen3-coder-480b-a35b-instruct"));
|
|
assert.ok(ids.has("mistralai/devstral-2-123b-instruct-2512"));
|
|
|
|
assert.deepEqual(resolveCanonicalProviderModel("nvidia", "gpt-oss-20b"), {
|
|
provider: "nvidia",
|
|
model: "openai/gpt-oss-20b",
|
|
});
|
|
});
|