mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-11-18 07:58:27 +00:00
chore: remarge onto origin/release/v3.8.52
Keep origin unreported-quota filter in buildProviderHealth after #16546. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
This commit is contained in:
13
.env.example
13
.env.example
@@ -718,6 +718,13 @@ ALLOW_API_KEY_REVEAL=false
|
||||
# Default: false
|
||||
# OMNIROUTE_PREFER_CLAUDE_CODE_FOR_UNPREFIXED_CLAUDE_MODELS=false
|
||||
|
||||
# Legacy resolveBareModelToConnectionDefault behaviour (#4825): replace ANY bare
|
||||
# model name (not only "auto"/empty) with the selected connection's defaultModel.
|
||||
# Off by default: a concrete bare name such as claude-haiku-4-5 is kept.
|
||||
# Used by: open-sse/services/model.ts.
|
||||
# Default: false
|
||||
# BARE_MODEL_DEFAULT_OVERRIDE_LEGACY=false
|
||||
|
||||
# Per-model concurrency cap for round-robin combos (#9100).
|
||||
# Used by: open-sse/services/comboConfig.ts — the round-robin combo semaphore
|
||||
# was hard-capped at 3 concurrent requests per model with no override, which
|
||||
@@ -885,6 +892,12 @@ NEXT_PUBLIC_CLOUD_URL=
|
||||
#OPENCODE_CLIENT=desktop
|
||||
#OPENCODE_PROJECT=global
|
||||
|
||||
# Forward client app-attribution headers (x-session-id / x-title / http-referer) to
|
||||
# upstream providers, so requests keep their app identity through the router
|
||||
# (OpenRouter publisher gates key on them). ON by default; operator custom headers
|
||||
# always win. Set to 0/false/no/off to keep the operator identity instead.
|
||||
#OMNIROUTE_FORWARD_ATTRIBUTION=1
|
||||
|
||||
# Keyless OpenCode models are answered only when the request declares a non-empty tool
|
||||
# list, and the upstream inspects which names it carries. OmniRoute reuses the list a
|
||||
# request of the same conversation was last seen getting through, so a request that
|
||||
|
||||
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -1066,7 +1066,7 @@ jobs:
|
||||
- name: Upload test results to Trunk (advisory)
|
||||
if: ${{ always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
|
||||
continue-on-error: true
|
||||
uses: trunk-io/analytics-uploader@14c0f18990953eecd01c9c5afe3cc63a73b6c371 # v2.1.5
|
||||
uses: trunk-io/analytics-uploader@a86313c7029d22e6ea2d5c346060a224d90053dc # v2.1.6
|
||||
with:
|
||||
junit-paths: trunk-junit/**/*.xml
|
||||
org-slug: omniroute
|
||||
@@ -1399,7 +1399,7 @@ jobs:
|
||||
- name: Upload test results to Trunk (advisory)
|
||||
if: ${{ always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
|
||||
continue-on-error: true
|
||||
uses: trunk-io/analytics-uploader@14c0f18990953eecd01c9c5afe3cc63a73b6c371 # v2.1.5
|
||||
uses: trunk-io/analytics-uploader@a86313c7029d22e6ea2d5c346060a224d90053dc # v2.1.6
|
||||
with:
|
||||
junit-paths: junit-e2e-results.xml
|
||||
org-slug: omniroute
|
||||
|
||||
2
.github/workflows/quality.yml
vendored
2
.github/workflows/quality.yml
vendored
@@ -412,7 +412,7 @@ jobs:
|
||||
- name: Upload test results to Trunk (advisory)
|
||||
if: ${{ always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
|
||||
continue-on-error: true
|
||||
uses: trunk-io/analytics-uploader@14c0f18990953eecd01c9c5afe3cc63a73b6c371 # v2.1.5
|
||||
uses: trunk-io/analytics-uploader@a86313c7029d22e6ea2d5c346060a224d90053dc # v2.1.6
|
||||
with:
|
||||
junit-paths: trunk-junit/**/*.xml
|
||||
org-slug: omniroute
|
||||
|
||||
@@ -95,35 +95,37 @@ active. When a gateway rejects that fallback, the catalog still
|
||||
publishes — but with raw model ids instead of display names, no canonical
|
||||
alias dedupe, no pricing and no combos. The plugin warns once per endpoint
|
||||
when this happens, naming the endpoint and the consequence, so the degraded
|
||||
catalog is never a mystery.
|
||||
catalog is never a mystery. Environment variables must reach the opencode
|
||||
server process: when the host runs as a service, export the key where the
|
||||
server reads it, not only in the shell that runs `opencode models`.
|
||||
|
||||
## Options
|
||||
|
||||
| Key | Default | Notes |
|
||||
| --------------------------------------- | ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `providerId` | `"omniroute"` | Provider id and integration id; models publish under `<providerId>/…` |
|
||||
| `baseURL` | required | OmniRoute gateway root (no `/v1` suffix needed) |
|
||||
| `apiKey` | connected credential, then `OMNIROUTE_API_KEY` | Chat key for `/v1/*` — see [Credentials](#credentials) |
|
||||
| `managementReadToken` | option, then `OMNIROUTE_MANAGEMENT_API_KEY`, then `apiKey` | Management key for `/api/*` (combos, providers, enrichment) — usually **not** the same key |
|
||||
| `displayName` | `"OmniRoute"` | Provider display name |
|
||||
| `timeoutMs` | `10000` | Per-endpoint fetch timeout |
|
||||
| `modelCacheTtlMs` | `300000` | Catalog cache TTL; disk snapshot warms cold starts |
|
||||
| `timeouts` | per-endpoint override | `{ models, combos, enrichment }` in ms; falls back to `timeoutMs` (`autoCombos` still parses but is ignored — the virtual-entries route is no longer requested) |
|
||||
| `enrichment` | `true` | Fetch names + pricing (`/api/pricing*`, `/api/free-tier/summary`) |
|
||||
| `providerTag` | `true` | Prefix a display name with the upstream provider it routes to |
|
||||
| `geminiSanitization` | `true` | Strip `$schema`/`additionalProperties` from tool schemas sent to Gemini models (`$ref` tools are forwarded untouched) |
|
||||
| `usableOnly` | `false` | Filter to healthy provisioned providers (`/api/providers`) |
|
||||
| `freeOnly` / `toolsOnly` / `visionOnly` | `false` / `false` / `false` | Filter to free-tier / tool-calling / image-input models; combos with a filtered member are dropped, never partial |
|
||||
| `showcasePerOwner` | `10` | Default-view entries kept per provider |
|
||||
| `freshPerOwner` | `10` | Default-view fresh entries kept per provider |
|
||||
| `freshWindowDays` | `90` | Freshness window in days for the fresh branch |
|
||||
| `usageMemory` | `true` | Restore statically dropped entries named by 30-day usage analytics (needs a management token; inert without one) |
|
||||
| `visibleModels` / `hiddenModels` | `[]` | Exact-or-suffix allowlists, deny wins |
|
||||
| `providersAllow` | `[]` | Provider allowlist by id prefix (empty = full catalog); unknown names warn once, empty result publishes empty + warns. Unknown catalog prefixes always pass, and an allowlist or vocabulary that names nothing known keeps the full catalog + warns |
|
||||
| `apiFormat.allowAnthropic` | `false` | Route allowlisted ids to the Anthropic API block |
|
||||
| `apiFormat.anthropicModels` | `[]` | Full model ids routed to Anthropic |
|
||||
| `apiFormat.anthropicPrefixes` | v1 defaults | Deprecated, warns once — prefer `anthropicModels` |
|
||||
| `logLevel` / `startupDebug` | `warn` / `false` | Logger verbosity |
|
||||
| Key | Default | Notes |
|
||||
| --------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `providerId` | `"omniroute"` | Provider id and integration id; models publish under `<providerId>/…` |
|
||||
| `baseURL` | required | OmniRoute gateway root (no `/v1` suffix needed) |
|
||||
| `apiKey` | connected credential, then `OMNIROUTE_API_KEY` | Chat key for `/v1/*` — see [Credentials](#credentials) |
|
||||
| `managementReadToken` | option, then `OMNIROUTE_MANAGEMENT_API_KEY`, then `apiKey` | Management key for `/api/*` (combos, providers, enrichment) — usually **not** the same key |
|
||||
| `displayName` | `"OmniRoute"` | Provider display name |
|
||||
| `timeoutMs` | `10000` | Per-endpoint fetch timeout |
|
||||
| `modelCacheTtlMs` | `300000` | Catalog cache TTL; disk snapshot warms cold starts |
|
||||
| `timeouts` | per-endpoint override | `{ models, combos, enrichment }` in ms; falls back to `timeoutMs` (`autoCombos` still parses but is ignored — the virtual-entries route is no longer requested) |
|
||||
| `enrichment` | `true` | Fetch names + pricing (`/api/pricing*`, `/api/free-tier/summary`) |
|
||||
| `providerTag` | `true` | Prefix a display name with the upstream provider it routes to |
|
||||
| `geminiSanitization` | `true` | Strip `$schema`/`additionalProperties` from tool schemas sent to Gemini models (`$ref` tools are forwarded untouched) |
|
||||
| `usableOnly` | `false` | Filter to healthy provisioned providers (`/api/providers`) |
|
||||
| `freeOnly` / `toolsOnly` / `visionOnly` | `false` / `false` / `false` | Filter to free-tier / tool-calling / image-input models; combos with a filtered member are dropped, never partial. Presets filter the pool before the default view ranks it, and a combo publishes only when every resolved member passes (dropped when a member fails or none resolves) |
|
||||
| `showcasePerOwner` | `10` | Default-view entries kept per provider |
|
||||
| `freshPerOwner` | `10` | Default-view fresh entries kept per provider |
|
||||
| `freshWindowDays` | `90` | Freshness window in days for the fresh branch |
|
||||
| `usageMemory` | `true` | Restore statically dropped entries named by 30-day usage analytics (needs a management token; inert without one) |
|
||||
| `visibleModels` / `hiddenModels` | `[]` | Exact-or-suffix allowlists, deny wins |
|
||||
| `providersAllow` | `[]` | Provider allowlist by id prefix (empty = full catalog); unknown names warn once, empty result publishes empty + warns. Unknown catalog prefixes always pass, and an allowlist or vocabulary that names nothing known keeps the full catalog + warns |
|
||||
| `apiFormat.allowAnthropic` | `false` | Route allowlisted ids to the Anthropic API block |
|
||||
| `apiFormat.anthropicModels` | `[]` | Full model ids routed to Anthropic |
|
||||
| `apiFormat.anthropicPrefixes` | v1 defaults | Deprecated, warns once — prefer `anthropicModels` |
|
||||
| `logLevel` / `startupDebug` | `warn` / `false` | Logger verbosity |
|
||||
|
||||
`toolsOnly` is off by default, so the full catalog is published. Set
|
||||
`toolsOnly: true` to hide models without tool calling from the host picker —
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import type { LegacyModel } from "./legacy-model.js";
|
||||
import type { OmniRouteEnrichmentEntry } from "./shared/enrich.js";
|
||||
import type { OmniRouteEnrichmentEntry, OmniRouteEnrichmentMap } from "./shared/enrich.js";
|
||||
import { lookupEnrichment } from "./shared/enrich.js";
|
||||
import type { OmniRouteRawCombo } from "./shared/combos-map.js";
|
||||
import type { OmniRouteRawModelEntry } from "./shared/models-map.js";
|
||||
import { isFreeOnlyFreeType } from "./shared/naming.js";
|
||||
|
||||
export interface CapabilityPresetFlags {
|
||||
freeOnly?: boolean;
|
||||
@@ -20,7 +24,7 @@ export function passesCapabilityPresets(
|
||||
enrichment: OmniRouteEnrichmentEntry | undefined,
|
||||
flags: CapabilityPresetFlags
|
||||
): boolean {
|
||||
if (flags.freeOnly === true && enrichment?.freeType === undefined) return false;
|
||||
if (flags.freeOnly === true && !isFreeOnlyFreeType(enrichment?.freeType)) return false;
|
||||
if (flags.toolsOnly === true && mapped.capabilities.toolcall !== true) return false;
|
||||
if (
|
||||
flags.visionOnly === true &&
|
||||
@@ -29,3 +33,198 @@ export function passesCapabilityPresets(
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw-entry form of the preset predicate for the ranks-before-filters
|
||||
* pool. Reads the same signals as `passesCapabilityPresets` without
|
||||
* mapping the entry first: `freeOnly` uses `isFreeOnlyFreeType` on the
|
||||
* overlay row the caller resolved, `toolsOnly` reads `capabilities.tool_calling`,
|
||||
* `visionOnly`
|
||||
* reads `capabilities.attachment ?? capabilities.vision` or an `image`
|
||||
* input modality (same `?? ["text"]` default as the mapper). Neutral
|
||||
* when no preset is on, so the default view is unchanged without one.
|
||||
*/
|
||||
export function passesRawPreset(
|
||||
raw: OmniRouteRawModelEntry,
|
||||
enrichment: OmniRouteEnrichmentEntry | undefined,
|
||||
flags: CapabilityPresetFlags
|
||||
): boolean {
|
||||
if (flags.freeOnly === true && !isFreeOnlyFreeType(enrichment?.freeType)) return false;
|
||||
if (flags.toolsOnly === true && Boolean(raw.capabilities?.tool_calling ?? false) !== true)
|
||||
return false;
|
||||
if (
|
||||
flags.visionOnly === true &&
|
||||
!(
|
||||
Boolean(raw.capabilities?.attachment ?? raw.capabilities?.vision ?? false) ||
|
||||
new Set(raw.input_modalities ?? ["text"]).has("image")
|
||||
)
|
||||
)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/** True when any preset subtracts: the pool narrows, combos resolve per member. */
|
||||
export function presetsActive(flags: CapabilityPresetFlags): boolean {
|
||||
return flags.freeOnly === true || flags.toolsOnly === true || flags.visionOnly === true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Narrow a raw pool to the entries that pass the presets. The showcase
|
||||
* and the recent picks rank this narrowed pool instead of ranking
|
||||
* everything and letting the preset empty the pick. Neutral when no
|
||||
* preset is on, so the default view is unchanged without one.
|
||||
*/
|
||||
export function filterRawPoolByPreset(
|
||||
entries: readonly OmniRouteRawModelEntry[],
|
||||
enrichment: OmniRouteEnrichmentMap | undefined,
|
||||
canonicalToAlias: Map<string, string>,
|
||||
flags: CapabilityPresetFlags
|
||||
): OmniRouteRawModelEntry[] {
|
||||
if (!presetsActive(flags)) return [...entries];
|
||||
return entries.filter(
|
||||
(entry) =>
|
||||
entry.id &&
|
||||
passesRawPreset(entry, lookupEnrichment(entry.id, enrichment, canonicalToAlias), flags)
|
||||
);
|
||||
}
|
||||
|
||||
interface ComboPresetStep {
|
||||
memberEntries: OmniRouteRawModelEntry[];
|
||||
deferred: boolean;
|
||||
failsPreset: boolean;
|
||||
countable: boolean;
|
||||
}
|
||||
|
||||
function readComboStepField(step: unknown, key: "kind" | "comboName" | "model"): unknown {
|
||||
return (step as Record<string, unknown> | null | undefined)?.[key];
|
||||
}
|
||||
|
||||
/**
|
||||
* Fold one combo step list into member entries plus the preset verdict.
|
||||
* A `combo-ref` step reads the child verdict from `presetByName` (kept
|
||||
* for dropped combos too): a ref to an unknown name stays deferred, a
|
||||
* ref to a dropped combo fails. Never looks up an enrichment row for
|
||||
* the synthesized `combo-ref:<name>` id (there is none). An unknown
|
||||
* model id fails under an active preset, stays neutral without one.
|
||||
*/
|
||||
export function foldComboPresetSteps(
|
||||
combo: OmniRouteRawCombo,
|
||||
rawModelById: ReadonlyMap<string, OmniRouteRawModelEntry>,
|
||||
resolvedByName: ReadonlyMap<string, LegacyModel>,
|
||||
presetByName: ReadonlyMap<string, boolean>,
|
||||
enrichment: OmniRouteEnrichmentMap | undefined,
|
||||
canonicalToAlias: Map<string, string>,
|
||||
flags: CapabilityPresetFlags
|
||||
): ComboPresetStep {
|
||||
const memberEntries: OmniRouteRawModelEntry[] = [];
|
||||
const active = presetsActive(flags);
|
||||
let deferred = false;
|
||||
let failsPreset = false;
|
||||
let countable = false;
|
||||
const memberSteps = Array.isArray(combo.models) ? combo.models : [];
|
||||
for (const step of memberSteps) {
|
||||
const kind = readComboStepField(step, "kind");
|
||||
if (kind === "combo-ref") {
|
||||
const comboName = readComboStepField(step, "comboName");
|
||||
if (typeof comboName !== "string" || comboName.length === 0) continue;
|
||||
if (active && presetByName.get(comboName) === false) {
|
||||
failsPreset = true;
|
||||
break;
|
||||
}
|
||||
const nested = resolvedByName.get(comboName);
|
||||
if (!nested) {
|
||||
deferred = true;
|
||||
break;
|
||||
}
|
||||
if (active) countable = true;
|
||||
memberEntries.push(synthesizeNestedMember(comboName, nested));
|
||||
continue;
|
||||
}
|
||||
const modelId = readComboStepField(step, "model");
|
||||
if (typeof modelId !== "string" || modelId.length === 0) continue;
|
||||
const member = rawModelById.get(modelId);
|
||||
if (!member) {
|
||||
if (active) failsPreset = true;
|
||||
continue;
|
||||
}
|
||||
if (active) {
|
||||
countable = true;
|
||||
if (
|
||||
!passesRawPreset(member, lookupEnrichment(member.id, enrichment, canonicalToAlias), flags)
|
||||
) {
|
||||
failsPreset = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
memberEntries.push(member);
|
||||
}
|
||||
return { memberEntries, deferred, failsPreset, countable };
|
||||
}
|
||||
|
||||
/**
|
||||
* Record the preset verdict of a resolved combo (published or dropped)
|
||||
* under its lookup name: `name` trimmed, else `id`. Under an active
|
||||
* preset a combo with no countable member never passes, so it is
|
||||
* dropped, never partial.
|
||||
*/
|
||||
export function recordComboPresetVerdict(
|
||||
presetByName: Map<string, boolean>,
|
||||
combo: OmniRouteRawCombo,
|
||||
failsPreset: boolean,
|
||||
countable: boolean,
|
||||
flags: CapabilityPresetFlags
|
||||
): boolean {
|
||||
const comboName =
|
||||
typeof combo.name === "string" && combo.name.trim().length > 0 ? combo.name.trim() : combo.id;
|
||||
const passes = !presetsActive(flags) || (failsPreset !== true && countable);
|
||||
presetByName.set(comboName, passes);
|
||||
return passes;
|
||||
}
|
||||
|
||||
/** Lookup name of a combo: `name` trimmed, else `id`. */
|
||||
export function comboLookupName(combo: OmniRouteRawCombo): string {
|
||||
return typeof combo.name === "string" && combo.name.trim().length > 0
|
||||
? combo.name.trim()
|
||||
: combo.id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Synthesize a raw-model entry from an already-resolved nested combo so a
|
||||
* parent combo's LCD folds the whole nested capability vector (context,
|
||||
* output, modalities, capabilities) instead of only direct raw members.
|
||||
* v1 parity (combo member synthesis at nested resolution time).
|
||||
*/
|
||||
export function synthesizeNestedMember(name: string, nested: LegacyModel): OmniRouteRawModelEntry {
|
||||
const inputModalities: string[] = [];
|
||||
if (nested.capabilities.input.text) inputModalities.push("text");
|
||||
if (nested.capabilities.input.audio) inputModalities.push("audio");
|
||||
if (nested.capabilities.input.image) inputModalities.push("image");
|
||||
if (nested.capabilities.input.video) inputModalities.push("video");
|
||||
if (nested.capabilities.input.pdf) inputModalities.push("pdf");
|
||||
const outputModalities: string[] = [];
|
||||
if (nested.capabilities.output.text) outputModalities.push("text");
|
||||
if (nested.capabilities.output.audio) outputModalities.push("audio");
|
||||
if (nested.capabilities.output.image) outputModalities.push("image");
|
||||
if (nested.capabilities.output.video) outputModalities.push("video");
|
||||
if (nested.capabilities.output.pdf) outputModalities.push("pdf");
|
||||
return {
|
||||
id: `combo-ref:${name}`,
|
||||
context_length: nested.limit.context,
|
||||
max_output_tokens: nested.limit.output,
|
||||
...(nested.limit.input !== undefined ? { max_input_tokens: nested.limit.input } : {}),
|
||||
owned_by: "combo",
|
||||
input_modalities: inputModalities,
|
||||
output_modalities: outputModalities,
|
||||
capabilities: {
|
||||
temperature: nested.capabilities.temperature,
|
||||
// A raw entry carries plain flags; the mapped model widens them to
|
||||
// `boolean | { field }` (custom reasoning/thinking field). Every
|
||||
// non-false form means the capability is present, which is all the
|
||||
// LCD fold reads.
|
||||
reasoning: nested.capabilities.reasoning !== false,
|
||||
thinking: nested.capabilities.interleaved !== false,
|
||||
attachment: nested.capabilities.attachment,
|
||||
tool_calling: nested.capabilities.toolcall,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,17 +1,22 @@
|
||||
import type { Model, Provider } from "@opencode/plugin";
|
||||
import {
|
||||
buildProviderResolve,
|
||||
compileProviderFilter,
|
||||
filterAllUnknown,
|
||||
passesProviderCombo,
|
||||
passesProviderFilter,
|
||||
warnNoVocabulary,
|
||||
warnUnknownProviders,
|
||||
resolveProviderFilter,
|
||||
warnProviderMatchedNothing,
|
||||
type ProviderFilter,
|
||||
type ProviderResolve,
|
||||
} from "./provider-filter.js";
|
||||
import type { LegacyModel } from "./legacy-model.js";
|
||||
import { type CapabilityPresetFlags, passesCapabilityPresets } from "./capability-presets.js";
|
||||
import {
|
||||
comboLookupName,
|
||||
filterRawPoolByPreset,
|
||||
foldComboPresetSteps,
|
||||
presetsActive,
|
||||
recordComboPresetVerdict,
|
||||
type CapabilityPresetFlags,
|
||||
passesCapabilityPresets,
|
||||
} from "./capability-presets.js";
|
||||
import {
|
||||
isHttpUrl,
|
||||
type ApiFormatV2,
|
||||
@@ -28,6 +33,7 @@ import {
|
||||
applyEnrichment,
|
||||
buildCanonicalToAliasMap,
|
||||
canonicalDedupSet,
|
||||
countFreeTierMatch,
|
||||
createLogger,
|
||||
defaultOmniRouteEnrichmentFetcher,
|
||||
defaultOmniRouteProvidersFetcher,
|
||||
@@ -428,54 +434,6 @@ export function legacyApiToInfoApi(api: LegacyModel["api"]): {
|
||||
return { id: api.id, type: "aisdk", package: api.npm, url: api.url };
|
||||
}
|
||||
|
||||
function legacyCostToInfoCost(cost: LegacyModel["cost"]): StableModelInfo["cost"] {
|
||||
const c = [{ input: cost.input, output: cost.output, cache: cost.cache }];
|
||||
return c as unknown as StableModelInfo["cost"];
|
||||
}
|
||||
|
||||
function legacyCapabilitiesToInfoCapabilities(
|
||||
caps: LegacyModel["capabilities"]
|
||||
): StableModelInfo["capabilities"] {
|
||||
const input: string[] = [];
|
||||
if (caps.input.text) input.push("text");
|
||||
if (caps.input.audio) input.push("audio");
|
||||
if (caps.input.image) input.push("image");
|
||||
if (caps.input.video) input.push("video");
|
||||
if (caps.input.pdf) input.push("pdf");
|
||||
const output: string[] = [];
|
||||
if (caps.output.text) output.push("text");
|
||||
if (caps.output.audio) output.push("audio");
|
||||
if (caps.output.image) output.push("image");
|
||||
if (caps.output.video) output.push("video");
|
||||
if (caps.output.pdf) output.push("pdf");
|
||||
return { tools: caps.toolcall, input, output };
|
||||
}
|
||||
|
||||
function legacyToInfo(providerID: string, modelID: string, m: LegacyModel): StableModelInfo {
|
||||
const variants = Object.entries(m.variants ?? {}).map(([id, body]) => ({
|
||||
id,
|
||||
headers: {},
|
||||
body: body as Record<string, unknown>,
|
||||
}));
|
||||
const parsed = Date.parse(m.release_date);
|
||||
const out = {
|
||||
id: modelID,
|
||||
modelID,
|
||||
providerID,
|
||||
...(m.family !== undefined ? { family: m.family } : {}),
|
||||
name: m.name,
|
||||
capabilities: legacyCapabilitiesToInfoCapabilities(m.capabilities),
|
||||
headers: { ...m.headers },
|
||||
variants,
|
||||
time: { released: Number.isNaN(parsed) ? 0 : parsed },
|
||||
cost: legacyCostToInfoCost(m.cost),
|
||||
status: m.status,
|
||||
enabled: true,
|
||||
limit: { ...m.limit },
|
||||
};
|
||||
return out as unknown as StableModelInfo;
|
||||
}
|
||||
|
||||
export interface PublishCounts {
|
||||
models: number;
|
||||
combos: number;
|
||||
@@ -563,19 +521,6 @@ export function assignProviderFields(
|
||||
}
|
||||
|
||||
/** A widened capability flag (`boolean | { field }`) read back as a plain flag. */
|
||||
function isCapabilityEnabled(value: boolean | { field: string }): boolean {
|
||||
return value !== false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Combo steps reach us from the gateway with a shape the SDK types do not
|
||||
* describe (`kind`, `comboName`, `model` appear per step kind). One reader
|
||||
* keeps that single untyped boundary in one place instead of scattering casts.
|
||||
*/
|
||||
function readStepField(step: unknown, key: "kind" | "comboName" | "model"): unknown {
|
||||
return (step as Record<string, unknown> | null | undefined)?.[key];
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve the display-name + pricing overlay. A caller may hand over a
|
||||
* ready-made map (tests, pre-resolved overlays) or turn the fetch off; a
|
||||
@@ -734,32 +679,26 @@ async function publishCombos(
|
||||
return true;
|
||||
});
|
||||
const resolvedByName = new Map<string, LegacyModel>();
|
||||
const presetByName = new Map<string, boolean>();
|
||||
const activeFlags: CapabilityPresetFlags = {
|
||||
freeOnly: opts.freeOnly,
|
||||
toolsOnly: opts.toolsOnly,
|
||||
visionOnly: opts.visionOnly,
|
||||
};
|
||||
let unresolved: typeof pending = [];
|
||||
|
||||
for (let pass = 0; pass < MAX_COMBO_PASSES && pending.length > 0; pass++) {
|
||||
const stillPending: typeof pending = [];
|
||||
for (const combo of pending) {
|
||||
const memberSteps = Array.isArray(combo.models) ? combo.models : [];
|
||||
const memberEntries: OmniRouteRawModelEntry[] = [];
|
||||
let deferred = false;
|
||||
for (const step of memberSteps) {
|
||||
const kind = readStepField(step, "kind");
|
||||
if (kind === "combo-ref") {
|
||||
const comboName = readStepField(step, "comboName");
|
||||
if (typeof comboName !== "string" || comboName.length === 0) continue;
|
||||
const nested = resolvedByName.get(comboName);
|
||||
if (!nested) {
|
||||
deferred = true;
|
||||
break;
|
||||
}
|
||||
memberEntries.push(synthesizeNestedMember(comboName, nested));
|
||||
continue;
|
||||
}
|
||||
const modelId = readStepField(step, "model");
|
||||
if (typeof modelId !== "string" || modelId.length === 0) continue;
|
||||
const member = rawModelById.get(modelId);
|
||||
if (member) memberEntries.push(member);
|
||||
}
|
||||
const { memberEntries, deferred, failsPreset, countable } = foldComboPresetSteps(
|
||||
combo,
|
||||
rawModelById,
|
||||
resolvedByName,
|
||||
presetByName,
|
||||
enrichment,
|
||||
canonicalToAlias,
|
||||
activeFlags
|
||||
);
|
||||
if (deferred) {
|
||||
stillPending.push(combo);
|
||||
continue;
|
||||
@@ -769,12 +708,22 @@ async function publishCombos(
|
||||
applyEnrichment(mapped, comboEnrichment, {
|
||||
isCombo: true,
|
||||
});
|
||||
const comboName = comboLookupName(combo);
|
||||
const passesMembers = recordComboPresetVerdict(
|
||||
presetByName,
|
||||
combo,
|
||||
failsPreset,
|
||||
countable,
|
||||
activeFlags
|
||||
);
|
||||
if (
|
||||
!passesCapabilityPresets(mapped, comboEnrichment, {
|
||||
freeOnly: opts.freeOnly,
|
||||
toolsOnly: opts.toolsOnly,
|
||||
visionOnly: opts.visionOnly,
|
||||
} satisfies CapabilityPresetFlags)
|
||||
presetsActive(activeFlags)
|
||||
? !passesMembers
|
||||
: !passesCapabilityPresets(mapped, comboEnrichment, {
|
||||
freeOnly: opts.freeOnly,
|
||||
toolsOnly: opts.toolsOnly,
|
||||
visionOnly: opts.visionOnly,
|
||||
} satisfies CapabilityPresetFlags)
|
||||
)
|
||||
continue;
|
||||
const mid = mapped.id.startsWith(X + "/") ? mapped.id.slice(X.length + 1) : mapped.id;
|
||||
@@ -806,11 +755,7 @@ async function publishCombos(
|
||||
publishedKeys.add(key);
|
||||
publishedModelIds.set(key, mapped.id);
|
||||
comboCount += 1;
|
||||
const lookupName =
|
||||
typeof combo.name === "string" && combo.name.trim().length > 0
|
||||
? combo.name.trim()
|
||||
: combo.id;
|
||||
if (!resolvedByName.has(lookupName)) resolvedByName.set(lookupName, mapped);
|
||||
if (!resolvedByName.has(comboName)) resolvedByName.set(comboName, mapped);
|
||||
}
|
||||
if (stillPending.length === pending.length) {
|
||||
unresolved = stillPending;
|
||||
@@ -829,47 +774,6 @@ async function publishCombos(
|
||||
return { published: comboCount, providerDropped };
|
||||
}
|
||||
|
||||
/**
|
||||
* Synthesize a raw-model entry from an already-resolved nested combo so a
|
||||
* parent combo's LCD folds the whole nested capability vector (context,
|
||||
* output, modalities, capabilities) instead of only direct raw members.
|
||||
* v1 parity (combo member synthesis at nested resolution time).
|
||||
*/
|
||||
function synthesizeNestedMember(name: string, nested: LegacyModel): OmniRouteRawModelEntry {
|
||||
const inputModalities: string[] = [];
|
||||
if (nested.capabilities.input.text) inputModalities.push("text");
|
||||
if (nested.capabilities.input.audio) inputModalities.push("audio");
|
||||
if (nested.capabilities.input.image) inputModalities.push("image");
|
||||
if (nested.capabilities.input.video) inputModalities.push("video");
|
||||
if (nested.capabilities.input.pdf) inputModalities.push("pdf");
|
||||
const outputModalities: string[] = [];
|
||||
if (nested.capabilities.output.text) outputModalities.push("text");
|
||||
if (nested.capabilities.output.audio) outputModalities.push("audio");
|
||||
if (nested.capabilities.output.image) outputModalities.push("image");
|
||||
if (nested.capabilities.output.video) outputModalities.push("video");
|
||||
if (nested.capabilities.output.pdf) outputModalities.push("pdf");
|
||||
return {
|
||||
id: `combo-ref:${name}`,
|
||||
context_length: nested.limit.context,
|
||||
max_output_tokens: nested.limit.output,
|
||||
...(nested.limit.input !== undefined ? { max_input_tokens: nested.limit.input } : {}),
|
||||
owned_by: "combo",
|
||||
input_modalities: inputModalities,
|
||||
output_modalities: outputModalities,
|
||||
capabilities: {
|
||||
temperature: nested.capabilities.temperature,
|
||||
// A raw entry carries plain flags; the mapped model widens them to
|
||||
// `boolean | { field }` (custom reasoning/thinking field). Every
|
||||
// non-false form means the capability is present, which is all the
|
||||
// LCD fold reads.
|
||||
reasoning: isCapabilityEnabled(nested.capabilities.reasoning),
|
||||
thinking: isCapabilityEnabled(nested.capabilities.interleaved),
|
||||
attachment: nested.capabilities.attachment,
|
||||
tool_calling: nested.capabilities.toolcall,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Collect the full catalog (models + combos) as legacy entries
|
||||
* keyed `providerId/bareId`, then project them onto the stable contract in
|
||||
@@ -919,18 +823,26 @@ export async function collectCatalog(
|
||||
// `freeOnly` reads the overlay: an empty overlay (no management token,
|
||||
// `enrichment: false`, or fetch failure) would otherwise empty the catalog
|
||||
// silently. Warn once per refresh and keep filtering (fail-closed).
|
||||
// A sparse overlay (free-tier lines that never meet a served id) warns
|
||||
// with its match ratio instead, so a short catalog names its cause.
|
||||
const {
|
||||
total: freeTotal,
|
||||
matched: freeMatched,
|
||||
unmatched: freeUnmatched,
|
||||
} = countFreeTierMatch(
|
||||
rawModels.map((e) => e.id),
|
||||
enrichment,
|
||||
canonicalToAlias
|
||||
);
|
||||
if (opts.freeOnly === true) {
|
||||
let hasFreeEntry = false;
|
||||
for (const entry of enrichment.values()) {
|
||||
if (entry.freeType !== undefined) {
|
||||
hasFreeEntry = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!hasFreeEntry) {
|
||||
if (freeTotal === 0) {
|
||||
log.warn(
|
||||
`[omniroute-v2] freeOnly is on but the enrichment overlay has no free-tier entries (no management token, enrichment disabled, or free-tier fetch failed); publishing an empty catalog. Disable freeOnly or configure the management token.`
|
||||
);
|
||||
} else if (freeUnmatched > 0) {
|
||||
log.warn(
|
||||
`[omniroute-v2] freeOnly dropped ${freeUnmatched} of ${freeTotal} free-tier lines: ${freeMatched}/${freeTotal} free-tier entries match the served catalog.`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -944,27 +856,16 @@ export async function collectCatalog(
|
||||
);
|
||||
|
||||
// Provider allowlist (same seam as the allowlists above, applied last):
|
||||
// compile once, resolve alias<->canonical once via the usable pass, then
|
||||
// one predicate per collection point. `buildCanonicalToAliasMap` returns
|
||||
// canonical->alias; the resolve table needs the inverse alias->canonical.
|
||||
// compiled once here, then one predicate per collection point.
|
||||
const warnedCombos = opts.collisionWarned ?? new Set<string>();
|
||||
const providerFilter = compileProviderFilter(opts.providersAllow);
|
||||
let providerResolve: ProviderResolve | undefined;
|
||||
let providerAllUnknown = false;
|
||||
if (providerFilter) {
|
||||
const pairs: Array<{ alias?: string; canonical?: string }> = [];
|
||||
for (const entry of enrichment.values()) {
|
||||
pairs.push({ alias: entry.providerAlias, canonical: entry.providerCanonical });
|
||||
}
|
||||
for (const [canonical, alias] of canonicalToAlias) {
|
||||
pairs.push({ alias, canonical });
|
||||
}
|
||||
providerResolve = buildProviderResolve(pairs, usable?.canonicals);
|
||||
providerAllUnknown = filterAllUnknown(providerFilter, providerResolve);
|
||||
if (providerResolve.known.size === 0)
|
||||
warnNoVocabulary(providerFilter, providerResolve.known, warnedCombos, log);
|
||||
else warnUnknownProviders(providerFilter, providerResolve.known, warnedCombos, log);
|
||||
}
|
||||
const { providerFilter, providerResolve, providerAllUnknown } = resolveProviderFilter(
|
||||
opts.providersAllow,
|
||||
enrichment,
|
||||
canonicalToAlias,
|
||||
usable?.canonicals,
|
||||
warnedCombos,
|
||||
log
|
||||
);
|
||||
|
||||
const rawModelById = new Map<string, OmniRouteRawModelEntry>();
|
||||
for (const entry of rawModels) {
|
||||
@@ -981,9 +882,17 @@ export async function collectCatalog(
|
||||
let providerDroppedCount = 0;
|
||||
// Showcase ranks the allowlisted pool so the default picker stays usable
|
||||
// without pinning plus the curated dates and pinned ids below.
|
||||
const presetFlags: CapabilityPresetFlags = {
|
||||
freeOnly: opts.freeOnly,
|
||||
toolsOnly: opts.toolsOnly,
|
||||
visionOnly: opts.visionOnly,
|
||||
};
|
||||
const presetPool = catalogAll
|
||||
? []
|
||||
: filterRawPoolByPreset(rawModels, enrichment, canonicalToAlias, presetFlags);
|
||||
const showcasePool = catalogAll
|
||||
? []
|
||||
: rawModels.filter(
|
||||
: presetPool.filter(
|
||||
(entry) =>
|
||||
entry.id &&
|
||||
!canonicalDedup.has(entry.id) &&
|
||||
@@ -1001,13 +910,19 @@ export async function collectCatalog(
|
||||
const freshKept = catalogAll
|
||||
? new Set<string>()
|
||||
: selectFreshKeptIds(
|
||||
rawModels,
|
||||
presetPool,
|
||||
opts.freshPerOwner ?? FRESH_PER_OWNER,
|
||||
nowMs,
|
||||
visibleFilter,
|
||||
windowMs
|
||||
);
|
||||
const staticallyDropped: OmniRouteRawModelEntry[] = [];
|
||||
// Stage counters for the refresh summary line. Frozen at the end of the
|
||||
// static pass, before the usage-memory restoration below: restored
|
||||
// entries rejoin `collected` (so `published` can exceed `afterPresets`),
|
||||
// and the summary keeps reading the filter stages, not the restore.
|
||||
let afterDefaultView = 0;
|
||||
let afterPresets = 0;
|
||||
for (const entry of rawModels) {
|
||||
if (!entry.id) continue;
|
||||
if (canonicalDedup.has(entry.id)) continue;
|
||||
@@ -1024,6 +939,7 @@ export async function collectCatalog(
|
||||
staticallyDropped.push(entry);
|
||||
continue;
|
||||
}
|
||||
afterDefaultView += 1;
|
||||
const mapped = mapRawModelToModelV2(entry, {
|
||||
providerId: X,
|
||||
baseURL: opts.baseURL,
|
||||
@@ -1041,6 +957,7 @@ export async function collectCatalog(
|
||||
} satisfies CapabilityPresetFlags)
|
||||
)
|
||||
continue;
|
||||
afterPresets += 1;
|
||||
const mid = mapped.id.startsWith(X + "/") ? mapped.id.slice(X.length + 1) : mapped.id;
|
||||
const key = X + "/" + mid;
|
||||
collected.set(key, mapped);
|
||||
@@ -1066,9 +983,18 @@ export async function collectCatalog(
|
||||
baseURL: opts.baseURL,
|
||||
apiFormat: opts.apiFormat,
|
||||
});
|
||||
applyEnrichment(mapped, lookupEnrichment(entry.id, enrichment, canonicalToAlias), {
|
||||
const restoreEnrichment = lookupEnrichment(entry.id, enrichment, canonicalToAlias);
|
||||
applyEnrichment(mapped, restoreEnrichment, {
|
||||
providerTag: opts.providerTag !== false,
|
||||
});
|
||||
if (
|
||||
!passesCapabilityPresets(mapped, restoreEnrichment, {
|
||||
freeOnly: opts.freeOnly,
|
||||
toolsOnly: opts.toolsOnly,
|
||||
visionOnly: opts.visionOnly,
|
||||
} satisfies CapabilityPresetFlags)
|
||||
)
|
||||
continue;
|
||||
const mid = mapped.id.startsWith(X + "/") ? mapped.id.slice(X.length + 1) : mapped.id;
|
||||
const key = X + "/" + mid;
|
||||
collected.set(key, mapped);
|
||||
@@ -1100,8 +1026,19 @@ export async function collectCatalog(
|
||||
warnedCombos,
|
||||
cacheKey,
|
||||
});
|
||||
if (comboResult === undefined)
|
||||
// One summary line per successful refresh: the stage counters plus the
|
||||
// free-tier lines the served catalog never reached. Audible at the
|
||||
// default `warn` level so a service install (stdout lost) still reads
|
||||
// the cause of a short catalog in the host log.
|
||||
const emitSummary = (published: number): void => {
|
||||
log.warn(
|
||||
`[omniroute-v2] catalog refresh: served=${rawModels.length} default=${afterDefaultView} presets=${afterPresets} published=${published} unmatched-free=${freeUnmatched}`
|
||||
);
|
||||
};
|
||||
if (comboResult === undefined) {
|
||||
emitSummary(collected.size);
|
||||
return { entries: collected, counts: { models: modelCount, combos: 0 } };
|
||||
}
|
||||
const comboCount = comboResult.published;
|
||||
providerDroppedCount += comboResult.providerDropped;
|
||||
|
||||
@@ -1114,26 +1051,13 @@ export async function collectCatalog(
|
||||
warnProviderMatchedNothing(providerFilter, warnedCombos, log);
|
||||
}
|
||||
|
||||
emitSummary(collected.size);
|
||||
return {
|
||||
entries: collected,
|
||||
counts: { models: modelCount, combos: comboCount },
|
||||
};
|
||||
}
|
||||
|
||||
function warnProviderMatchedNothing(
|
||||
providerFilter: ProviderFilter | undefined,
|
||||
warnedCombos: Set<string>,
|
||||
log: Logger
|
||||
): void {
|
||||
if (!providerFilter) return;
|
||||
const key = `provider-matched-nothing::${[...providerFilter.allow].sort().join(",")}`;
|
||||
if (warnedCombos.has(key)) return;
|
||||
warnedCombos.add(key);
|
||||
log.warn(
|
||||
`[omniroute-v2] providersAllow [${providerFilter.originals.join(", ")}] matched nothing, publishing empty catalog.`
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Project a collected catalog onto the stable contract: one provider `info`
|
||||
* plus one `Model.Info` per entry. The provider carries the endpoint and the
|
||||
|
||||
@@ -3,10 +3,12 @@ import {
|
||||
optionalTierFingerprint,
|
||||
catalogContentFingerprint,
|
||||
createLogger,
|
||||
setHostSink,
|
||||
defaultOmniRouteCombosFetcher,
|
||||
defaultOmniRouteEnrichmentFetcher,
|
||||
defaultOmniRouteModelsFetcher,
|
||||
defaultOmniRouteProvidersFetcher,
|
||||
type LogLevel,
|
||||
type OmniRouteEnrichmentMap,
|
||||
type OmniRouteProviderConnection,
|
||||
} from "./shared/index.js";
|
||||
@@ -72,6 +74,31 @@ export default Plugin.define({
|
||||
resolved.logger = log;
|
||||
resolved.logLevel = parsed.logLevel;
|
||||
resolved.startupDebug = parsed.startupDebug;
|
||||
// Forward plugin lines to the host log when the host exposes one, so a
|
||||
// service install (stdout lost) still records warnings. Defensive at
|
||||
// every level: without it the console output above stays the only copy.
|
||||
try {
|
||||
const maybeClient = (ctx as { client?: unknown }).client as
|
||||
{ app?: { log?: unknown } } | undefined;
|
||||
const appLog = maybeClient?.app?.log;
|
||||
if (typeof appLog === "function") {
|
||||
const hostLog = appLog as (input: {
|
||||
body: { service: string; level: LogLevel; message: string };
|
||||
}) => unknown;
|
||||
setHostSink((level, message) => {
|
||||
const out = hostLog({
|
||||
body: { service: "[omniroute-plugin]", level, message },
|
||||
});
|
||||
return out;
|
||||
});
|
||||
}
|
||||
} catch (err) {
|
||||
// The probe itself threw (a throwing getter on the host object):
|
||||
// trace it on the console so a missed host log is never silent.
|
||||
console.warn(
|
||||
`[omniroute-plugin] [WARN] host log probe failed, keeping console output: ${err instanceof Error ? err.message : String(err)}`
|
||||
);
|
||||
}
|
||||
log.info(`[omniroute-v2] init providerId=${X}`);
|
||||
// The inference key stands in below when no management token is set, and
|
||||
// gateways usually reject that stand-in with 401/403. Say so once here,
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
import type { OmniRouteRawCombo } from "./shared/combos-map.js";
|
||||
import type { OmniRouteEnrichmentMap } from "./shared/enrich.js";
|
||||
import type { Logger } from "./shared/logger.js";
|
||||
|
||||
/** Compiled allowlist. `undefined` means inactive (empty/absent = full catalog). */
|
||||
@@ -253,6 +254,44 @@ export function warnUnknownProviders(
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provider-allowlist preamble: build the filter/resolve tables from the
|
||||
* same alias pairs the collection passes use, and warn on an active
|
||||
* filter with no vocabulary or unknown names. Returns the three values
|
||||
* both collection points read, so the preamble cannot drift from them.
|
||||
*/
|
||||
export function resolveProviderFilter(
|
||||
providersAllow: string[] | undefined,
|
||||
enrichment: OmniRouteEnrichmentMap,
|
||||
canonicalToAlias: ReadonlyMap<string, string>,
|
||||
usableCanonicals: Iterable<string> | undefined,
|
||||
warned: Set<string>,
|
||||
log: Pick<Logger, "warn">
|
||||
): {
|
||||
providerFilter: ProviderFilter | undefined;
|
||||
providerResolve: ProviderResolve | undefined;
|
||||
providerAllUnknown: boolean;
|
||||
} {
|
||||
const providerFilter = compileProviderFilter(providersAllow);
|
||||
let providerResolve: ProviderResolve | undefined;
|
||||
let providerAllUnknown = false;
|
||||
if (providerFilter) {
|
||||
const pairs: Array<{ alias?: string; canonical?: string }> = [];
|
||||
for (const entry of enrichment.values()) {
|
||||
pairs.push({ alias: entry.providerAlias, canonical: entry.providerCanonical });
|
||||
}
|
||||
for (const [canonical, alias] of canonicalToAlias) {
|
||||
pairs.push({ alias, canonical });
|
||||
}
|
||||
providerResolve = buildProviderResolve(pairs, usableCanonicals);
|
||||
providerAllUnknown = filterAllUnknown(providerFilter, providerResolve);
|
||||
if (providerResolve.known.size === 0)
|
||||
warnNoVocabulary(providerFilter, providerResolve.known, warned, log);
|
||||
else warnUnknownProviders(providerFilter, providerResolve.known, warned, log);
|
||||
}
|
||||
return { providerFilter, providerResolve, providerAllUnknown };
|
||||
}
|
||||
|
||||
/** Warn once when the filter is active but no vocabulary exists. */
|
||||
export function warnNoVocabulary(
|
||||
filter: ProviderFilter | undefined,
|
||||
@@ -270,3 +309,18 @@ export function warnNoVocabulary(
|
||||
`keeping the full catalog.`
|
||||
);
|
||||
}
|
||||
|
||||
/** Warn once when the provider filter drops the whole catalog. */
|
||||
export function warnProviderMatchedNothing(
|
||||
filter: ProviderFilter | undefined,
|
||||
warned: Set<string>,
|
||||
log: Pick<Logger, "warn">
|
||||
): void {
|
||||
if (!filter) return;
|
||||
const key = `provider-matched-nothing::${[...filter.allow].sort().join(",")}`;
|
||||
if (warned.has(key)) return;
|
||||
warned.add(key);
|
||||
log.warn(
|
||||
`[omniroute-v2] providersAllow [${filter.originals.join(", ")}] matched nothing, publishing empty catalog.`
|
||||
);
|
||||
}
|
||||
|
||||
@@ -45,6 +45,36 @@ export interface OmniRouteEnrichmentEntry {
|
||||
/** Map keyed by full model id (possibly namespaced, e.g. `cc/claude-sonnet-4-6`). */
|
||||
export type OmniRouteEnrichmentMap = Map<string, OmniRouteEnrichmentEntry>;
|
||||
|
||||
/**
|
||||
* Free-tier match between the enrichment overlay and the served catalog:
|
||||
* how many overlay lines carry a `freeType`, and how many of them a served
|
||||
* id reaches through the alias-aware lookup the collection pass uses.
|
||||
*/
|
||||
export interface FreeTierMatch {
|
||||
total: number;
|
||||
matched: number;
|
||||
unmatched: number;
|
||||
}
|
||||
|
||||
export function countFreeTierMatch(
|
||||
servedIds: readonly string[],
|
||||
enrichment: OmniRouteEnrichmentMap | undefined,
|
||||
canonicalToAlias: ReadonlyMap<string, string>
|
||||
): FreeTierMatch {
|
||||
if (!enrichment) return { total: 0, matched: 0, unmatched: 0 };
|
||||
let total = 0;
|
||||
const matched = new Set<object>();
|
||||
for (const entry of enrichment.values()) {
|
||||
if (entry.freeType !== undefined) total += 1;
|
||||
}
|
||||
for (const id of servedIds) {
|
||||
if (typeof id !== "string" || id.length === 0) continue;
|
||||
const hit = lookupEnrichment(id, enrichment, canonicalToAlias);
|
||||
if (hit !== undefined && hit.freeType !== undefined) matched.add(hit);
|
||||
}
|
||||
return { total, matched: matched.size, unmatched: total - matched.size };
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse-index the enrichment map from `providerCanonical → providerAlias`.
|
||||
*
|
||||
@@ -94,7 +124,7 @@ export function buildCanonicalToAliasMap(
|
||||
export function lookupEnrichment(
|
||||
rawId: string,
|
||||
enrichment: OmniRouteEnrichmentMap | undefined,
|
||||
canonicalToAlias: Map<string, string>
|
||||
canonicalToAlias: ReadonlyMap<string, string>
|
||||
): OmniRouteEnrichmentEntry | undefined {
|
||||
if (!enrichment) return undefined;
|
||||
const direct = enrichment.get(rawId);
|
||||
@@ -483,30 +513,58 @@ export const defaultOmniRouteEnrichmentFetcher: OmniRouteEnrichmentFetcher = asy
|
||||
: Array.isArray(body)
|
||||
? (body as unknown[])
|
||||
: [];
|
||||
// Index namespaced keys by (canonical provider, model suffix) so a
|
||||
// free-tier line stamps every key its provider serves — alias and
|
||||
// canonical alike — instead of the first key found. Bare ids are
|
||||
// never indexed: only `alias + "/"`-prefixed keys qualify, and only
|
||||
// by exact match on both levels at stamp time. Local to this
|
||||
// refresh; nothing survives the call.
|
||||
const canonicalAliasIndex = new Map<string, Map<string, string[]>>();
|
||||
for (const [key, entry] of out) {
|
||||
const alias = typeof entry.providerAlias === "string" ? entry.providerAlias : "";
|
||||
const canonical =
|
||||
typeof entry.providerCanonical === "string" ? entry.providerCanonical : "";
|
||||
if (alias.length === 0 || canonical.length === 0) continue;
|
||||
if (!key.startsWith(`${alias}/`)) continue;
|
||||
const suffix = key.slice(alias.length + 1);
|
||||
if (suffix.length === 0) continue;
|
||||
let byModel = canonicalAliasIndex.get(canonical);
|
||||
if (!byModel) {
|
||||
byModel = new Map<string, string[]>();
|
||||
canonicalAliasIndex.set(canonical, byModel);
|
||||
}
|
||||
const keys = byModel.get(suffix);
|
||||
if (keys) {
|
||||
if (!keys.includes(key)) keys.push(key);
|
||||
} else {
|
||||
byModel.set(suffix, [key]);
|
||||
}
|
||||
}
|
||||
for (const fm of perModel) {
|
||||
if (!fm || typeof fm !== "object") continue;
|
||||
const fmObj = fm as Record<string, unknown>;
|
||||
const provider = typeof fmObj.provider === "string" ? fmObj.provider : "";
|
||||
const modelId = typeof fmObj.modelId === "string" ? fmObj.modelId : "";
|
||||
const freeType = typeof fmObj.freeType === "string" ? fmObj.freeType : "";
|
||||
if (!modelId || !freeType) continue;
|
||||
if (!provider || !modelId || !freeType) continue;
|
||||
const monthlyTokens =
|
||||
typeof fmObj.monthlyTokens === "number" ? fmObj.monthlyTokens : undefined;
|
||||
const creditTokens =
|
||||
typeof fmObj.creditTokens === "number" ? fmObj.creditTokens : undefined;
|
||||
const displayName = typeof fmObj.displayName === "string" ? fmObj.displayName : "";
|
||||
const candidates = [
|
||||
`${provider}/${modelId}`,
|
||||
modelId,
|
||||
...(displayName ? [displayName] : []),
|
||||
];
|
||||
for (const key of candidates) {
|
||||
const entry = out.get(key);
|
||||
if (entry) {
|
||||
const stamped = out.get(`${provider}/${modelId}`);
|
||||
if (stamped) {
|
||||
stamped.freeType = freeType as FreeModelFreeType;
|
||||
if (monthlyTokens !== undefined) stamped.monthlyTokens = monthlyTokens;
|
||||
if (creditTokens !== undefined) stamped.creditTokens = creditTokens;
|
||||
}
|
||||
const namespacedByCanonical = canonicalAliasIndex.get(provider)?.get(modelId);
|
||||
if (namespacedByCanonical) {
|
||||
for (const key of namespacedByCanonical) {
|
||||
const entry = out.get(key);
|
||||
if (!entry || entry === stamped) continue;
|
||||
entry.freeType = freeType as FreeModelFreeType;
|
||||
if (monthlyTokens !== undefined) entry.monthlyTokens = monthlyTokens;
|
||||
if (creditTokens !== undefined) entry.creditTokens = creditTokens;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
|
||||
export type LogLevel = "error" | "warn" | "info" | "debug";
|
||||
|
||||
/** Synchronous host-log receiver: the host forwards plugin lines to its own log. */
|
||||
export type HostLogSink = (level: LogLevel, message: string) => unknown;
|
||||
|
||||
const LEVEL_ORDER: Record<LogLevel, number> = {
|
||||
error: 0,
|
||||
warn: 1,
|
||||
@@ -23,6 +26,12 @@ function shouldLog(current: LogLevel, target: LogLevel): boolean {
|
||||
|
||||
let _level: LogLevel = "warn";
|
||||
|
||||
/** Optional host-log receiver (module-global, same pattern as the log level). */
|
||||
let _hostSink: HostLogSink | undefined;
|
||||
|
||||
/** A host-log send already failed once in this process: stay on console only. */
|
||||
let _hostSinkFailed = false;
|
||||
|
||||
export function setLogLevel(level: LogLevel): void {
|
||||
_level = level;
|
||||
}
|
||||
@@ -31,40 +40,115 @@ export function getLogLevel(): LogLevel {
|
||||
return _level;
|
||||
}
|
||||
|
||||
/**
|
||||
* Point plugin log lines at the host log as well as the console. Pass
|
||||
* `undefined` to drop the receiver (and clear the send-once failure
|
||||
* marker so a later receiver starts clean).
|
||||
*/
|
||||
export function setHostSink(sink: HostLogSink | undefined): void {
|
||||
_hostSink = sink;
|
||||
if (sink === undefined) _hostSinkFailed = false;
|
||||
}
|
||||
|
||||
function fmt(level: LogLevel, msg: string, tag?: string): string {
|
||||
const prefix = tag ? `${TAG}${tag}` : TAG;
|
||||
return `${prefix} [${level.toUpperCase()}] ${msg}`;
|
||||
}
|
||||
|
||||
function emitHostSink(level: LogLevel, line: string): void {
|
||||
if (_hostSink === undefined || _hostSinkFailed) return;
|
||||
try {
|
||||
const sent = _hostSink(level, line);
|
||||
// A host client that answers asynchronously still reports delivery
|
||||
// failures: keep the once-only console trace for its rejection too.
|
||||
if (sent !== null && (typeof sent === "object" || typeof sent === "function")) {
|
||||
const then = (sent as { then?: unknown }).then;
|
||||
if (typeof then === "function") {
|
||||
(sent as Promise<unknown>).then(undefined, (err: unknown) => {
|
||||
if (_hostSinkFailed) return;
|
||||
_hostSinkFailed = true;
|
||||
console.warn(
|
||||
`${TAG} [WARN] host log sink failed, keeping console output: ${err instanceof Error ? err.message : String(err)}`
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
if (_hostSinkFailed) return;
|
||||
_hostSinkFailed = true;
|
||||
console.warn(
|
||||
`${TAG} [WARN] host log sink failed, keeping console output: ${err instanceof Error ? err.message : String(err)}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function buildLogger(getLevel: () => LogLevel) {
|
||||
return {
|
||||
error(msg: string, ...args: unknown[]): void {
|
||||
if (shouldLog(getLevel(), "error")) console.error(fmt("error", msg), ...args);
|
||||
if (shouldLog(getLevel(), "error")) {
|
||||
const line = fmt("error", msg);
|
||||
console.error(line, ...args);
|
||||
emitHostSink("error", [line, ...args.map(String)].join(" "));
|
||||
}
|
||||
},
|
||||
warn(msg: string, ...args: unknown[]): void {
|
||||
if (shouldLog(getLevel(), "warn")) console.warn(fmt("warn", msg), ...args);
|
||||
if (shouldLog(getLevel(), "warn")) {
|
||||
const line = fmt("warn", msg);
|
||||
console.warn(line, ...args);
|
||||
emitHostSink("warn", [line, ...args.map(String)].join(" "));
|
||||
}
|
||||
},
|
||||
info(msg: string, ...args: unknown[]): void {
|
||||
if (shouldLog(getLevel(), "info")) console.warn(fmt("info", msg), ...args);
|
||||
if (shouldLog(getLevel(), "info")) {
|
||||
const line = fmt("info", msg);
|
||||
console.warn(line, ...args);
|
||||
emitHostSink("info", [line, ...args.map(String)].join(" "));
|
||||
}
|
||||
},
|
||||
debug(msg: string, ...args: unknown[]): void {
|
||||
if (shouldLog(getLevel(), "debug")) console.warn(fmt("debug", msg), ...args);
|
||||
if (shouldLog(getLevel(), "debug")) {
|
||||
const line = fmt("debug", msg);
|
||||
console.warn(line, ...args);
|
||||
emitHostSink("debug", [line, ...args.map(String)].join(" "));
|
||||
}
|
||||
},
|
||||
/** Always emit regardless of level (for critical init breadcrumbs). */
|
||||
always(msg: string, ...args: unknown[]): void {
|
||||
console.warn(TAG, msg, ...args);
|
||||
const line = `${TAG} ${msg}`;
|
||||
console.warn(line, ...args);
|
||||
emitHostSink("warn", [line, ...args.map(String)].join(" "));
|
||||
},
|
||||
|
||||
child(tag: string) {
|
||||
return {
|
||||
error: (msg: string, ...args: unknown[]) =>
|
||||
shouldLog(getLevel(), "error") && console.error(fmt("error", msg, tag), ...args),
|
||||
warn: (msg: string, ...args: unknown[]) =>
|
||||
shouldLog(getLevel(), "warn") && console.warn(fmt("warn", msg, tag), ...args),
|
||||
info: (msg: string, ...args: unknown[]) =>
|
||||
shouldLog(getLevel(), "info") && console.warn(fmt("info", msg, tag), ...args),
|
||||
debug: (msg: string, ...args: unknown[]) =>
|
||||
shouldLog(getLevel(), "debug") && console.warn(fmt("debug", msg, tag), ...args),
|
||||
error: (msg: string, ...args: unknown[]) => {
|
||||
if (shouldLog(getLevel(), "error")) {
|
||||
const line = fmt("error", msg, tag);
|
||||
console.error(line, ...args);
|
||||
emitHostSink("error", [line, ...args.map(String)].join(" "));
|
||||
}
|
||||
},
|
||||
warn: (msg: string, ...args: unknown[]) => {
|
||||
if (shouldLog(getLevel(), "warn")) {
|
||||
const line = fmt("warn", msg, tag);
|
||||
console.warn(line, ...args);
|
||||
emitHostSink("warn", [line, ...args.map(String)].join(" "));
|
||||
}
|
||||
},
|
||||
info: (msg: string, ...args: unknown[]) => {
|
||||
if (shouldLog(getLevel(), "info")) {
|
||||
const line = fmt("info", msg, tag);
|
||||
console.warn(line, ...args);
|
||||
emitHostSink("info", [line, ...args.map(String)].join(" "));
|
||||
}
|
||||
},
|
||||
debug: (msg: string, ...args: unknown[]) => {
|
||||
if (shouldLog(getLevel(), "debug")) {
|
||||
const line = fmt("debug", msg, tag);
|
||||
console.warn(line, ...args);
|
||||
emitHostSink("debug", [line, ...args.map(String)].join(" "));
|
||||
}
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -43,10 +43,30 @@ export type FreeModelFreeType =
|
||||
| "recurring-daily"
|
||||
| "recurring-monthly"
|
||||
| "recurring-credit"
|
||||
| "recurring-uncapped"
|
||||
| "one-time-initial"
|
||||
| "keyless"
|
||||
| "discontinued";
|
||||
|
||||
/**
|
||||
* Free types the `freeOnly` preset admits. Single-use credits and
|
||||
* retired models stay visible without the preset but never pass it;
|
||||
* an unrecognised gateway value stays unpublished under the preset
|
||||
* until it is classified here.
|
||||
*/
|
||||
const FREE_ONLY_FREE_TYPES: ReadonlySet<string> = new Set([
|
||||
"recurring-daily",
|
||||
"recurring-monthly",
|
||||
"recurring-credit",
|
||||
"recurring-uncapped",
|
||||
"keyless",
|
||||
]);
|
||||
|
||||
/** Whether a free-tier entry counts as free under the `freeOnly` preset. */
|
||||
export function isFreeOnlyFreeType(freeType: unknown): boolean {
|
||||
return typeof freeType === "string" && FREE_ONLY_FREE_TYPES.has(freeType);
|
||||
}
|
||||
|
||||
// ── Provider Label ────────────────────────────────────────────────────────
|
||||
|
||||
/**
|
||||
@@ -139,12 +159,17 @@ function fmtTokens(n: number): string {
|
||||
/**
|
||||
* Format a free model budget into a short human-readable suffix.
|
||||
*
|
||||
* recurring-daily → "25M tokens/day"
|
||||
* recurring-monthly → "25M tokens/month"
|
||||
* recurring-credit → "10M credits"
|
||||
* one-time-initial → "1M credits (one-time)"
|
||||
* keyless → "(keyless)"
|
||||
* discontinued → "(discontinued)"
|
||||
* recurring-daily → "25M tokens/day"
|
||||
* recurring-monthly → "25M tokens/month"
|
||||
* recurring-credit → "10M credits"
|
||||
* recurring-uncapped → "(uncapped)"
|
||||
* one-time-initial → "1M credits (one-time)"
|
||||
* keyless → "(keyless)"
|
||||
* discontinued → "(discontinued)"
|
||||
* unknown future type → "(<type>)", never empty
|
||||
*
|
||||
* The uncapped label reuses the dashboard wording ("uncapped" in
|
||||
* `FreeBudgetCard.tsx:133`), parenthesised like the other cap-less labels.
|
||||
*/
|
||||
export function formatFreeBudget(params: {
|
||||
freeType: FreeModelFreeType;
|
||||
@@ -160,6 +185,8 @@ export function formatFreeBudget(params: {
|
||||
return `${fmtTokens(monthlyTokens)} tokens/month`;
|
||||
case "recurring-credit":
|
||||
return `${fmtTokens(creditTokens)} credits`;
|
||||
case "recurring-uncapped":
|
||||
return "(uncapped)";
|
||||
case "one-time-initial":
|
||||
return `${fmtTokens(creditTokens)} credits (one-time)`;
|
||||
case "keyless":
|
||||
@@ -167,7 +194,7 @@ export function formatFreeBudget(params: {
|
||||
case "discontinued":
|
||||
return "(discontinued)";
|
||||
default:
|
||||
return "";
|
||||
return `(${String(freeType)})`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
464
@omniroute/opencode-plugin-v2/tests/catalog-presets-pool.test.ts
Normal file
464
@omniroute/opencode-plugin-v2/tests/catalog-presets-pool.test.ts
Normal file
@@ -0,0 +1,464 @@
|
||||
import { describe, it } from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import { collectCatalog, publishCatalog } from "../src/catalog.js";
|
||||
|
||||
type BetaDraft = {
|
||||
provider: {
|
||||
list?: () => unknown[];
|
||||
get?: (id: string) => unknown;
|
||||
update: (id: string, fn: (p: Record<string, any>) => void) => void;
|
||||
remove?: () => void;
|
||||
};
|
||||
model: {
|
||||
get?: (...a: string[]) => unknown;
|
||||
update: (pid: string, mid: string, fn: (m: Record<string, any>) => void) => void;
|
||||
remove?: () => void;
|
||||
default?: { get: () => undefined; set: () => void };
|
||||
};
|
||||
};
|
||||
|
||||
function fakeDraft(): {
|
||||
providers: Map<string, Record<string, any>>;
|
||||
models: Map<string, Record<string, any>>;
|
||||
provider: BetaDraft["provider"];
|
||||
model: BetaDraft["model"];
|
||||
} {
|
||||
const providers = new Map<string, Record<string, any>>();
|
||||
const models = new Map<string, Record<string, any>>();
|
||||
return {
|
||||
providers,
|
||||
models,
|
||||
provider: {
|
||||
list: () => [],
|
||||
get: (id: string) => providers.get(id) as never,
|
||||
update: (id: string, fn: (p: Record<string, any>) => void) => {
|
||||
const p = (providers.get(id) ?? { id }) as Record<string, any>;
|
||||
fn(p);
|
||||
providers.set(id, p);
|
||||
},
|
||||
remove: () => {},
|
||||
},
|
||||
model: {
|
||||
get: () => undefined,
|
||||
update: (pid: string, mid: string, fn: (m: Record<string, any>) => void) => {
|
||||
const k = pid + "/" + mid;
|
||||
const m = (models.get(k) ?? { id: mid, providerID: pid }) as Record<string, any>;
|
||||
fn(m);
|
||||
models.set(k, m);
|
||||
},
|
||||
remove: () => {},
|
||||
default: { get: () => undefined, set: () => {} },
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
const baseOpts = {
|
||||
providerId: "omniroute",
|
||||
baseURL: "https://gw.example.com",
|
||||
apiKey: "k",
|
||||
timeoutMs: 1000,
|
||||
modelCacheTtlMs: 300000,
|
||||
usableOnly: false,
|
||||
};
|
||||
|
||||
const FIXED_NOW = Date.parse("2026-10-03T12:00:00.000Z");
|
||||
|
||||
async function withFixedNow<T>(fn: () => Promise<T>): Promise<T> {
|
||||
const realNow = Date.now;
|
||||
Date.now = () => FIXED_NOW;
|
||||
try {
|
||||
return await fn();
|
||||
} finally {
|
||||
Date.now = realNow;
|
||||
}
|
||||
}
|
||||
|
||||
function captureWarns(): { warns: string[]; restore: () => void } {
|
||||
const warns: string[] = [];
|
||||
const origWarn = console.warn;
|
||||
console.warn = (...args: unknown[]) => {
|
||||
warns.push(String(args[0]));
|
||||
};
|
||||
return {
|
||||
warns,
|
||||
restore() {
|
||||
console.warn = origWarn;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
function freeOverlay(ids: string[]): Map<string, { freeType: "recurring-monthly" }> {
|
||||
return new Map(ids.map((id) => [id, { freeType: "recurring-monthly" as const }]));
|
||||
}
|
||||
|
||||
describe("capability presets pick from the whole catalog", () => {
|
||||
it("freeOnly publishes the two free entries of a thirty-model provider, not the ten newest emptied", async () => {
|
||||
const draft = fakeDraft();
|
||||
const ids = Array.from({ length: 30 }, (_v, i) => `ac/m${i}`);
|
||||
const res = await publishCatalog(
|
||||
draft,
|
||||
{ ...baseOpts, freeOnly: true },
|
||||
{
|
||||
fetcher: async () => ids.map((id, i) => ({ id, owned_by: "ac", context_length: 1000 + i })),
|
||||
enrichmentFetcher: async () => freeOverlay(["ac/m0", "ac/m1"]),
|
||||
combosFetcher: async () => [],
|
||||
}
|
||||
);
|
||||
assert.equal(res.models, 2);
|
||||
assert.ok(draft.models.has("omniroute/ac/m0"));
|
||||
assert.ok(draft.models.has("omniroute/ac/m1"));
|
||||
assert.ok(!draft.models.has("omniroute/ac/m29"));
|
||||
});
|
||||
|
||||
it("without a preset the same provider keeps the ten newest entries", async () => {
|
||||
const draft = fakeDraft();
|
||||
const ids = Array.from({ length: 30 }, (_v, i) => `ac/m${i}`);
|
||||
const res = await publishCatalog(
|
||||
draft,
|
||||
{ ...baseOpts },
|
||||
{
|
||||
fetcher: async () => ids.map((id, i) => ({ id, owned_by: "ac", context_length: 1000 + i })),
|
||||
enrichmentFetcher: async () => new Map(),
|
||||
combosFetcher: async () => [],
|
||||
}
|
||||
);
|
||||
assert.equal(res.models, 10);
|
||||
assert.ok(draft.models.has("omniroute/ac/m29"));
|
||||
assert.ok(!draft.models.has("omniroute/ac/m0"));
|
||||
});
|
||||
|
||||
it("toolsOnly replaces the entries without tool calls in the showcase and in the recent picks", async () => {
|
||||
// Showcase path: stale entries, rank by context length.
|
||||
{
|
||||
const draft = fakeDraft();
|
||||
const res = await publishCatalog(
|
||||
draft,
|
||||
{ ...baseOpts, toolsOnly: true },
|
||||
{
|
||||
fetcher: async () =>
|
||||
Array.from({ length: 30 }, (_v, i) => ({
|
||||
id: `tl/m${i}`,
|
||||
owned_by: "tl",
|
||||
context_length: 1000 + i,
|
||||
...(["tl/m27", "tl/m28", "tl/m29"].includes(`tl/m${i}`)
|
||||
? {}
|
||||
: { capabilities: { tool_calling: true } }),
|
||||
})),
|
||||
enrichmentFetcher: async () => new Map(),
|
||||
combosFetcher: async () => [],
|
||||
}
|
||||
);
|
||||
assert.equal(res.models, 10);
|
||||
assert.ok(!draft.models.has("omniroute/tl/m27"));
|
||||
assert.ok(!draft.models.has("omniroute/tl/m28"));
|
||||
assert.ok(!draft.models.has("omniroute/tl/m29"));
|
||||
assert.ok(draft.models.has("omniroute/tl/m17"));
|
||||
}
|
||||
// Recent path: fresh entries, the fresh cap ranks the same way.
|
||||
await withFixedNow(async () => {
|
||||
const draft = fakeDraft();
|
||||
const dayMs = 24 * 3600 * 1000;
|
||||
const res = await publishCatalog(
|
||||
draft,
|
||||
{ ...baseOpts, toolsOnly: true },
|
||||
{
|
||||
fetcher: async () =>
|
||||
Array.from({ length: 13 }, (_v, i) => ({
|
||||
id: `tb${i}`,
|
||||
owned_by: "toolbox",
|
||||
context_length: 1000,
|
||||
release_date: new Date(FIXED_NOW - i * dayMs).toISOString(),
|
||||
...(i < 3 ? {} : { capabilities: { tool_calling: true } }),
|
||||
})),
|
||||
enrichmentFetcher: async () => new Map(),
|
||||
combosFetcher: async () => [],
|
||||
}
|
||||
);
|
||||
assert.equal(res.models, 10);
|
||||
assert.ok(!draft.models.has("omniroute/tb0"));
|
||||
assert.ok(!draft.models.has("omniroute/tb1"));
|
||||
assert.ok(!draft.models.has("omniroute/tb2"));
|
||||
assert.ok(draft.models.has("omniroute/tb12"));
|
||||
});
|
||||
});
|
||||
|
||||
it('visibleModels ["*"] keeps the full-loop behaviour under freeOnly', async () => {
|
||||
const draft = fakeDraft();
|
||||
const res = await publishCatalog(
|
||||
draft,
|
||||
{ ...baseOpts, freeOnly: true, visibleModels: ["*"] },
|
||||
{
|
||||
fetcher: async () => [{ id: "v0" }, { id: "v1" }, { id: "v2" }, { id: "v3" }, { id: "v4" }],
|
||||
enrichmentFetcher: async () => freeOverlay(["v0", "v1", "v2"]),
|
||||
combosFetcher: async () => [],
|
||||
}
|
||||
);
|
||||
assert.equal(res.models, 3);
|
||||
assert.ok(draft.models.has("omniroute/v0"));
|
||||
assert.ok(!draft.models.has("omniroute/v3"));
|
||||
});
|
||||
|
||||
it("freeOnly publishes a combo whose three members are free", async () => {
|
||||
const draft = fakeDraft();
|
||||
const res = await publishCatalog(
|
||||
draft,
|
||||
{ ...baseOpts, freeOnly: true },
|
||||
{
|
||||
fetcher: async () => [{ id: "k1" }, { id: "k2" }, { id: "k3" }],
|
||||
enrichmentFetcher: async () => freeOverlay(["k1", "k2", "k3"]),
|
||||
combosFetcher: async () => [
|
||||
{
|
||||
id: "trio",
|
||||
name: "Trio",
|
||||
models: [
|
||||
{ kind: "model", model: "k1" } as never,
|
||||
{ kind: "model", model: "k2" } as never,
|
||||
{ kind: "model", model: "k3" } as never,
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
);
|
||||
assert.equal(res.combos, 1);
|
||||
assert.ok(draft.models.has("omniroute/Trio"));
|
||||
});
|
||||
|
||||
it("freeOnly drops a combo with a paid member and keeps the all-free one", async () => {
|
||||
const draft = fakeDraft();
|
||||
const res = await publishCatalog(
|
||||
draft,
|
||||
{ ...baseOpts, freeOnly: true },
|
||||
{
|
||||
fetcher: async () => [{ id: "g1" }, { id: "g2" }, { id: "g3" }, { id: "p1" }],
|
||||
enrichmentFetcher: async () => freeOverlay(["g1", "g2", "g3"]),
|
||||
combosFetcher: async () => [
|
||||
{
|
||||
id: "trio",
|
||||
name: "GoodTrio",
|
||||
models: [
|
||||
{ kind: "model", model: "g1" } as never,
|
||||
{ kind: "model", model: "g2" } as never,
|
||||
{ kind: "model", model: "g3" } as never,
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "mixed",
|
||||
name: "Mixed",
|
||||
models: [
|
||||
{ kind: "model", model: "g1" } as never,
|
||||
{ kind: "model", model: "p1" } as never,
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
);
|
||||
assert.equal(res.combos, 1);
|
||||
assert.ok(draft.models.has("omniroute/GoodTrio"));
|
||||
assert.ok(!draft.models.has("omniroute/Mixed"));
|
||||
});
|
||||
|
||||
it("freeOnly drops a combo without members and keeps the all-free one", async () => {
|
||||
const draft = fakeDraft();
|
||||
const res = await publishCatalog(
|
||||
draft,
|
||||
{ ...baseOpts, freeOnly: true },
|
||||
{
|
||||
fetcher: async () => [{ id: "g1" }, { id: "g2" }, { id: "g3" }],
|
||||
enrichmentFetcher: async () => freeOverlay(["g1", "g2", "g3"]),
|
||||
combosFetcher: async () => [
|
||||
{
|
||||
id: "trio",
|
||||
name: "GoodTrio",
|
||||
models: [
|
||||
{ kind: "model", model: "g1" } as never,
|
||||
{ kind: "model", model: "g2" } as never,
|
||||
{ kind: "model", model: "g3" } as never,
|
||||
],
|
||||
},
|
||||
{ id: "empty", name: "Empty", models: [] },
|
||||
],
|
||||
}
|
||||
);
|
||||
assert.equal(res.combos, 1);
|
||||
assert.ok(draft.models.has("omniroute/GoodTrio"));
|
||||
assert.ok(!draft.models.has("omniroute/Empty"));
|
||||
});
|
||||
|
||||
it("freeOnly publishes a combo over a free combo and the free combo itself", async () => {
|
||||
const draft = fakeDraft();
|
||||
const res = await publishCatalog(
|
||||
draft,
|
||||
{ ...baseOpts, freeOnly: true },
|
||||
{
|
||||
fetcher: async () => [{ id: "c1" }],
|
||||
enrichmentFetcher: async () => freeOverlay(["c1"]),
|
||||
combosFetcher: async () => [
|
||||
{
|
||||
id: "parent",
|
||||
name: "Parent",
|
||||
models: [
|
||||
{ kind: "combo-ref", comboName: "Child" } as never,
|
||||
{ kind: "model", model: "c1" } as never,
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "child",
|
||||
name: "Child",
|
||||
models: [{ kind: "model", model: "c1" } as never],
|
||||
},
|
||||
],
|
||||
}
|
||||
);
|
||||
assert.equal(res.combos, 2);
|
||||
assert.ok(draft.models.has("omniroute/Child"));
|
||||
assert.ok(draft.models.has("omniroute/Parent"));
|
||||
});
|
||||
|
||||
it("freeOnly drops a combo over a dropped combo and warns on the never-resolving ref", async () => {
|
||||
const draft = fakeDraft();
|
||||
const { warns, restore } = captureWarns();
|
||||
try {
|
||||
const res = await publishCatalog(
|
||||
draft,
|
||||
{ ...baseOpts, freeOnly: true },
|
||||
{
|
||||
fetcher: async () => [{ id: "g1" }, { id: "g2" }, { id: "g3" }, { id: "p1" }],
|
||||
enrichmentFetcher: async () => freeOverlay(["g1", "g2", "g3"]),
|
||||
combosFetcher: async () => [
|
||||
{
|
||||
id: "trio",
|
||||
name: "GoodTrio",
|
||||
models: [
|
||||
{ kind: "model", model: "g1" } as never,
|
||||
{ kind: "model", model: "g2" } as never,
|
||||
{ kind: "model", model: "g3" } as never,
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "mixed",
|
||||
name: "Mixed",
|
||||
models: [
|
||||
{ kind: "model", model: "g1" } as never,
|
||||
{ kind: "model", model: "p1" } as never,
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "parent",
|
||||
name: "ParentOfDropped",
|
||||
models: [
|
||||
{ kind: "combo-ref", comboName: "Mixed" } as never,
|
||||
{ kind: "model", model: "g1" } as never,
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "orphan",
|
||||
name: "Orphan",
|
||||
models: [
|
||||
{ kind: "combo-ref", comboName: "Nobody" } as never,
|
||||
{ kind: "model", model: "g1" } as never,
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
);
|
||||
assert.equal(res.combos, 1);
|
||||
assert.ok(draft.models.has("omniroute/GoodTrio"));
|
||||
assert.ok(!draft.models.has("omniroute/ParentOfDropped"));
|
||||
assert.ok(!draft.models.has("omniroute/Orphan"));
|
||||
} finally {
|
||||
restore();
|
||||
}
|
||||
assert.ok(warns.some((w) => /could not resolve all nested combo-refs/.test(w)));
|
||||
});
|
||||
|
||||
it("freeOnly drops a combo with an unknown member and keeps the all-free one", async () => {
|
||||
const draft = fakeDraft();
|
||||
const res = await publishCatalog(
|
||||
draft,
|
||||
{ ...baseOpts, freeOnly: true },
|
||||
{
|
||||
fetcher: async () => [{ id: "g1" }, { id: "g2" }, { id: "g3" }],
|
||||
enrichmentFetcher: async () => freeOverlay(["g1", "g2", "g3"]),
|
||||
combosFetcher: async () => [
|
||||
{
|
||||
id: "trio",
|
||||
name: "GoodTrio",
|
||||
models: [
|
||||
{ kind: "model", model: "g1" } as never,
|
||||
{ kind: "model", model: "g2" } as never,
|
||||
{ kind: "model", model: "g3" } as never,
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "ghost",
|
||||
name: "Ghost",
|
||||
models: [
|
||||
{ kind: "model", model: "g1" } as never,
|
||||
{ kind: "model", model: "no-such-model" } as never,
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
);
|
||||
assert.equal(res.combos, 1);
|
||||
assert.ok(draft.models.has("omniroute/GoodTrio"));
|
||||
assert.ok(!draft.models.has("omniroute/Ghost"));
|
||||
});
|
||||
|
||||
it("without a preset every resolving combo publishes, dropped or unknown members included", async () => {
|
||||
const draft = fakeDraft();
|
||||
const res = await publishCatalog(
|
||||
draft,
|
||||
{ ...baseOpts },
|
||||
{
|
||||
fetcher: async () => [{ id: "g1" }, { id: "p1" }],
|
||||
enrichmentFetcher: async () => new Map(),
|
||||
combosFetcher: async () => [
|
||||
{
|
||||
id: "mixed",
|
||||
name: "Mixed",
|
||||
models: [
|
||||
{ kind: "model", model: "g1" } as never,
|
||||
{ kind: "model", model: "p1" } as never,
|
||||
],
|
||||
},
|
||||
{ id: "empty", name: "Empty", models: [] },
|
||||
{
|
||||
id: "ghost",
|
||||
name: "Ghost",
|
||||
models: [
|
||||
{ kind: "model", model: "g1" } as never,
|
||||
{ kind: "model", model: "no-such-model" } as never,
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
);
|
||||
assert.equal(res.combos, 3);
|
||||
assert.ok(draft.models.has("omniroute/Mixed"));
|
||||
assert.ok(draft.models.has("omniroute/Empty"));
|
||||
assert.ok(draft.models.has("omniroute/Ghost"));
|
||||
});
|
||||
|
||||
it("freeOnly does not restore a paid entry named by usage memory", async () => {
|
||||
const collected = await collectCatalog(
|
||||
{ ...baseOpts, freeOnly: true, managementReadToken: "m" },
|
||||
{
|
||||
fetcher: async () => [
|
||||
...Array.from({ length: 10 }, (_v, i) => ({
|
||||
id: `zzz/f${i}`,
|
||||
owned_by: "zzz",
|
||||
context_length: 100000 + i,
|
||||
})),
|
||||
{ id: "zzz/old-paid", owned_by: "zzz", context_length: 1000 },
|
||||
],
|
||||
enrichmentFetcher: async () => freeOverlay(["zzz/f0", "zzz/f1"]),
|
||||
combosFetcher: async () => [],
|
||||
usageFetcher: async () => ["zzz/old-paid"],
|
||||
}
|
||||
);
|
||||
assert.equal(collected.counts.models, 2);
|
||||
assert.ok(collected.entries.has("omniroute/zzz/f0"));
|
||||
assert.ok(!collected.entries.has("omniroute/zzz/old-paid"));
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,201 @@
|
||||
import { describe, it } from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import { publishCatalog } from "../src/catalog.js";
|
||||
|
||||
type Draft = {
|
||||
providers: Map<string, Record<string, any>>;
|
||||
models: Map<string, Record<string, any>>;
|
||||
provider: {
|
||||
update: (id: string, fn: (p: Record<string, any>) => void) => void;
|
||||
};
|
||||
model: {
|
||||
update: (pid: string, mid: string, fn: (m: Record<string, any>) => void) => void;
|
||||
};
|
||||
};
|
||||
|
||||
function draft(): Draft {
|
||||
const providers = new Map<string, Record<string, any>>();
|
||||
const models = new Map<string, Record<string, any>>();
|
||||
return {
|
||||
providers,
|
||||
models,
|
||||
provider: {
|
||||
update: (id: string, fn: (p: Record<string, any>) => void) => {
|
||||
const p = (providers.get(id) ?? { id }) as Record<string, any>;
|
||||
fn(p);
|
||||
providers.set(id, p);
|
||||
},
|
||||
},
|
||||
model: {
|
||||
update: (pid: string, mid: string, fn: (m: Record<string, any>) => void) => {
|
||||
const k = pid + "/" + mid;
|
||||
const m = (models.get(k) ?? { id: mid, providerID: pid }) as Record<string, any>;
|
||||
fn(m);
|
||||
models.set(k, m);
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
const baseOpts = {
|
||||
providerId: "omniroute",
|
||||
baseURL: "https://gw.example.com",
|
||||
apiKey: "k",
|
||||
timeoutMs: 1000,
|
||||
modelCacheTtlMs: 300000,
|
||||
usableOnly: false,
|
||||
// `visibleModels: ["*"]` skips the showcase/fresh narrowing so the stage
|
||||
// counters stay deterministic: every served id reaches the preset pass.
|
||||
visibleModels: ["*"],
|
||||
};
|
||||
|
||||
function captureWarns(): { warns: string[]; restore: () => void } {
|
||||
const warns: string[] = [];
|
||||
const origWarn = console.warn;
|
||||
console.warn = (...args: unknown[]) => {
|
||||
warns.push(String(args[0]));
|
||||
};
|
||||
return {
|
||||
warns,
|
||||
restore() {
|
||||
console.warn = origWarn;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
function summaryOf(warns: string[]): string | undefined {
|
||||
return warns.find((w) => w.includes("catalog refresh:"));
|
||||
}
|
||||
|
||||
describe("catalog refresh summary", () => {
|
||||
it("normal refresh emits one summary line with the five counters", async () => {
|
||||
const d = draft();
|
||||
const { warns, restore } = captureWarns();
|
||||
try {
|
||||
const res = await publishCatalog(d, baseOpts, {
|
||||
fetcher: async () => [{ id: "m1" }, { id: "m2" }],
|
||||
enrichmentFetcher: async () => new Map(),
|
||||
combosFetcher: async () => [],
|
||||
});
|
||||
assert.deepEqual(res, { models: 2, combos: 0 });
|
||||
} finally {
|
||||
restore();
|
||||
}
|
||||
const summary = summaryOf(warns);
|
||||
assert.ok(summary, "expected a catalog refresh summary line");
|
||||
assert.match(summary, /served=2/);
|
||||
assert.match(summary, /default=2/);
|
||||
assert.match(summary, /presets=2/);
|
||||
assert.match(summary, /published=2/);
|
||||
assert.match(summary, /unmatched-free=0/);
|
||||
assert.equal(d.models.size, 2);
|
||||
});
|
||||
|
||||
it("freeOnly with 20 free-tier lines and 4 matched warns 4 of 20", async () => {
|
||||
const d = draft();
|
||||
const overlay = new Map<string, { freeType: "keyless" }>();
|
||||
for (const id of ["m1", "m2", "m3", "m4"]) overlay.set(id, { freeType: "keyless" });
|
||||
for (let i = 0; i < 16; i++) overlay.set(`other-${i}`, { freeType: "keyless" });
|
||||
const { warns, restore } = captureWarns();
|
||||
try {
|
||||
const res = await publishCatalog(
|
||||
d,
|
||||
{ ...baseOpts, freeOnly: true },
|
||||
{
|
||||
fetcher: async () => [{ id: "m1" }, { id: "m2" }, { id: "m3" }, { id: "m4" }],
|
||||
enrichmentFetcher: async () => overlay,
|
||||
combosFetcher: async () => [],
|
||||
}
|
||||
);
|
||||
assert.deepEqual(res, { models: 4, combos: 0 });
|
||||
} finally {
|
||||
restore();
|
||||
}
|
||||
const ratio = warns.find((w) => w.includes("free-tier entries match"));
|
||||
assert.ok(ratio, "expected a free-tier match ratio warning");
|
||||
assert.match(ratio, /4\/20/);
|
||||
const summary = summaryOf(warns);
|
||||
assert.ok(summary, "expected a catalog refresh summary line");
|
||||
assert.match(summary, /unmatched-free=16/);
|
||||
});
|
||||
|
||||
it("freeOnly with an empty overlay keeps the existing warning unchanged", async () => {
|
||||
const d = draft();
|
||||
const { warns, restore } = captureWarns();
|
||||
try {
|
||||
const res = await publishCatalog(
|
||||
d,
|
||||
{ ...baseOpts, freeOnly: true },
|
||||
{
|
||||
fetcher: async () => [{ id: "m1" }, { id: "m2" }],
|
||||
enrichmentFetcher: async () => new Map(),
|
||||
combosFetcher: async () => [],
|
||||
}
|
||||
);
|
||||
assert.deepEqual(res, { models: 0, combos: 0 });
|
||||
} finally {
|
||||
restore();
|
||||
}
|
||||
const existing = warns.find((w) => w.includes("no free-tier entries"));
|
||||
assert.ok(existing, "expected the existing empty-overlay warning");
|
||||
assert.match(existing, /freeOnly is on but the enrichment overlay has no free-tier entries/);
|
||||
assert.ok(
|
||||
!warns.some((w) => w.includes("free-tier entries match")),
|
||||
"no match ratio on an empty overlay"
|
||||
);
|
||||
});
|
||||
|
||||
it("freeOnly with every free-tier line matched stays silent", async () => {
|
||||
const d = draft();
|
||||
const { warns, restore } = captureWarns();
|
||||
try {
|
||||
const res = await publishCatalog(
|
||||
d,
|
||||
{ ...baseOpts, freeOnly: true },
|
||||
{
|
||||
fetcher: async () => [{ id: "m1" }, { id: "m2" }],
|
||||
enrichmentFetcher: async () =>
|
||||
new Map([
|
||||
["m1", { freeType: "keyless" as const }],
|
||||
["m2", { freeType: "keyless" as const }],
|
||||
]),
|
||||
combosFetcher: async () => [],
|
||||
}
|
||||
);
|
||||
assert.deepEqual(res, { models: 2, combos: 0 });
|
||||
} finally {
|
||||
restore();
|
||||
}
|
||||
assert.ok(
|
||||
!warns.some((w) => w.includes("free-tier")),
|
||||
"no free-tier warning when everything matches"
|
||||
);
|
||||
assert.ok(summaryOf(warns), "summary line still emitted");
|
||||
});
|
||||
|
||||
it("freeOnly off emits no free-tier warning", async () => {
|
||||
const d = draft();
|
||||
const { warns, restore } = captureWarns();
|
||||
try {
|
||||
const res = await publishCatalog(d, baseOpts, {
|
||||
fetcher: async () => [{ id: "m1" }],
|
||||
enrichmentFetcher: async () =>
|
||||
new Map([
|
||||
["m1", { freeType: "keyless" as const }],
|
||||
["other", { freeType: "keyless" as const }],
|
||||
]),
|
||||
combosFetcher: async () => [],
|
||||
});
|
||||
assert.deepEqual(res, { models: 1, combos: 0 });
|
||||
} finally {
|
||||
restore();
|
||||
}
|
||||
assert.ok(
|
||||
!warns.some((w) => w.includes("free-tier") || w.includes("freeOnly")),
|
||||
"no free-tier warning when freeOnly is off"
|
||||
);
|
||||
const summary = summaryOf(warns);
|
||||
assert.ok(summary, "summary line still emitted");
|
||||
assert.match(summary, /unmatched-free=1/);
|
||||
});
|
||||
});
|
||||
@@ -188,8 +188,12 @@ describe("catalog fail-open", () => {
|
||||
} finally {
|
||||
console.warn = origWarn;
|
||||
}
|
||||
assert.equal(warns.length, 1);
|
||||
assert.match(warns[0], /combos fetch failed/);
|
||||
assert.equal(warns.filter((w) => /combos fetch failed/.test(w)).length, 1);
|
||||
assert.match(
|
||||
warns.find((w) => /combos fetch failed/.test(w))!,
|
||||
/combos fetch failed/
|
||||
);
|
||||
assert.ok(warns.some((w) => /catalog refresh:/.test(w)));
|
||||
assert.ok(draft.models.has("omniroute/m1"));
|
||||
});
|
||||
|
||||
@@ -214,9 +218,12 @@ describe("catalog fail-open", () => {
|
||||
} finally {
|
||||
console.warn = origWarn;
|
||||
}
|
||||
assert.equal(warns.length, 1);
|
||||
assert.match(warns[0], /combos fetch failed/);
|
||||
assert.match(warns[0], /403/);
|
||||
assert.equal(warns.filter((w) => /combos fetch failed/.test(w)).length, 1);
|
||||
assert.match(
|
||||
warns.find((w) => /combos fetch failed/.test(w))!,
|
||||
/403/
|
||||
);
|
||||
assert.ok(warns.some((w) => /catalog refresh:/.test(w)));
|
||||
assert.ok(draft.models.has("omniroute/m1"));
|
||||
});
|
||||
|
||||
@@ -241,9 +248,12 @@ describe("catalog fail-open", () => {
|
||||
} finally {
|
||||
console.warn = origWarn;
|
||||
}
|
||||
assert.equal(warns.length, 1);
|
||||
assert.match(warns[0], /combos fetch failed/);
|
||||
assert.match(warns[0], /500/);
|
||||
assert.equal(warns.filter((w) => /combos fetch failed/.test(w)).length, 1);
|
||||
assert.match(
|
||||
warns.find((w) => /combos fetch failed/.test(w))!,
|
||||
/500/
|
||||
);
|
||||
assert.ok(warns.some((w) => /catalog refresh:/.test(w)));
|
||||
assert.ok(draft.models.has("omniroute/m1"));
|
||||
});
|
||||
|
||||
@@ -268,8 +278,12 @@ describe("catalog fail-open", () => {
|
||||
} finally {
|
||||
console.warn = origWarn;
|
||||
}
|
||||
assert.equal(warns.length, 1);
|
||||
assert.match(warns[0], /combos fetch failed/);
|
||||
assert.equal(warns.filter((w) => /combos fetch failed/.test(w)).length, 1);
|
||||
assert.match(
|
||||
warns.find((w) => /combos fetch failed/.test(w))!,
|
||||
/combos fetch failed/
|
||||
);
|
||||
assert.ok(warns.some((w) => /catalog refresh:/.test(w)));
|
||||
assert.ok(draft.models.has("omniroute/m1"));
|
||||
});
|
||||
});
|
||||
@@ -306,7 +320,10 @@ describe("catalog combo vs combo", () => {
|
||||
// Under name-based keying the combos publish at their own keys
|
||||
// (`omniroute/Dupe Combo` and `omniroute/Dupe Combo Again`) — they no
|
||||
// longer collide with the model `dupe` at `omniroute/dupe`.
|
||||
assert.equal(warns.length, 0);
|
||||
assert.deepEqual(
|
||||
warns.filter((w) => !/catalog refresh:/.test(w)),
|
||||
[]
|
||||
);
|
||||
const m = draft.models.get("omniroute/dupe");
|
||||
assert.ok(m, "raw model remains at its own key");
|
||||
assert.equal(m?.name, "dupe");
|
||||
@@ -345,14 +362,21 @@ describe("catalog model bare vs combo", () => {
|
||||
// Name-based keying: the combo advertises `Dupe Combo`, so it sits at
|
||||
// `omniroute/Dupe Combo` instead of collapsing onto the raw model's
|
||||
// `omniroute/dupe` key (the accidental-collision class the warn was
|
||||
// written for). Both entries publish, nothing warns.
|
||||
assert.equal(warns.length, 0);
|
||||
// written for). Both entries publish; only the refresh summary warns.
|
||||
assert.deepEqual(
|
||||
warns.filter((w) => !/catalog refresh:/.test(w)),
|
||||
[]
|
||||
);
|
||||
assert.ok(draft.models.get("omniroute/dupe"), "raw model keeps its id key");
|
||||
assert.ok(draft.models.get("omniroute/Dupe Combo"), "combo published under its name");
|
||||
});
|
||||
});
|
||||
|
||||
describe("catalog capability presets", () => {
|
||||
function freeOverlay(ids: string[]): Map<string, { freeType: "keyless" }> {
|
||||
return new Map(ids.map((id) => [id, { freeType: "keyless" as const }]));
|
||||
}
|
||||
|
||||
function captureWarns() {
|
||||
const warns: string[] = [];
|
||||
const origWarn = console.warn;
|
||||
@@ -402,8 +426,12 @@ describe("catalog capability presets", () => {
|
||||
} finally {
|
||||
restore();
|
||||
}
|
||||
assert.equal(warns.length, 1);
|
||||
assert.match(warns[0], /freeOnly.*enrichment|enrichment.*free/i);
|
||||
assert.equal(warns.filter((w) => /freeOnly.*enrichment|enrichment.*free/i.test(w)).length, 1);
|
||||
assert.match(
|
||||
warns.find((w) => /freeOnly.*enrichment|enrichment.*free/i.test(w))!,
|
||||
/freeOnly.*enrichment|enrichment.*free/i
|
||||
);
|
||||
assert.ok(warns.some((w) => /catalog refresh:/.test(w)));
|
||||
});
|
||||
|
||||
it("freeOnly with enrichment disabled publishes nothing", async () => {
|
||||
@@ -422,26 +450,38 @@ describe("catalog capability presets", () => {
|
||||
} finally {
|
||||
restore();
|
||||
}
|
||||
assert.equal(warns.length, 1);
|
||||
assert.match(warns[0], /freeOnly.*enrichment|enrichment.*free/i);
|
||||
assert.equal(warns.filter((w) => /freeOnly.*enrichment|enrichment.*free/i.test(w)).length, 1);
|
||||
assert.match(
|
||||
warns.find((w) => /freeOnly.*enrichment|enrichment.*free/i.test(w))!,
|
||||
/freeOnly.*enrichment|enrichment.*free/i
|
||||
);
|
||||
assert.ok(warns.some((w) => /catalog refresh:/.test(w)));
|
||||
});
|
||||
|
||||
it("freeOnly drops combos without an enrichment entry", async () => {
|
||||
it("freeOnly publishes a combo whose members are all free", async () => {
|
||||
const draft = fakeDraft();
|
||||
const res = await publishCatalog(
|
||||
draft,
|
||||
{ ...baseOpts, freeOnly: true },
|
||||
{
|
||||
fetcher: async () => [{ id: "m1" }],
|
||||
enrichmentFetcher: async () => new Map([["m1", { freeType: "keyless" as const }]]),
|
||||
fetcher: async () => [{ id: "m1" }, { id: "m2" }, { id: "m3" }],
|
||||
enrichmentFetcher: async () => freeOverlay(["m1", "m2", "m3"]),
|
||||
combosFetcher: async () => [
|
||||
{ id: "combo-a", name: "Combo A", models: [{ kind: "model", model: "m1" }] },
|
||||
{
|
||||
id: "combo-a",
|
||||
name: "Combo A",
|
||||
models: [
|
||||
{ kind: "model", model: "m1" } as never,
|
||||
{ kind: "model", model: "m2" } as never,
|
||||
{ kind: "model", model: "m3" } as never,
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
);
|
||||
assert.equal(res.models, 1);
|
||||
assert.equal(res.combos, 0);
|
||||
assert.ok(!draft.models.has("omniroute/Combo A"));
|
||||
assert.equal(res.models, 3);
|
||||
assert.equal(res.combos, 1);
|
||||
assert.ok(draft.models.has("omniroute/Combo A"));
|
||||
});
|
||||
|
||||
it("toolsOnly keeps only tool-calling models", async () => {
|
||||
@@ -605,6 +645,84 @@ describe("catalog capability presets", () => {
|
||||
assert.deepEqual(res, { models: 2, combos: 0 });
|
||||
});
|
||||
|
||||
it("freeOnly drops single-use and retired entries but keeps them without the flag", async () => {
|
||||
async function publishWith(freeOnly: boolean) {
|
||||
const draft = fakeDraft();
|
||||
const res = await publishCatalog(
|
||||
draft,
|
||||
{ ...baseOpts, freeOnly, visibleModels: ["*"] },
|
||||
{
|
||||
fetcher: async () => [{ id: "cf/one-time-m" }, { id: "cf/retired-m" }],
|
||||
enrichmentFetcher: async () =>
|
||||
new Map([
|
||||
["cf/one-time-m", { freeType: "one-time-initial" as const }],
|
||||
["cf/retired-m", { freeType: "discontinued" as const }],
|
||||
]),
|
||||
combosFetcher: async () => [],
|
||||
}
|
||||
);
|
||||
return { draft, res };
|
||||
}
|
||||
const filtered = await publishWith(true);
|
||||
assert.deepEqual(filtered.res, { models: 0, combos: 0 });
|
||||
const unfiltered = await publishWith(false);
|
||||
assert.equal(unfiltered.res.models, 2);
|
||||
assert.match(String(unfiltered.draft.models.get("omniroute/cf/one-time-m")?.name), /one-time/);
|
||||
assert.match(
|
||||
String(unfiltered.draft.models.get("omniroute/cf/retired-m")?.name),
|
||||
/discontinued/
|
||||
);
|
||||
});
|
||||
|
||||
it("freeOnly keeps uncapped entries with a non-empty budget", async () => {
|
||||
const draft = fakeDraft();
|
||||
const res = await publishCatalog(
|
||||
draft,
|
||||
{ ...baseOpts, freeOnly: true, visibleModels: ["*"] },
|
||||
{
|
||||
fetcher: async () => [{ id: "cf/open-m" }],
|
||||
enrichmentFetcher: async () =>
|
||||
new Map([["cf/open-m", { freeType: "recurring-uncapped" as const }]]) as never,
|
||||
combosFetcher: async () => [],
|
||||
}
|
||||
);
|
||||
assert.equal(res.models, 1);
|
||||
assert.match(String(draft.models.get("omniroute/cf/open-m")?.name), /uncapped/);
|
||||
});
|
||||
|
||||
it("freeOnly predicate admits recurring and keyless entries, refuses the rest", async () => {
|
||||
const { passesCapabilityPresets } = await import("../src/capability-presets.js");
|
||||
const { isFreeOnlyFreeType } = (await import("../src/shared/naming.js")) as unknown as {
|
||||
isFreeOnlyFreeType: (v: unknown) => boolean;
|
||||
};
|
||||
const admitted = [
|
||||
"recurring-daily",
|
||||
"recurring-monthly",
|
||||
"recurring-credit",
|
||||
"recurring-uncapped",
|
||||
"keyless",
|
||||
];
|
||||
for (const freeType of admitted) {
|
||||
assert.equal(isFreeOnlyFreeType(freeType), true);
|
||||
assert.equal(
|
||||
passesCapabilityPresets({} as never, { freeType: freeType as never }, { freeOnly: true }),
|
||||
true
|
||||
);
|
||||
}
|
||||
const refused: unknown[] = ["one-time-initial", "discontinued", "some-future-type", undefined];
|
||||
for (const freeType of refused) {
|
||||
assert.equal(isFreeOnlyFreeType(freeType), false);
|
||||
assert.equal(
|
||||
passesCapabilityPresets(
|
||||
{} as never,
|
||||
freeType === undefined ? undefined : ({ freeType: freeType as never } as never),
|
||||
{ freeOnly: true }
|
||||
),
|
||||
false
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
it("presets shrink a large stub catalog below threshold", async () => {
|
||||
const stubModels = async () =>
|
||||
Array.from({ length: 4000 }, (_, i) => ({
|
||||
|
||||
@@ -62,3 +62,31 @@ describe("the enrichment overlay reaches the picker", () => {
|
||||
assert.equal(m.cost.output, 15);
|
||||
});
|
||||
});
|
||||
|
||||
describe("free budget under alias and without cap", () => {
|
||||
it("renders the budget of an alias-served model", () => {
|
||||
const m = applyEnrichment(model("cf/@cf/meta/llama-3.3-70b-instruct-fp8-fast"), {
|
||||
name: "Llama 3.3 70B",
|
||||
providerDisplayName: "Cloudflare",
|
||||
providerAlias: "cf",
|
||||
freeType: "recurring-monthly" as const,
|
||||
monthlyTokens: 1_000_000,
|
||||
});
|
||||
assert.equal(m.name, "[Free] Cloudflare - Llama 3.3 70B · 1M tokens/month");
|
||||
});
|
||||
|
||||
it("renders the uncapped label with no counters", () => {
|
||||
const m = applyEnrichment(model("cf/open-m"), {
|
||||
name: "Open Model",
|
||||
providerDisplayName: "Cloudflare",
|
||||
providerAlias: "cf",
|
||||
freeType: "recurring-uncapped" as const,
|
||||
});
|
||||
assert.match(m.name, /\(uncapped\)/);
|
||||
});
|
||||
|
||||
it("renders nothing extra when the budget is unknown", () => {
|
||||
const m = applyEnrichment(model("cf/open-m"), { name: "Open Model" });
|
||||
assert.ok(!m.name.includes("·"));
|
||||
});
|
||||
});
|
||||
|
||||
@@ -4,6 +4,7 @@ import {
|
||||
applyEnrichment,
|
||||
buildCanonicalToAliasMap,
|
||||
canonicalDedupSet,
|
||||
countFreeTierMatch,
|
||||
lookupEnrichment,
|
||||
type OmniRouteEnrichmentMap,
|
||||
} from "../src/shared/enrich.js";
|
||||
@@ -45,3 +46,26 @@ describe("canonicalDedupSet", () => {
|
||||
assert.ok(!drop.has("cc/model-x"));
|
||||
});
|
||||
});
|
||||
|
||||
describe("countFreeTierMatch", () => {
|
||||
it("counts free-tier lines the served ids reach", () => {
|
||||
const overlay: OmniRouteEnrichmentMap = new Map([
|
||||
["m1", { freeType: "keyless" as const }],
|
||||
["other", { freeType: "keyless" as const }],
|
||||
]);
|
||||
const match = countFreeTierMatch(["m1"], overlay, new Map());
|
||||
assert.deepEqual(match, { total: 2, matched: 1, unmatched: 1 });
|
||||
});
|
||||
|
||||
it("resolves matches through the alias fallback chain", () => {
|
||||
const overlay: OmniRouteEnrichmentMap = new Map([
|
||||
["cc/model-x", { freeType: "keyless" as const }],
|
||||
["other", { freeType: "keyless" as const }],
|
||||
]);
|
||||
const canonicalToAlias = buildCanonicalToAliasMap(
|
||||
new Map([["cc/model-x", { providerAlias: "cc", providerCanonical: "claude" }]])
|
||||
);
|
||||
const match = countFreeTierMatch(["claude/model-x"], overlay, canonicalToAlias);
|
||||
assert.deepEqual(match, { total: 2, matched: 1, unmatched: 1 });
|
||||
});
|
||||
});
|
||||
|
||||
@@ -123,3 +123,145 @@ describe("defaultOmniRouteEnrichmentFetcher", () => {
|
||||
assert.equal(map.size, 0);
|
||||
});
|
||||
});
|
||||
|
||||
describe("free-tier canonical fan-out", () => {
|
||||
const modelsBody = {
|
||||
cf: {
|
||||
id: "cloudflare-ai",
|
||||
alias: "cf",
|
||||
name: "Cloudflare",
|
||||
models: [{ id: "@cf/meta/llama-3.3-70b-instruct-fp8-fast", name: "Llama 3.3 70B" }],
|
||||
},
|
||||
};
|
||||
|
||||
function fetchFor(perModel: unknown[]): typeof fetch {
|
||||
return (async (url: unknown) => {
|
||||
const href = String(url);
|
||||
const body = href.endsWith("/api/pricing/models")
|
||||
? modelsBody
|
||||
: href.endsWith("/api/pricing")
|
||||
? {}
|
||||
: { perModel };
|
||||
return { ok: true, status: 200, statusText: "OK", json: async () => body };
|
||||
}) as unknown as typeof fetch;
|
||||
}
|
||||
|
||||
it("stamps the canonical freeType and budgets on every namespaced key of the provider", async () => {
|
||||
const origFetch = globalThis.fetch;
|
||||
globalThis.fetch = fetchFor([
|
||||
{
|
||||
provider: "cloudflare-ai",
|
||||
modelId: "@cf/meta/llama-3.3-70b-instruct-fp8-fast",
|
||||
freeType: "recurring-monthly",
|
||||
monthlyTokens: 1_000_000,
|
||||
creditTokens: 0,
|
||||
},
|
||||
]);
|
||||
try {
|
||||
const map = await defaultOmniRouteEnrichmentFetcher("https://gw.example.com", "k", 1000);
|
||||
const namespaced = map.get("cf/@cf/meta/llama-3.3-70b-instruct-fp8-fast");
|
||||
assert.equal(namespaced?.freeType, "recurring-monthly");
|
||||
assert.equal(namespaced?.monthlyTokens, 1_000_000);
|
||||
} finally {
|
||||
globalThis.fetch = origFetch;
|
||||
}
|
||||
});
|
||||
|
||||
it("stamps the alias-served key built from the canonical provider entry", async () => {
|
||||
const origFetch = globalThis.fetch;
|
||||
globalThis.fetch = fetchFor([
|
||||
{
|
||||
provider: "cloudflare-ai",
|
||||
modelId: "@cf/meta/llama-3.3-70b-instruct-fp8-fast",
|
||||
freeType: "recurring-monthly",
|
||||
monthlyTokens: 1_000_000,
|
||||
},
|
||||
]);
|
||||
try {
|
||||
const map = await defaultOmniRouteEnrichmentFetcher("https://gw.example.com", "k", 1000);
|
||||
assert.equal(
|
||||
map.get("cf/@cf/meta/llama-3.3-70b-instruct-fp8-fast")?.freeType,
|
||||
"recurring-monthly"
|
||||
);
|
||||
} finally {
|
||||
globalThis.fetch = origFetch;
|
||||
}
|
||||
});
|
||||
|
||||
it("leaves the homonym of another provider unstamped", async () => {
|
||||
const origFetch = globalThis.fetch;
|
||||
globalThis.fetch = (async (url: unknown) => {
|
||||
const href = String(url);
|
||||
const body = href.endsWith("/api/pricing/models")
|
||||
? {
|
||||
cf: {
|
||||
id: "cloudflare-ai",
|
||||
alias: "cf",
|
||||
name: "Cloudflare",
|
||||
models: [{ id: "shared-model", name: "Shared" }],
|
||||
},
|
||||
xx: {
|
||||
id: "other-provider",
|
||||
alias: "xx",
|
||||
name: "Other",
|
||||
models: [{ id: "shared-model", name: "Shared" }],
|
||||
},
|
||||
}
|
||||
: href.endsWith("/api/pricing")
|
||||
? {}
|
||||
: {
|
||||
perModel: [
|
||||
{ provider: "cloudflare-ai", modelId: "shared-model", freeType: "keyless" },
|
||||
],
|
||||
};
|
||||
return { ok: true, status: 200, statusText: "OK", json: async () => body };
|
||||
}) as unknown as typeof fetch;
|
||||
try {
|
||||
const map = await defaultOmniRouteEnrichmentFetcher("https://gw.example.com", "k", 1000);
|
||||
assert.equal(map.get("cf/shared-model")?.freeType, "keyless");
|
||||
assert.equal(map.get("xx/shared-model")?.freeType, undefined);
|
||||
assert.equal(map.get("shared-model")?.providerCanonical, "cloudflare-ai");
|
||||
} finally {
|
||||
globalThis.fetch = origFetch;
|
||||
}
|
||||
});
|
||||
|
||||
it("stamps once when alias equals canonical", async () => {
|
||||
const origFetch = globalThis.fetch;
|
||||
globalThis.fetch = (async (url: unknown) => {
|
||||
const href = String(url);
|
||||
const body = href.endsWith("/api/pricing/models")
|
||||
? {
|
||||
kiro: {
|
||||
id: "kiro",
|
||||
alias: "kiro",
|
||||
name: "Kiro",
|
||||
models: [{ id: "m1", name: "Model One" }],
|
||||
},
|
||||
}
|
||||
: href.endsWith("/api/pricing")
|
||||
? {}
|
||||
: { perModel: [{ provider: "kiro", modelId: "m1", freeType: "keyless" }] };
|
||||
return { ok: true, status: 200, statusText: "OK", json: async () => body };
|
||||
}) as unknown as typeof fetch;
|
||||
try {
|
||||
const map = await defaultOmniRouteEnrichmentFetcher("https://gw.example.com", "k", 1000);
|
||||
assert.equal(map.get("kiro/m1")?.freeType, "keyless");
|
||||
} finally {
|
||||
globalThis.fetch = origFetch;
|
||||
}
|
||||
});
|
||||
|
||||
it("ignores a free-tier line without provider", async () => {
|
||||
const origFetch = globalThis.fetch;
|
||||
globalThis.fetch = fetchFor([
|
||||
{ provider: "", modelId: "@cf/meta/llama-3.3-70b-instruct-fp8-fast", freeType: "keyless" },
|
||||
]);
|
||||
try {
|
||||
const map = await defaultOmniRouteEnrichmentFetcher("https://gw.example.com", "k", 1000);
|
||||
assert.equal(map.get("cf/@cf/meta/llama-3.3-70b-instruct-fp8-fast")?.freeType, undefined);
|
||||
} finally {
|
||||
globalThis.fetch = origFetch;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { describe, it } from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import { createLogger, getLogLevel } from "../src/shared/logger.js";
|
||||
import { createLogger, getLogLevel, setHostSink } from "../src/shared/logger.js";
|
||||
|
||||
function capture(): {
|
||||
warns: string[];
|
||||
@@ -127,4 +127,86 @@ describe("shared leveled logger (v1 parity)", () => {
|
||||
assert.equal(cap.warns.length, 1);
|
||||
assert.match(cap.warns[0], /breadcrumb/);
|
||||
});
|
||||
|
||||
it("host sink receives the line in addition to the console", () => {
|
||||
const log = createLogger("warn");
|
||||
const cap = capture();
|
||||
const seen: Array<{ level: string; message: string }> = [];
|
||||
setHostSink((level, message) => {
|
||||
seen.push({ level, message });
|
||||
});
|
||||
try {
|
||||
log.warn("hello sink");
|
||||
} finally {
|
||||
setHostSink(undefined);
|
||||
cap.restore();
|
||||
}
|
||||
assert.equal(cap.warns.length, 1);
|
||||
assert.equal(seen.length, 1);
|
||||
assert.equal(seen[0].level, "warn");
|
||||
assert.match(seen[0].message, /hello sink/);
|
||||
});
|
||||
|
||||
it("host sink respects the logger level", () => {
|
||||
const log = createLogger("error");
|
||||
const cap = capture();
|
||||
const seen: string[] = [];
|
||||
setHostSink((level, message) => {
|
||||
seen.push(`${level}:${message}`);
|
||||
});
|
||||
try {
|
||||
log.warn("suppressed");
|
||||
log.error("loud");
|
||||
} finally {
|
||||
setHostSink(undefined);
|
||||
cap.restore();
|
||||
}
|
||||
assert.deepEqual(seen.length, 1);
|
||||
assert.match(seen[0], /loud/);
|
||||
});
|
||||
|
||||
it("a throwing host sink traces once on the console then stays silent", () => {
|
||||
const log = createLogger("warn");
|
||||
const cap = capture();
|
||||
let calls = 0;
|
||||
setHostSink(() => {
|
||||
calls += 1;
|
||||
throw new Error("sink down");
|
||||
});
|
||||
try {
|
||||
log.warn("first");
|
||||
log.warn("second");
|
||||
} finally {
|
||||
setHostSink(undefined);
|
||||
cap.restore();
|
||||
}
|
||||
assert.equal(calls, 1);
|
||||
assert.equal(cap.warns.length, 3);
|
||||
assert.match(cap.warns[1], /host log sink failed/);
|
||||
});
|
||||
|
||||
it("resetting the sink clears the failure marker for the next receiver", () => {
|
||||
const log = createLogger("warn");
|
||||
const cap = capture();
|
||||
setHostSink(() => {
|
||||
throw new Error("sink down");
|
||||
});
|
||||
const seen: string[] = [];
|
||||
try {
|
||||
log.warn("first");
|
||||
} finally {
|
||||
setHostSink(undefined);
|
||||
}
|
||||
setHostSink((_level, message) => {
|
||||
seen.push(message);
|
||||
});
|
||||
try {
|
||||
log.warn("second");
|
||||
} finally {
|
||||
setHostSink(undefined);
|
||||
cap.restore();
|
||||
}
|
||||
assert.equal(seen.length, 1);
|
||||
assert.match(seen[0], /second/);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -49,11 +49,15 @@ test("formatFreeBudget: missing token/credit counts default to 0", () => {
|
||||
assert.equal(formatFreeBudget({ freeType: "recurring-daily" }), "0 tokens/day");
|
||||
});
|
||||
|
||||
test("formatFreeBudget: unrecognised freeType falls through to the default branch", () => {
|
||||
test("formatFreeBudget: unknown future value renders its own name, never empty", () => {
|
||||
// `freeType` is populated from catalog data at runtime, so a value the
|
||||
// build doesn't know about is reachable even though TypeScript treats the
|
||||
// `default:` arm as dead code for a well-typed caller.
|
||||
assert.equal(formatFreeBudget({ freeType: "some-future-type" as FreeModelFreeType }), "");
|
||||
// `default:` arm as dead code for a well-typed caller. The picker shows
|
||||
// the value itself instead of an empty suffix.
|
||||
assert.equal(
|
||||
formatFreeBudget({ freeType: "some-future-type" as FreeModelFreeType }),
|
||||
"(some-future-type)"
|
||||
);
|
||||
});
|
||||
|
||||
test("formatFreeBudget: sub-1K token count is not abbreviated", () => {
|
||||
@@ -73,3 +77,10 @@ test("formatFreeBudget: the 999_999 rounding wart is fixed — promotes to 1M",
|
||||
"1M tokens/day"
|
||||
);
|
||||
});
|
||||
|
||||
test("formatFreeBudget: uncapped budget has no counters, label only", () => {
|
||||
assert.equal(
|
||||
formatFreeBudget({ freeType: "recurring-uncapped" as FreeModelFreeType }),
|
||||
"(uncapped)"
|
||||
);
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# ── Multi-stage Dockerfile for Native Bun Runtime (web-latest-bun) ───────────
|
||||
FROM oven/bun:1.4.2-slim AS base
|
||||
FROM oven/bun:1.4.3-slim AS base
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update \
|
||||
@@ -56,7 +56,7 @@ ENV NODE_ENV=production
|
||||
RUN bun run --quiet build
|
||||
|
||||
# ── Runner Base stage (100% Bun Native Production Runtime) ──────────────────
|
||||
FROM oven/bun:1.4.2-slim AS runner-base
|
||||
FROM oven/bun:1.4.3-slim AS runner-base
|
||||
|
||||
LABEL org.opencontainers.image.title="omniroute" \
|
||||
org.opencontainers.image.description="Unified AI proxy — route any LLM through one endpoint (Bun Native)" \
|
||||
|
||||
@@ -594,7 +594,7 @@ the current catalog at **[radar.omniroute.online/planos](https://radar.omniroute
|
||||
- **🖼️ New endpoints** — `/v1/ocr` (Mistral OCR) and `/v1/audio/translations` (Whisper-style) round out the media surface. → [API Reference](docs/reference/API_REFERENCE.md)
|
||||
- **🎨 Image / video / audio generation** — one API for media: xAI Grok Imagine & Novita AI video, ComfyUI, Magnific, Adobe Firefly, Segmind, and speech providers such as ElevenLabs. → [API Reference](docs/reference/API_REFERENCE.md)
|
||||
- **🌍 Deployment & ops** — reverse-proxy `basePath`, browser-language auto-detect, per-key device tracking, root-less MITM trust, zh-TW localization. → [Environment](docs/reference/ENVIRONMENT.md)
|
||||
- **🤝 More providers & agents** — cloud agents (Codex Cloud, Cursor, Devin, Jules), Grok Build (xAI) with browser + OAuth login, Ollama first-class card, Claude Opus 5 & Sonnet 5, Kimi official partnership (Code/Web/Moonshot), Zed, Requesty, SenseNova, Yuanbao, Agnes AI… and a refreshed **352-provider catalog**. → [Providers](docs/reference/PROVIDER_REFERENCE.md)
|
||||
- **🤝 More providers & agents** — cloud agents (Codex Cloud, Cursor, Devin, Jules), Grok Build (xAI) with browser + OAuth login, Ollama first-class card, Claude Opus 5 & Sonnet 5, Kimi official partnership (Code/Web/Moonshot), Zed, Requesty, SenseNova, Yuanbao, Agnes AI… and a refreshed **372-provider catalog**. → [Providers](docs/reference/PROVIDER_REFERENCE.md)
|
||||
- **📡 Routing transparency** — every response carries an `X-OmniRoute-Decision` header naming the strategy/provider/latency that served it, a new `cache-optimized` combo strategy + Auto-Combo `cacheAffinity` factor route repeat requests back to the connection holding the cached prefix, and a read-only `/v1/auto-combo/{channel}/candidates` endpoint exposes an `auto/*` channel's live candidate pool. → [Auto-Combo](docs/routing/AUTO-COMBO.md)
|
||||
- **⚡ Local performance & infra** — one-click local Redis, Cloudflare Workers / Deno Deploy relay deployers, Bifrost & Mux as supervised embedded services. → [Embedded Services](docs/frameworks/EMBEDDED-SERVICES.md)
|
||||
- **🧩 Also in the box** — plugin framework + marketplace, Omni/Agent/GitHub skills frameworks, Obsidian vault integration (22 MCP tools), OpenAI-compatible Batch & Files APIs, semantic response cache, gamification with leaderboards, ACP agent discovery (15 built-in agents), scheduled log export to BigQuery, `auto/chaos` parallel multi-model fan-out, a Telegram bot bridge, an in-app version manager and LMArena-ELO free-provider rankings. → [Docs](docs/README.md)
|
||||
|
||||
1
changelog.d/fixes/0000-cli-keys-skill-sync.md
Normal file
1
changelog.d/fixes/0000-cli-keys-skill-sync.md
Normal file
@@ -0,0 +1 @@
|
||||
- Synchronize the generated CLI key-policy skill with the existing model-access flags and guard its registry parity with a regression test.
|
||||
1
changelog.d/fixes/0000-windows-cmd-spawn-einval.md
Normal file
1
changelog.d/fixes/0000-windows-cmd-spawn-einval.md
Normal file
@@ -0,0 +1 @@
|
||||
- **fix(ci):** `check-api-typecheck`, `check-dashboard-typecheck` and `check-open-sse-typecheck` now run tsc through `runBuildTool()` instead of spawning `npx.cmd` without a shell, which Node refuses on Windows (EINVAL), so the three gates crashed there before checking anything. `ensure-native-sqlite` runs `npm.cmd rebuild` through the shell on Windows instead of always reporting a failed rebuild. `runBuildTool()` now returns the tool's stdout.
|
||||
1
changelog.d/fixes/13205-provider-count-claims.md
Normal file
1
changelog.d/fixes/13205-provider-count-claims.md
Normal file
@@ -0,0 +1 @@
|
||||
- Validate every aggregate provider-count claim across the main documentation and provider skills, and refresh stale references to the measured catalog total (#13205).
|
||||
@@ -0,0 +1 @@
|
||||
- **test(api, oauth):** two unit tests now follow behavior that already landed. The `messages/count_tokens` provider-count case expects `claude-opus-4-6`, the dashed id that #16425 sends to the Anthropic Messages API, instead of `claude-opus-4.6`. The Antigravity OAuth enrichment case pins the IDE version cache to `ANTIGRAVITY_IDE_FALLBACK_VERSION` and builds its User-Agent pattern from that constant. It was still matching `2.1.1` after #16512 moved the fallback to `2.5.5`, so `loadCodeAssist` failed its mock and `projectId` came back empty. Clears two v3.8.52 base-reds (#15306) — thanks @shipsfromrio
|
||||
1
changelog.d/fixes/16086-kiro-gpt56-1m-context.md
Normal file
1
changelog.d/fixes/16086-kiro-gpt56-1m-context.md
Normal file
@@ -0,0 +1 @@
|
||||
- **fix(providers):** Kiro GPT-5.6 Sol/Terra/Luna use the 1M-token context window Kiro rolled out on 2026-09-14, so usage derived from `contextUsagePercentage` is no longer under-reported ~3.7x ([#16086](https://github.com/diegosouzapw/OmniRoute/pull/16086)) — thanks @thotypous
|
||||
1
changelog.d/fixes/16463-utilization-tightest-window.md
Normal file
1
changelog.d/fixes/16463-utilization-tightest-window.md
Normal file
@@ -0,0 +1 @@
|
||||
- **fix(dashboard):** the Utilization page now plots the tightest quota window of each bucket (one point per provider or connection) instead of an arbitrary window, so an exhausted weekly window is no longer hidden behind a half-full session window ([#16463](https://github.com/diegosouzapw/OmniRoute/pull/16463)) — thanks @tiagolabsit
|
||||
1
changelog.d/fixes/16514-h2c-upgrade-http1-fallback.md
Normal file
1
changelog.d/fixes/16514-h2c-upgrade-http1-fallback.md
Normal file
@@ -0,0 +1 @@
|
||||
- **fix(server):** requests that offer a cleartext `Upgrade: h2c` (the JDK `HttpClient` used by JetBrains IDEs / Air, among others) are now answered in HTTP/1.1 instead of having the connection dropped with "HTTP/1.1 header parser received no bytes"; WebSocket upgrades and TLS connections are untouched ([#16514](https://github.com/diegosouzapw/OmniRoute/pull/16514)) — thanks @tiagolabsit
|
||||
@@ -0,0 +1 @@
|
||||
- **fix(domain):** combo health and combo forecast skip quota windows the upstream did not report a fraction for (`fractionReported: false`, e.g. Antigravity's `chat_*` windows) instead of reading their stored placeholder as 0% remaining, which showed healthy providers at 0% and raised `target_low_quota` ([#16546](https://github.com/diegosouzapw/OmniRoute/pull/16546)) — thanks @AndresDiagoM
|
||||
1
changelog.d/fixes/16574-antigravity-pricing.md
Normal file
1
changelog.d/fixes/16574-antigravity-pricing.md
Normal file
@@ -0,0 +1 @@
|
||||
- **fix(pricing):** Antigravity and Antigravity CLI connections price every model they serve (Gemini 4 Argon, Gemini 3.8 Flash, Claude 5.5, Flash-Lite, and the existing Pro/Claude 4.6/GPT-OSS rows that were only under the legacy `ag` key), so a single call no longer fail-closes a per-key USD quota ([#16574](https://github.com/diegosouzapw/OmniRoute/pull/16574))
|
||||
1
changelog.d/fixes/16583-codex-sunburst-image-edit.md
Normal file
1
changelog.d/fixes/16583-codex-sunburst-image-edit.md
Normal file
@@ -0,0 +1 @@
|
||||
- **fix(providers):** Codex `gpt-image-2.5-sunburst` is registered as a Codex image model, so reference-image edits reach the dedicated Codex Images edits route instead of returning 400, and Sunburst appears in the image catalog next to Flare ([#16583](https://github.com/diegosouzapw/OmniRoute/issues/16583))
|
||||
1
changelog.d/fixes/16591-streaming-nested-cache-cost.md
Normal file
1
changelog.d/fixes/16591-streaming-nested-cache-cost.md
Normal file
@@ -0,0 +1 @@
|
||||
- **fix(usage):** apply cached-input pricing to translated streaming usage in the spend ledger and shared-quota USD recorder, preserving nested cache-write and reasoning details ([#16591](https://github.com/diegosouzapw/OmniRoute/pull/16591)) — fixes [#16590](https://github.com/diegosouzapw/OmniRoute/issues/16590)
|
||||
1
changelog.d/fixes/16592-env-doc-sync-windows-scan.md
Normal file
1
changelog.d/fixes/16592-env-doc-sync-windows-scan.md
Normal file
@@ -0,0 +1 @@
|
||||
- **fix(ci):** scan `process.env` references with Node so env-doc-sync works on Windows ([#16592](https://github.com/diegosouzapw/OmniRoute/pull/16592)) — thanks @shipsfromrio.
|
||||
@@ -0,0 +1 @@
|
||||
- **fix(providers):** Preserve Claude text following tool results in Gemini function responses, avoiding mixed turns rejected by Vertex Gemini Flash ([#16443](https://github.com/diegosouzapw/OmniRoute/issues/16443) — thanks @christianjgilman).
|
||||
@@ -0,0 +1 @@
|
||||
- **fix(modelDiscovery):** upstream OpenAI-compatible `/models` rows that advertise snake_case `context_window`, `max_context_window_tokens`, `context_window_tokens`, or a boolean `vision` flag now map onto `inputTokenLimit` / `supportsVision` ([#16610](https://github.com/diegosouzapw/OmniRoute/pull/16610)) — thanks @cmbergamo.
|
||||
@@ -0,0 +1 @@
|
||||
- **fix(translator):** keep the developer role for OpenAI targets that accept it (openai, azure-openai, azure) instead of always lowering it to system, so the per-model `preserveOpenAIDeveloperRole` toggle takes effect; custom `openai-compatible-*` nodes and `github` keep `system` unless opted in ([#16715](https://github.com/diegosouzapw/OmniRoute/pull/16715)) — thanks @semihisikman
|
||||
1
changelog.d/fixes/16752-sliced-string-heap-retention.md
Normal file
1
changelog.d/fixes/16752-sliced-string-heap-retention.md
Normal file
@@ -0,0 +1 @@
|
||||
- **fix(usage):** stop bounded log/quota previews from retaining whole request bodies — `truncateLogString` (`open-sse/utils/requestLogger.ts`) and `truncatePreviewString` (`src/lib/usage/usageHistory/helpers.ts`) built their result from `String#slice()`, which V8 can represent as a `SlicedString` whose parent is the entire multi-megabyte source. Any retained 64 KB / 1200-char preview therefore kept the full request body alive. Both now flatten the result (Buffer round-trip), matching the `structuredClone` guard the completed-details path already uses. A cut that would keep a trailing high surrogate is shortened by one code unit first, so the round-trip does not replace a split pair with U+FFFD.
|
||||
1
changelog.d/fixes/16775-free-only-free-status.md
Normal file
1
changelog.d/fixes/16775-free-only-free-status.md
Normal file
@@ -0,0 +1 @@
|
||||
- **fix(plugin):** `freeOnly` now publishes the free-tier models actually served (alias and canonical keys share the provider free status and budget), keeps single-use credits and retired models visible only without the preset, and labels uncapped budgets `(uncapped)` instead of an empty suffix ([#16775](https://github.com/diegosouzapw/OmniRoute/pull/16775)) — thanks @maxmad64bis
|
||||
1
changelog.d/fixes/16779-presets-apply-whole-catalog.md
Normal file
1
changelog.d/fixes/16779-presets-apply-whole-catalog.md
Normal file
@@ -0,0 +1 @@
|
||||
- **fix(plugin):** publish preset-passing entries and member-passing combos ([#16779](https://github.com/diegosouzapw/OmniRoute/pull/16779)) — thanks @maxmad64bis
|
||||
@@ -0,0 +1 @@
|
||||
- **fix(plugin):** plugin warnings now reach the host log, each refresh logs a stage summary, and the `freeOnly` warning counts unmatched free-tier lines ([#16785](https://github.com/diegosouzapw/OmniRoute/pull/16785)) — thanks @maxmad64bis
|
||||
@@ -0,0 +1,2 @@
|
||||
- **fix(sse):** key resource-pressure runtime singleton on globalThis to survive duplicated bundle copies ([#PRNUM](https://github.com/diegosouzapw/OmniRoute/pull/PRNUM))
|
||||
- **test:** harden messages-route memory profiler against orphaned heap snapshots ([#PRNUM](https://github.com/diegosouzapw/OmniRoute/pull/PRNUM))
|
||||
1
changelog.d/fixes/bare-model-default-only-placeholder.md
Normal file
1
changelog.d/fixes/bare-model-default-only-placeholder.md
Normal file
@@ -0,0 +1 @@
|
||||
- **fix(routing):** a connection's `defaultModel` (`resolveBareModelToConnectionDefault`, added in #4825) now only replaces a placeholder bare model (`auto` or empty); a concrete bare name such as `claude-haiku-4-5` is no longer silently swapped for another provider's default. `BARE_MODEL_DEFAULT_OVERRIDE_LEGACY=true` restores the old behaviour.
|
||||
@@ -0,0 +1 @@
|
||||
- **perf(sse):** context estimation measures structured bodies in a single pass without building the media-substituted placeholder tree, and target-driven image pruning applies exact per-image deltas instead of re-estimating the full history before every removal; pruning measured 3.7-4.4x faster on 24-100 image histories with estimates byte-identical (own `__proto__` keys now match JSON.stringify instead of being undercounted) ([#16278](https://github.com/diegosouzapw/OmniRoute/pull/16278))
|
||||
@@ -1561,11 +1561,6 @@
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/lib/usage/costCalculator.ts": {
|
||||
"no-restricted-syntax": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/lib/usage/fetcher.ts": {
|
||||
"@typescript-eslint/no-unused-vars": {
|
||||
"count": 7
|
||||
|
||||
@@ -488,7 +488,7 @@ open-sse/
|
||||
(shared identity helper) and `index.ts` (registry).
|
||||
|
||||
> Note: providers not listed here are served by `default.ts` using the generic
|
||||
> OpenAI-compatible executor. The full provider catalog (355 providers) lives in
|
||||
> OpenAI-compatible executor. The full provider catalog (372 providers) lives in
|
||||
> `src/shared/constants/providers.ts`.
|
||||
|
||||
### 4.3 `open-sse/translator/`
|
||||
|
||||
@@ -241,7 +241,7 @@ src/
|
||||
|
||||
| Module | Purpose |
|
||||
| -------------------------------- | ---------------------------------------------------------------------- |
|
||||
| `constants/providers.ts` | **355 providers** with Zod validation (source of truth) |
|
||||
| `constants/providers.ts` | **372 providers** with Zod validation (source of truth) |
|
||||
| `constants/cliTools.ts` | External CLI tool registry |
|
||||
| `constants/routingStrategies.ts` | **19 routing strategies** with priorities |
|
||||
| `constants/publicApiRoutes.ts` | Routes that require Bearer (vs management) auth |
|
||||
@@ -398,7 +398,7 @@ open-sse/
|
||||
| `CLI-TOOLS.md` | External CLI integrations + Internal OmniRoute CLI |
|
||||
| `I18N.md` | i18n architecture, adding a language, 42 locales |
|
||||
| `UNINSTALL.md` | Clean uninstall steps |
|
||||
| `PROVIDER_REFERENCE.md` | **Auto-generated** catalog of 355 providers (regen: `npm run gen:provider-reference`) |
|
||||
| `PROVIDER_REFERENCE.md` | **Auto-generated** catalog of 372 providers (regen: `npm run gen:provider-reference`) |
|
||||
|
||||
### Subsystem deep-dives
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ Objective feature comparison vs popular open-source AI routers.
|
||||
|
||||
## When to choose OmniRoute
|
||||
|
||||
- You self-host and want **maximum provider coverage** (329 providers, 155 free/no-auth catalog entries)
|
||||
- You self-host and want **maximum provider coverage** (372 providers, 155 free/no-auth catalog entries)
|
||||
- You need a **built-in MCP server** (LLM tools, memory, skills exposed as tools)
|
||||
- You need **A2A protocol** for agent-to-agent workflows
|
||||
- You want **fingerprint stealth** (JA3/JA4) to avoid detection by upstream CAPTCHAs
|
||||
|
||||
@@ -150,7 +150,7 @@ OmniRoute exposes 6 A2A skills wired in `src/lib/a2a/taskExecution.ts::A2A_SKILL
|
||||
| Health Report | `health-report` | Aggregates circuit breaker, cooldown, lockout state per provider | health, resilience | "Show health status of all providers" |
|
||||
| List Capabilities | `list-capabilities` | Returns the full 45-entry Agent Skills catalog (23 API + 21 CLI + 1 config) as a markdown table with raw SKILL.md URLs for context injection | catalog, discovery, skills | "List all OmniRoute capabilities" |
|
||||
|
||||
> The Agent Card should be kept aligned with the live 352-provider catalog; provider counts and free/no-auth metadata are sourced from the runtime registry.
|
||||
> The Agent Card should be kept aligned with the live 372-provider catalog; provider counts and free/no-auth metadata are sourced from the runtime registry.
|
||||
|
||||
### `list-capabilities` Skill Detail
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ When an IDE agent (e.g., GitHub Copilot, Cursor, Claude Code) makes an API call,
|
||||
|
||||
This means you can:
|
||||
|
||||
- **Reroute any agent to any provider**: Copilot talking to OpenAI? Redirect it to Anthropic Claude, Gemini, or any of OmniRoute's 352 providers.
|
||||
- **Reroute any agent to any provider**: Copilot talking to OpenAI? Redirect it to Anthropic Claude, Gemini, or any of OmniRoute's 372 providers.
|
||||
- **Apply model mappings**: `gemini-3-flash` → `claude-sonnet-4.7` transparently at the handler level.
|
||||
- **Observe all agent traffic**: every intercepted request is published to the [Traffic Inspector](./TRAFFIC_INSPECTOR.md).
|
||||
- **Apply OmniRoute resilience**: combo routing, circuit breakers, fallbacks, and cost tracking work for IDE agent traffic too.
|
||||
|
||||
@@ -487,7 +487,7 @@ This handles:
|
||||
|
||||
| File | Purpose |
|
||||
| ----------------------------- | ------------------------------------------------- |
|
||||
| `providerRegistry.ts` | Chat-model registry over the 352-provider catalog |
|
||||
| `providerRegistry.ts` | Chat-model registry over the 372-provider catalog |
|
||||
| `providerModels.ts` | Model aliases, format mapping |
|
||||
| `constants.ts` | Timeouts, limits, status codes |
|
||||
| `defaultThinkingSignature.ts` | Default Claude thinking signature |
|
||||
|
||||
@@ -15,7 +15,7 @@ lastUpdated: 2026-08-02
|
||||
|
||||
## What It Is
|
||||
|
||||
OmniRoute registers 329 providers, including 155 catalog entries marked **free/no-auth**
|
||||
OmniRoute registers 372 providers, including 155 catalog entries marked **free/no-auth**
|
||||
(no-auth,
|
||||
free-tier OAuth, or free-tier API key — see the
|
||||
[Free Tiers Guide](../getting-started/FREE-TIERS-GUIDE.md) and the full
|
||||
|
||||
@@ -127,11 +127,16 @@ Set `"geminiSanitization": false` to turn it off.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
| Symptom | Cause |
|
||||
| ------------------------------------- | -------------------------------------------------------------------------------------------------------- |
|
||||
| Picker shows no OmniRoute model | No key resolved (check the startup warning), or the gateway is unreachable |
|
||||
| Raw model ids, no combos, no pricing | The management endpoints refused the token — set `managementReadToken` |
|
||||
| A session pinned to `opencode-<id>/…` | The v1 plugin published `opencode-<id>`; v2 publishes `<id>` bare, so re-select the model under `<id>/…` |
|
||||
| Symptom | Cause |
|
||||
| ------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
|
||||
| Picker shows no OmniRoute model | No key resolved (check the startup warning), or the gateway is unreachable |
|
||||
| Raw model ids, no combos, no pricing | The management endpoints refused the token — set `managementReadToken` |
|
||||
| Short or empty `freeOnly` catalog | No management token or a refused token — read the refresh summary line (`unmatched-free` count) in the host log |
|
||||
| A session pinned to `opencode-<id>/…` | The v1 plugin published `opencode-<id>`; v2 publishes `<id>` bare, so re-select the model under `<id>/…` |
|
||||
|
||||
Environment variables must reach the opencode server process: when the host
|
||||
runs as a service, the shell that runs `opencode models` and the server
|
||||
environment are different, so export the key where the server reads it.
|
||||
|
||||
## See also
|
||||
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -478,7 +478,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **352-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **372-provider catalog** with 150+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **16-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 110 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user