fix(sse): register Arcee AI in the executor provider registry (#12784) (#13277)

Merged as part of the 39-PR owner batch of 2026-09-11, validated as a unit.

Boarded into one consolidated worktree cut from `release/v3.8.51` with the other 38 — zero conflicts between them.

- ESLint over every changed file: no errors (the only finding was one suppression entry the batch emptied, pruned on #13243)
- `typecheck:core` clean; `check:dashboard-typecheck` OK (206 pre-existing, within baseline); `check:changelog-integrity` OK
- complexity 2821 / baseline 3218 and cognitive-complexity 1272 / baseline 1437 — both under baseline
- 256 assertions green: 246 under node:test and 10 under vitest, which is where `tests/unit/**/*.test.tsx` actually runs
- `check-file-size`: `chatCore.ts` rebaselined 6144 → 6146 for #13278 and #13276, annotated and landed on #13243

⚠️ base-red inherited: #12732 — the provider count (356 in the docs vs the 358 the modules define) and `open-sse/utils/stream.ts` at 3115 > frozen 3098 both reproduce on the pure tip with zero contribution from this batch.
This commit is contained in:
Diego Rodrigues de Sa e Souza
2026-09-11 22:05:59 -03:00
committed by GitHub
parent c5707e65de
commit 02128f3343
4 changed files with 57 additions and 0 deletions

View File

@@ -0,0 +1 @@
- fix(sse): register Arcee AI in the executor provider registry so requests reach api.arcee.ai instead of silently falling back to OpenAI (#12784)

View File

@@ -136,6 +136,7 @@ import { freemodel_devProvider } from "./registry/freemodel-dev/index.ts";
import { gitlawb_gmiProvider } from "./registry/gitlawb/gmi/index.ts";
import { gitlawbProvider } from "./registry/gitlawb/index.ts";
import { liquidProvider } from "./registry/liquid/index.ts";
import { arceeAiProvider } from "./registry/arcee-ai/index.ts";
import { deepinfraProvider } from "./registry/deepinfra/index.ts";
import { agyProvider } from "./registry/agy/index.ts";
import { agnesProvider } from "./registry/agnes/index.ts";
@@ -409,6 +410,7 @@ export const REGISTRY: Record<string, RegistryEntry> = {
"gitlawb-gmi": gitlawb_gmiProvider,
gitlawb: gitlawbProvider,
liquid: liquidProvider,
"arcee-ai": arceeAiProvider,
deepinfra: deepinfraProvider,
agy: agyProvider,
agnes: agnesProvider,

View File

@@ -0,0 +1,10 @@
import type { RegistryEntry } from "../../shared.ts";
import { buildOpenAiCompatibleRegistryEntry } from "../../shared.ts";
export const arceeAiProvider: RegistryEntry = buildOpenAiCompatibleRegistryEntry({
id: "arcee-ai",
alias: "arcee",
baseUrl: "https://api.arcee.ai/api/v1/chat/completions",
models: [],
passthroughModels: true,
});

View File

@@ -0,0 +1,44 @@
import test from "node:test";
import assert from "node:assert/strict";
import fs from "node:fs";
import os from "node:os";
import path from "node:path";
const TEST_DATA_DIR = fs.mkdtempSync(path.join(os.tmpdir(), "omniroute-arcee-provider-"));
process.env.DATA_DIR = TEST_DATA_DIR;
const { PROVIDERS } = await import("../../open-sse/config/constants.ts");
const { REGISTRY: providerRegistry } = await import("../../open-sse/config/providerRegistry.ts");
const { APIKEY_PROVIDERS } = await import("../../src/shared/constants/providers.ts");
const { DefaultExecutor } = await import("../../open-sse/executors/default.ts");
const dbCore = await import("../../src/lib/db/core.ts");
test.after(() => {
dbCore.closeDbInstance();
fs.rmSync(TEST_DATA_DIR, { recursive: true, force: true, maxRetries: 5, retryDelay: 100 });
});
const ARCEE_CHAT_URL = "https://api.arcee.ai/api/v1/chat/completions";
test("arcee-ai is offered in the onboarding catalog", () => {
assert.ok(APIKEY_PROVIDERS["arcee-ai"]);
});
test("arcee-ai has a routing entry in the executor REGISTRY", () => {
const entry = providerRegistry["arcee-ai"];
assert.ok(entry, "providerRegistry['arcee-ai'] must be defined");
assert.equal(entry.id, "arcee-ai");
assert.equal(entry.alias, "arcee");
assert.equal(entry.format, "openai");
assert.equal(entry.executor, "default");
assert.equal(entry.baseUrl, ARCEE_CHAT_URL);
assert.equal(entry.authType, "apikey");
assert.equal(entry.authHeader, "bearer");
assert.equal(entry.passthroughModels, true);
});
test("DefaultExecutor routes arcee-ai to Arcee's own base URL, not OpenAI's", () => {
const executor = new DefaultExecutor("arcee-ai");
assert.equal(executor.config.baseUrl, ARCEE_CHAT_URL);
assert.notEqual(executor.config.baseUrl, PROVIDERS.openai.baseUrl);
});