From a4e25ca3424b505d788fa2f12230cbe0d4fa81cb Mon Sep 17 00:00:00 2001 From: UnificAlly <318401407+unifically-dev@users.noreply.github.com> Date: Sat, 19 Sep 2026 16:42:49 +0400 Subject: [PATCH 1/2] feat(providers): add Unifically as an OpenAI-compatible gateway Registry entry in the eurouter / greenpt shape: default executor, no translator, passthroughModels. Discovery uses /v1/models?category=llm because the same catalog lists image, video and audio models that are not chat-completion targets. --- changelog.d/features/unifically-provider.md | 1 + open-sse/config/providers/index.ts | 2 + .../providers/registry/unifically/index.ts | 14 ++++ src/shared/constants/config.ts | 1 + src/shared/constants/providers.ts | 1 + .../constants/providers/apikey/gateways.ts | 19 +++++ tests/unit/unifically-provider.test.ts | 69 +++++++++++++++++++ 7 files changed, 107 insertions(+) create mode 100644 changelog.d/features/unifically-provider.md create mode 100644 open-sse/config/providers/registry/unifically/index.ts create mode 100644 tests/unit/unifically-provider.test.ts diff --git a/changelog.d/features/unifically-provider.md b/changelog.d/features/unifically-provider.md new file mode 100644 index 000000000000..8e3f4cd72951 --- /dev/null +++ b/changelog.d/features/unifically-provider.md @@ -0,0 +1 @@ +- **feat(providers):** Added Unifically as an OpenAI-compatible API-key gateway (`https://api.unifically.com/v1`), with live model discovery via `passthroughModels`. Discovery is scoped to `/v1/models?category=llm`, because the same catalog also lists image, video and audio models that run through a separate async task API and are not chat-completion targets. diff --git a/open-sse/config/providers/index.ts b/open-sse/config/providers/index.ts index 91df75b5c5a7..8b6aa981b71f 100644 --- a/open-sse/config/providers/index.ts +++ b/open-sse/config/providers/index.ts @@ -253,6 +253,7 @@ import { llmKiwiProvider } from "./registry/llm-kiwi/index.ts"; import { literouterProvider } from "./registry/literouter/index.ts"; import { greenptProvider } from "./registry/greenpt/index.ts"; import { eurouterProvider } from "./registry/eurouter/index.ts"; +import { unificallyProvider } from "./registry/unifically/index.ts"; import { mnnAiProvider } from "./registry/mnn-ai/index.ts"; import { meganovaAiProvider } from "./registry/meganova-ai/index.ts"; import { mixlayerProvider } from "./registry/mixlayer/index.ts"; @@ -532,6 +533,7 @@ export const REGISTRY: Record = { literouter: literouterProvider, greenpt: greenptProvider, eurouter: eurouterProvider, + unifically: unificallyProvider, "mnn-ai": mnnAiProvider, "meganova-ai": meganovaAiProvider, mixlayer: mixlayerProvider, diff --git a/open-sse/config/providers/registry/unifically/index.ts b/open-sse/config/providers/registry/unifically/index.ts new file mode 100644 index 000000000000..0e73a0750828 --- /dev/null +++ b/open-sse/config/providers/registry/unifically/index.ts @@ -0,0 +1,14 @@ +import type { RegistryEntry } from "../../shared.ts"; +import { buildOpenAiCompatibleRegistryEntry } from "../../shared.ts"; + +// Unifically serves text, image, video and audio models from one catalog. +// `?category=llm` narrows /v1/models to the chat models, which are the only +// ones /v1/chat/completions accepts. +export const unificallyProvider: RegistryEntry = buildOpenAiCompatibleRegistryEntry({ + id: "unifically", + alias: "unifically", + baseUrl: "https://api.unifically.com/v1/chat/completions", + modelsUrl: "https://api.unifically.com/v1/models?category=llm", + models: [], + passthroughModels: true, +}); diff --git a/src/shared/constants/config.ts b/src/shared/constants/config.ts index 3bb4c91b027e..1b94df5386a3 100644 --- a/src/shared/constants/config.ts +++ b/src/shared/constants/config.ts @@ -19,6 +19,7 @@ export const PROVIDER_ENDPOINTS = { literouter: "https://api.literouter.com/v1/chat/completions", greenpt: "https://api.greenpt.ai/v1/chat/completions", eurouter: "https://api.eurouter.ai/v1/chat/completions", + unifically: "https://api.unifically.com/v1/chat/completions", "mnn-ai": "https://api.mnnai.ru/v1/chat/completions", "meganova-ai": "https://api.meganova.ai/v1/chat/completions", mixlayer: "https://models.mixlayer.ai/v1/chat/completions", diff --git a/src/shared/constants/providers.ts b/src/shared/constants/providers.ts index 654b2baac982..6ccc7749086c 100644 --- a/src/shared/constants/providers.ts +++ b/src/shared/constants/providers.ts @@ -125,6 +125,7 @@ export const AGGREGATOR_PROVIDER_IDS = new Set([ "llm-kiwi", "literouter", "eurouter", + "unifically", "mnn-ai", "meganova-ai", "mixlayer", diff --git a/src/shared/constants/providers/apikey/gateways.ts b/src/shared/constants/providers/apikey/gateways.ts index 5dbaf9c9d24f..05113d6707d5 100644 --- a/src/shared/constants/providers/apikey/gateways.ts +++ b/src/shared/constants/providers/apikey/gateways.ts @@ -306,6 +306,25 @@ export const APIKEY_PROVIDERS_GATEWAYS = { apiHint: "Create an EURouter API key, then use https://api.eurouter.ai/v1 as the OpenAI-compatible base URL. Models are served by third-party upstreams listed per model in the EURouter catalog; check each upstream jurisdiction, privacy and data-transfer terms before use.", }, + unifically: { + id: "unifically", + serviceKinds: ["llm"], + alias: "unifically", + name: "Unifically", + icon: "hub", + color: "#10B981", + textIcon: "UNI", + passthroughModels: true, + website: "https://unifically.com", + // New accounts get a small one-time starting balance, not a recurring free + // tier, so no Free badge. + hasFree: false, + // Only the chat models are wired here. The image, video and audio models in + // the same catalog run through an async task API (POST /v1/tasks), which + // the default executor does not speak. + apiHint: + "Create a Unifically API key at https://unifically.com/api-keys, then use https://api.unifically.com/v1 as the OpenAI-compatible base URL. Pay per use, no subscription. Chat models only through this entry; the media models in the same catalog use a separate async task API.", + }, "mnn-ai": { id: "mnn-ai", serviceKinds: ["llm"], diff --git a/tests/unit/unifically-provider.test.ts b/tests/unit/unifically-provider.test.ts new file mode 100644 index 000000000000..e21a022722b9 --- /dev/null +++ b/tests/unit/unifically-provider.test.ts @@ -0,0 +1,69 @@ +import assert from "node:assert/strict"; +import test from "node:test"; + +import { unificallyProvider } from "../../open-sse/config/providers/registry/unifically/index.ts"; + +const { REGISTRY } = await import("../../open-sse/config/providerRegistry.ts"); +const { DefaultExecutor, getExecutor } = await import("../../open-sse/executors/index.ts"); +const { PROVIDER_ENDPOINTS } = await import("../../src/shared/constants/config.ts"); +const { isValidModel } = await import("../../src/shared/constants/models.ts"); +const { APIKEY_PROVIDERS } = await import("../../src/shared/constants/providers/apikey/index.ts"); +const { AGGREGATOR_PROVIDER_IDS } = await import("../../src/shared/constants/providers.ts"); + +const CHAT_URL = "https://api.unifically.com/v1/chat/completions"; +const MODELS_URL = "https://api.unifically.com/v1/models?category=llm"; + +test("unifically is an OpenAI-compatible Bearer registry entry", () => { + assert.equal(unificallyProvider.id, "unifically"); + assert.equal(unificallyProvider.alias, "unifically"); + assert.equal(unificallyProvider.format, "openai"); + assert.equal(unificallyProvider.executor, "default"); + assert.equal(unificallyProvider.authType, "apikey"); + assert.equal(unificallyProvider.authHeader, "bearer"); + assert.equal(unificallyProvider.baseUrl, CHAT_URL); + assert.equal(unificallyProvider.passthroughModels, true); +}); + +test("unifically discovery is scoped to chat models", () => { + // /v1/models returns image, video and audio models too. Those run through + // POST /v1/tasks, not chat completions, so an unscoped listing would offer + // models that fail on every request. + assert.equal(unificallyProvider.modelsUrl, MODELS_URL); + assert.ok(new URL(String(unificallyProvider.modelsUrl)).searchParams.get("category") === "llm"); + assert.deepEqual(unificallyProvider.models, []); +}); + +test("unifically is wired through registry, metadata, endpoint and default executor", async () => { + assert.equal(REGISTRY.unifically?.baseUrl, CHAT_URL); + assert.equal(PROVIDER_ENDPOINTS.unifically, CHAT_URL); + assert.equal(APIKEY_PROVIDERS.unifically?.id, "unifically"); + assert.equal(APIKEY_PROVIDERS.unifically?.alias, "unifically"); + assert.deepEqual(APIKEY_PROVIDERS.unifically?.serviceKinds, ["llm"]); + assert.ok((await getExecutor("unifically")) instanceof DefaultExecutor); + assert.equal(isValidModel("unifically", "future/live-catalog-model"), true); +}); + +test("unifically is listed as an aggregator", () => { + // It routes to third-party model providers rather than serving its own inference. + assert.equal(AGGREGATOR_PROVIDER_IDS.has("unifically"), true); +}); + +test("unifically advertises no free tier", () => { + // New accounts get a one-time starting balance. That is not a recurring free + // allowance, so no Free badge is claimed. + assert.equal(APIKEY_PROVIDERS.unifically?.hasFree, false); + assert.equal(APIKEY_PROVIDERS.unifically?.freeNote, undefined); +}); + +test("unifically copy says media models are out of scope for this entry", () => { + const hint = String(APIKEY_PROVIDERS.unifically?.apiHint ?? ""); + assert.ok(hint.includes("https://api.unifically.com/v1")); + assert.ok(hint.toLowerCase().includes("chat models only")); +}); + +test("unifically claims no capability that was not exercised", () => { + const metadata = APIKEY_PROVIDERS.unifically as Record; + for (const key of ["supportsTools", "supportsVision", "capabilities"]) { + assert.equal(metadata[key], undefined, `${key} must not be declared unverified`); + } +}); From 19104186ef365fbd242e007e3242360ef6fa5b1b Mon Sep 17 00:00:00 2001 From: UnificAlly <318401407+unifically-dev@users.noreply.github.com> Date: Thu, 8 Oct 2026 04:12:49 -0300 Subject: [PATCH 2/2] test(providers): add the unifically translate-path golden block and record gateways.ts wiring The translate-path golden had no block for the new provider, so the snapshot guard failed on the merged tree; regenerated with UPDATE_GOLDEN=1 and kept only the added "unifically" entry. gateways.ts ends at 1575 after the tip merge (+2 import/spread wiring on top of the tip's 1573), recorded in file-size-baseline.json with a justification. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --- config/quality/file-size-baseline.json | 3 ++- tests/snapshots/provider/translate-path.json | 23 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/config/quality/file-size-baseline.json b/config/quality/file-size-baseline.json index 65c5f412e9b3..2fb1289ee352 100644 --- a/config/quality/file-size-baseline.json +++ b/config/quality/file-size-baseline.json @@ -1,4 +1,5 @@ { + "_rebaseline_2026_10_08_14182_unifically_gateways": "PR #14182 (unifically-dev) reconcile onto release/v3.8.52 35f63906 (2026-10-08): src/shared/constants/providers/apikey/gateways.ts tip 1573 -> 1575 (+2 = one import of the dedicated apikey/unifically.ts entry and one ...unificallyGateway spread, the same wiring #14297 onomeo uses). The Unifically catalog entry itself lives in src/shared/constants/providers/apikey/unifically.ts (under cap); the PR's earlier doc-comment shrink was already taken by the tip, so the two wiring lines are irreducible. Measured with split(\"\\n\").length on the merged tree. Covered by tests/unit/unifically-provider.test.ts.", "_rebaseline_2026_10_07_13016_hf_bill_to_reconcile": "PR #13016 reconcile onto release/v3.8.52 tip f8a8131 (2026-10-07): EditConnectionModal.tsx tip ceiling 1634 (Onda A #14907) + this PR's own +15 (the owner-approved HF X-HF-Bill-To field already covered by _rebaseline_2026_09_23_13016_huggingface_bill_to) -> 1649, measured with split(\"\\n\").length by check-file-size on the merged tree. No slack.", "_rebaseline_2026_09_23_13016_huggingface_bill_to": "PR #13016 own growth: EditConnectionModal.tsx merge-base 1603 -> tip 1621 (tip-only growth, within the 1631 ceiling) -> 1637 (+16 = the optional Hugging Face X-HF-Bill-To billing-account field: form-state init + a single Input gated to provider huggingface + providerSpecificData wiring, mirroring the customUserAgent call-site pattern). Irreducible call-site wiring in the frozen modal; header logic lives in open-sse/executors/base/headers.ts and persistence in connectionProviderSpecificData.ts. Covered by tests/unit/huggingface-bill-to-header.test.ts. Owner-approved rebaseline 2026-09-23.", "_rebaseline_2026_10_07_wave_c_gateways": "Onda C 2026-10-07, measured with split(\"\\n\").length on the post-squash tip f83a3019. src/shared/constants/providers/apikey/gateways.ts 1547->1574 (#15131 Y-API catalog entry; the baseline hunk stayed out of the product squash). Ceiling is the measured size, not slack.", @@ -585,7 +586,7 @@ "src/lib/tailscaleTunnel.ts": 1208, "src/lib/tokenHealthCheck.ts": 1254, "src/shared/components/RequestLoggerV2.tsx": 1762, - "src/shared/constants/providers/apikey/gateways.ts": 1574, + "src/shared/constants/providers/apikey/gateways.ts": 1575, "src/shared/services/cliRuntime.ts": 1296, "src/sse/handlers/chat.ts": 2688, "src/sse/services/auth.ts": 3678, diff --git a/tests/snapshots/provider/translate-path.json b/tests/snapshots/provider/translate-path.json index 81146b96ee93..1c36fd048f39 100644 --- a/tests/snapshots/provider/translate-path.json +++ b/tests/snapshots/provider/translate-path.json @@ -5944,6 +5944,29 @@ "stream": "https://hermes.ai.unturf.com/v1/chat/completions" } }, + "unifically": { + "format": "openai", + "headers": { + "apiKey": { + "Accept": "text/event-stream", + "Authorization": "Bearer ", + "Content-Type": "application/json" + }, + "nonStream": { + "Authorization": "Bearer ", + "Content-Type": "application/json" + }, + "oauth": { + "Accept": "text/event-stream", + "Authorization": "Bearer ", + "Content-Type": "application/json" + } + }, + "url": { + "nonStream": "https://api.unifically.com/v1/chat/completions", + "stream": "https://api.unifically.com/v1/chat/completions" + } + }, "unorouter": { "format": "openai", "headers": {