Skip to content

Commit c0e048b

Browse files
committed
feat: add blackbox.ai to dashboard frontend (#175)
- Added blackbox provider to APIKEY_PROVIDERS in providers.ts - Added blackbox pricing entries in pricing.ts - Added blackbox to ProviderId typedef in types.ts - Added blackbox models endpoint config in models/route.ts
1 parent 3205743 commit c0e048b

File tree

5 files changed

+40
-1
lines changed

5 files changed

+40
-1
lines changed

package-lock.json

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/api/providers/[id]/models/route.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,14 @@ const PROVIDER_MODELS_CONFIG = {
143143
authPrefix: "Bearer ",
144144
parseResponse: (data) => data.data || data.models || [],
145145
},
146+
blackbox: {
147+
url: "https://api.blackbox.ai/v1/models",
148+
method: "GET",
149+
headers: { "Content-Type": "application/json" },
150+
authHeader: "Authorization",
151+
authPrefix: "Bearer ",
152+
parseResponse: (data) => data.data || data.models || [],
153+
},
146154
xai: {
147155
url: "https://api.x.ai/v1/models",
148156
method: "GET",

src/domain/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99

1010
/**
11-
* @typedef {'openai'|'claude'|'gemini'|'codex'|'qwen'|'deepseek'|'cohere'|'groq'|'mistral'|'openrouter'} ProviderId
11+
* @typedef {'openai'|'claude'|'gemini'|'codex'|'qwen'|'deepseek'|'cohere'|'groq'|'blackbox'|'mistral'|'openrouter'} ProviderId
1212
*/
1313

1414
/**

src/shared/constants/pricing.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,16 @@ export const DEFAULT_PRICING = {
528528
"qwen/qwen3-32b": { input: 0, output: 0, cached: 0, reasoning: 0, cache_creation: 0 },
529529
},
530530

531+
// Blackbox AI
532+
blackbox: {
533+
"gpt-4o": { input: 0, output: 0, cached: 0, reasoning: 0, cache_creation: 0 },
534+
"gemini-2.5-flash": { input: 0, output: 0, cached: 0, reasoning: 0, cache_creation: 0 },
535+
"claude-sonnet-4": { input: 0, output: 0, cached: 0, reasoning: 0, cache_creation: 0 },
536+
"deepseek-v3": { input: 0, output: 0, cached: 0, reasoning: 0, cache_creation: 0 },
537+
blackboxai: { input: 0, output: 0, cached: 0, reasoning: 0, cache_creation: 0 },
538+
"blackboxai-pro": { input: 0, output: 0, cached: 0, reasoning: 0, cache_creation: 0 },
539+
},
540+
531541
// Fireworks
532542
fireworks: {
533543
"accounts/fireworks/models/gpt-oss-120b": {

src/shared/constants/providers.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,15 @@ export const APIKEY_PROVIDERS = {
145145
textIcon: "GQ",
146146
website: "https://groq.com",
147147
},
148+
blackbox: {
149+
id: "blackbox",
150+
alias: "bb",
151+
name: "Blackbox AI",
152+
icon: "view_in_ar",
153+
color: "#1A1A2E",
154+
textIcon: "BB",
155+
website: "https://blackbox.ai",
156+
},
148157
xai: {
149158
id: "xai",
150159
alias: "xai",

0 commit comments

Comments
 (0)