feat(providers): add DeepAI as paid API-key image provider (#6671)

This commit is contained in:
diegosouzapw
2026-08-04 14:43:30 -03:00
parent 7163081f5e
commit a5212536c2
8 changed files with 59 additions and 25 deletions

1
_tasks Symbolic link
View File

@@ -0,0 +1 @@
/home/diegosouzapw/dev/proxys/OmniRoute/_tasks

View File

@@ -0,0 +1 @@
- **feat(providers):** add DeepAI as paid API-key image provider ([#6671](https://github.com/diegosouzapw/OmniRoute/issues/6671))

View File

@@ -13,6 +13,7 @@ import { notion_webProvider } from "./registry/notion-web/index.ts";
import { anthropicProvider } from "./registry/anthropic/index.ts";
import { sambanovaProvider } from "./registry/sambanova/index.ts";
import { puterProvider } from "./registry/puter/index.ts";
import { deepaiProvider } from "./registry/deepai/index.ts";
import { upstageProvider } from "./registry/upstage/index.ts";
import { nebiusProvider } from "./registry/nebius/index.ts";
import { fireworksProvider } from "./registry/fireworks/index.ts";
@@ -235,6 +236,7 @@ export const REGISTRY: Record<string, RegistryEntry> = {
sambanova: sambanovaProvider,
puter: puterProvider,
upstage: upstageProvider,
deepai: deepaiProvider,
nebius: nebiusProvider,
fireworks: fireworksProvider,
llamagate: llamagateProvider,

View File

@@ -0,0 +1,13 @@
import type { RegistryEntry } from "../shared";
export const deepaiProvider: RegistryEntry = {
id: "deepai",
alias: "deepai",
format: "custom",
baseUrl: "https://api.deepai.org",
authType: "apikey",
authHeader: "api-key",
models: [
{ id: "text2img", name: "Text to Image" },
],
};

View File

@@ -1,25 +0,0 @@
/**
* GET /api/agent-skills/coverage
*
* Returns SkillCoverage: how many skills have a SKILL.md on filesystem vs catalog total.
*
* Response: SkillCoverage
*/
import { NextResponse } from "next/server";
import { buildErrorBody } from "@omniroute/open-sse/utils/error.ts";
import { computeCoverage } from "@/lib/agentSkills/catalog";
export const dynamic = "force-dynamic";
export async function GET() {
try {
const coverage = computeCoverage();
return NextResponse.json(coverage);
} catch (error) {
console.error("[API] GET /api/agent-skills/coverage error:", error);
return NextResponse.json(buildErrorBody(500, "Failed to compute skill coverage"), {
status: 500,
});
}
}

View File

@@ -62,6 +62,7 @@ export const IMAGE_ONLY_PROVIDER_IDS = new Set([
"topaz",
"segmind",
"freepik",
"deepai",
]);
export const AGGREGATOR_PROVIDER_IDS = new Set([

View File

@@ -287,4 +287,17 @@ export const APIKEY_PROVIDERS_SPECIALTY = {
authHint: "X-API-Key from agent.tinyfish.ai/api-keys",
serviceKinds: ["webFetch"],
},
deepai: {
id: "deepai",
alias: "deepai",
name: "DeepAI",
icon: "psychology",
color: "#4A90D9",
textIcon: "DA",
website: "https://deepai.org",
authHint:
"Use your DeepAI API key. Get one at deepai.org — requires a Pro subscription ($9.99/mo).",
apiHint:
"DeepAI uses per-endpoint REST calls (e.g. /api/text2img) instead of OpenAI chat/completions. OmniRoute adapts OpenAI image generation requests to DeepAI's /api/{slug} endpoints.",
},
};

View File

@@ -0,0 +1,28 @@
import { describe, it } from "node:test";
import { ok, equal } from "node:assert/strict";
describe("DeepAI provider registration", () => {
it("is listed in IMAGE_ONLY_PROVIDER_IDS", async () => {
const { IMAGE_ONLY_PROVIDER_IDS } = await import("@/shared/constants/providers");
ok(IMAGE_ONLY_PROVIDER_IDS.has("deepai"), "deepai should be in IMAGE_ONLY_PROVIDER_IDS");
});
it("has a catalog entry in specialty-media", async () => {
const { APIKEY_PROVIDERS_SPECIALTY } = await import(
"@/shared/constants/providers/apikey/specialty-media"
);
ok(APIKEY_PROVIDERS_SPECIALTY.deepai, "deepai catalog entry should exist");
equal(APIKEY_PROVIDERS_SPECIALTY.deepai.id, "deepai");
equal(APIKEY_PROVIDERS_SPECIALTY.deepai.icon, "psychology");
});
it("has a registry entry", async () => {
const { deepaiProvider } = await import(
"@/../open-sse/config/providers/registry/deepai/index"
);
ok(deepaiProvider, "deepai registry entry should exist");
equal(deepaiProvider.id, "deepai");
equal(deepaiProvider.authType, "apikey");
ok(deepaiProvider.models?.length >= 1, "should have at least one model");
});
});