From ebcd16785a5250e2c3045427915e2457bd7cbd2b Mon Sep 17 00:00:00 2001 From: diegosouzapw Date: Sun, 2 Aug 2026 03:03:06 -0300 Subject: [PATCH] feat(providers): add Wave 3-A free-tier registries --- .../providers/registry/chatanywhere/index.ts | 12 +++++ .../config/providers/registry/ofoxai/index.ts | 11 +++++ .../providers/registry/zerolimitai/index.ts | 11 +++++ .../unit/free-tier-providers-wave3-a.test.ts | 48 +++++++++++++++++++ 4 files changed, 82 insertions(+) create mode 100644 open-sse/config/providers/registry/chatanywhere/index.ts create mode 100644 open-sse/config/providers/registry/ofoxai/index.ts create mode 100644 open-sse/config/providers/registry/zerolimitai/index.ts create mode 100644 tests/unit/free-tier-providers-wave3-a.test.ts diff --git a/open-sse/config/providers/registry/chatanywhere/index.ts b/open-sse/config/providers/registry/chatanywhere/index.ts new file mode 100644 index 0000000000..6c99250b20 --- /dev/null +++ b/open-sse/config/providers/registry/chatanywhere/index.ts @@ -0,0 +1,12 @@ +import type { RegistryEntry } from "../../shared.ts"; +import { buildOpenAiCompatibleRegistryEntry } from "../../shared.ts"; + +// International endpoint; audited free access is limited to non-commercial use. +export const chatanywhereProvider: RegistryEntry = buildOpenAiCompatibleRegistryEntry({ + id: "chatanywhere", + alias: "chatanywhere", + baseUrl: "https://api.chatanywhere.org/v1/chat/completions", + modelsUrl: "https://api.chatanywhere.org/v1/models", + models: [], + passthroughModels: true, +}); diff --git a/open-sse/config/providers/registry/ofoxai/index.ts b/open-sse/config/providers/registry/ofoxai/index.ts new file mode 100644 index 0000000000..ada7b5eef2 --- /dev/null +++ b/open-sse/config/providers/registry/ofoxai/index.ts @@ -0,0 +1,11 @@ +import type { RegistryEntry } from "../../shared.ts"; +import { buildOpenAiCompatibleRegistryEntry } from "../../shared.ts"; + +export const ofoxaiProvider: RegistryEntry = buildOpenAiCompatibleRegistryEntry({ + id: "ofoxai", + alias: "ofoxai", + baseUrl: "https://api.ofox.ai/v1/chat/completions", + modelsUrl: "https://api.ofox.ai/v1/models", + models: [], + passthroughModels: true, +}); diff --git a/open-sse/config/providers/registry/zerolimitai/index.ts b/open-sse/config/providers/registry/zerolimitai/index.ts new file mode 100644 index 0000000000..5ad779d6d7 --- /dev/null +++ b/open-sse/config/providers/registry/zerolimitai/index.ts @@ -0,0 +1,11 @@ +import type { RegistryEntry } from "../../shared.ts"; +import { buildOpenAiCompatibleRegistryEntry } from "../../shared.ts"; + +export const zerolimitaiProvider: RegistryEntry = buildOpenAiCompatibleRegistryEntry({ + id: "zerolimitai", + alias: "zerolimitai", + baseUrl: "https://www.zerolimitai.com/api/v1/chat/completions", + modelsUrl: "https://www.zerolimitai.com/api/v1/models", + models: [], + passthroughModels: true, +}); diff --git a/tests/unit/free-tier-providers-wave3-a.test.ts b/tests/unit/free-tier-providers-wave3-a.test.ts new file mode 100644 index 0000000000..be610977fc --- /dev/null +++ b/tests/unit/free-tier-providers-wave3-a.test.ts @@ -0,0 +1,48 @@ +import assert from "node:assert/strict"; +import test from "node:test"; + +import { chatanywhereProvider } from "../../open-sse/config/providers/registry/chatanywhere/index.ts"; +import { ofoxaiProvider } from "../../open-sse/config/providers/registry/ofoxai/index.ts"; +import { zerolimitaiProvider } from "../../open-sse/config/providers/registry/zerolimitai/index.ts"; +import type { RegistryEntry } from "../../open-sse/config/providers/shared.ts"; + +const providers: Array<{ + entry: RegistryEntry; + id: string; + chatUrl: string; + modelsUrl: string; +}> = [ + { + entry: ofoxaiProvider, + id: "ofoxai", + chatUrl: "https://api.ofox.ai/v1/chat/completions", + modelsUrl: "https://api.ofox.ai/v1/models", + }, + { + entry: zerolimitaiProvider, + id: "zerolimitai", + chatUrl: "https://www.zerolimitai.com/api/v1/chat/completions", + modelsUrl: "https://www.zerolimitai.com/api/v1/models", + }, + { + entry: chatanywhereProvider, + id: "chatanywhere", + chatUrl: "https://api.chatanywhere.org/v1/chat/completions", + modelsUrl: "https://api.chatanywhere.org/v1/models", + }, +]; + +test("Wave 3-A providers expose OpenAI-compatible Bearer registries", () => { + for (const { entry, id, chatUrl, modelsUrl } of providers) { + assert.equal(entry.id, id); + assert.equal(entry.alias, id); + assert.equal(entry.format, "openai"); + assert.equal(entry.executor, "default"); + assert.equal(entry.authType, "apikey"); + assert.equal(entry.authHeader, "bearer"); + assert.equal(entry.baseUrl, chatUrl); + assert.equal(entry.modelsUrl, modelsUrl); + assert.equal(entry.passthroughModels, true); + assert.deepEqual(entry.models, []); + } +});