noosphere 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -14
- package/dist/index.cjs +156 -120
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -6
- package/dist/index.d.ts +9 -6
- package/dist/index.js +154 -120
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -65,38 +65,50 @@ Noosphere **automatically discovers the latest models from EVERY provider's API
|
|
|
65
65
|
|
|
66
66
|
### Provider Logos — SVG & PNG for Every Model
|
|
67
67
|
|
|
68
|
-
Every model returned by the auto-fetch includes a `logo` field with the provider's official logo
|
|
68
|
+
Every model returned by the auto-fetch includes a `logo` field with **CDN URLs** to the provider's official logo — SVG (vector) and PNG (512×512), hosted on DigitalOcean Spaces. For aggregator providers (OpenRouter, HuggingFace), logos are resolved to the **real upstream provider** — so an `x-ai/grok-4` model gets the xAI logo, not OpenRouter's.
|
|
69
69
|
|
|
70
70
|
```typescript
|
|
71
71
|
const models = await ai.getModels('llm');
|
|
72
72
|
|
|
73
73
|
for (const model of models) {
|
|
74
74
|
console.log(model.id, model.logo);
|
|
75
|
-
// "gpt-5"
|
|
76
|
-
// "claude-opus-4-6" { svg: "https
|
|
77
|
-
// "gemini-2.5-pro"
|
|
75
|
+
// "gpt-5" { svg: "https://...cdn.../openai.svg", png: "https://...cdn.../openai.png" }
|
|
76
|
+
// "claude-opus-4-6" { svg: "https://...cdn.../anthropic.svg", png: "https://...cdn.../anthropic.png" }
|
|
77
|
+
// "gemini-2.5-pro" { svg: "https://...cdn.../google.svg", png: "https://...cdn.../google.png" }
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Use directly in your UI:
|
|
81
|
+
// <img src={model.logo.svg} alt={model.provider} />
|
|
82
|
+
// <img src={model.logo.png} width={48} height={48} />;
|
|
78
83
|
}
|
|
79
84
|
|
|
80
85
|
// Providers also have logos:
|
|
81
86
|
const providers = await ai.getProviders();
|
|
82
87
|
providers.forEach(p => console.log(p.id, p.logo));
|
|
83
|
-
|
|
84
|
-
// Use in your UI:
|
|
85
|
-
// <img src={model.logo.svg} alt={model.provider} />
|
|
86
88
|
```
|
|
87
89
|
|
|
88
|
-
**
|
|
90
|
+
**28 providers covered (23 SVG + 28 PNG):**
|
|
91
|
+
|
|
92
|
+
| Provider | SVG | PNG | Source |
|
|
93
|
+
|---|---|---|---|
|
|
94
|
+
| OpenAI, Anthropic, Google, Groq, Mistral, xAI | ✓ | ✓ | Official brand assets |
|
|
95
|
+
| OpenRouter, Cerebras, Meta, DeepSeek | ✓ | ✓ | Official brand assets |
|
|
96
|
+
| Microsoft, NVIDIA, Qwen, Cohere, Perplexity | ✓ | ✓ | Official brand assets |
|
|
97
|
+
| Amazon, Together, Fireworks, Replicate | ✓ | ✓ | Official brand assets |
|
|
98
|
+
| HuggingFace, Ollama, Nebius, Novita | ✓ | ✓ | Official brand assets |
|
|
99
|
+
| FAL, ComfyUI, Piper, Kokoro, SambaNova | ✗ | ✓ | GitHub avatars (512×512) |
|
|
89
100
|
|
|
90
101
|
You can also import the logo registry directly:
|
|
91
102
|
|
|
92
103
|
```typescript
|
|
93
|
-
import { getProviderLogo, PROVIDER_LOGOS } from 'noosphere';
|
|
104
|
+
import { getProviderLogo, PROVIDER_LOGOS, getAllProviderLogos } from 'noosphere';
|
|
94
105
|
|
|
95
106
|
const logo = getProviderLogo('anthropic');
|
|
96
|
-
// { svg: "https
|
|
107
|
+
// { svg: "https://...cdn.../anthropic.svg", png: "https://...cdn.../anthropic.png" }
|
|
97
108
|
|
|
98
|
-
//
|
|
99
|
-
|
|
109
|
+
// Get all logos as a map:
|
|
110
|
+
const allLogos = getAllProviderLogos();
|
|
111
|
+
console.log(Object.keys(allLogos));
|
|
100
112
|
// ['openai', 'anthropic', 'google', 'groq', 'mistral', 'xai', 'openrouter', ...]
|
|
101
113
|
```
|
|
102
114
|
|
|
@@ -108,8 +120,8 @@ const qwen = hfModels.find(m => m.id === 'Qwen/Qwen2.5-72B-Instruct');
|
|
|
108
120
|
|
|
109
121
|
console.log(qwen.capabilities.inferenceProviderLogos);
|
|
110
122
|
// {
|
|
111
|
-
// "together": { svg: "https
|
|
112
|
-
// "fireworks-ai": { png: "https
|
|
123
|
+
// "together": { svg: "https://...cdn.../together.svg", png: "https://...cdn.../together.png" },
|
|
124
|
+
// "fireworks-ai": { svg: "https://...cdn.../fireworks-ai.svg", png: "https://...cdn.../fireworks-ai.png" },
|
|
113
125
|
// }
|
|
114
126
|
```
|
|
115
127
|
|
package/dist/index.cjs
CHANGED
|
@@ -22,7 +22,9 @@ var index_exports = {};
|
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
Noosphere: () => Noosphere,
|
|
24
24
|
NoosphereError: () => NoosphereError,
|
|
25
|
+
PROVIDER_IDS: () => PROVIDER_IDS,
|
|
25
26
|
PROVIDER_LOGOS: () => PROVIDER_LOGOS,
|
|
27
|
+
getAllProviderLogos: () => getAllProviderLogos,
|
|
26
28
|
getProviderLogo: () => getProviderLogo
|
|
27
29
|
});
|
|
28
30
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -131,130 +133,149 @@ function resolveConfig(input) {
|
|
|
131
133
|
}
|
|
132
134
|
|
|
133
135
|
// src/logos.ts
|
|
134
|
-
var
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
meta
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
png: "https://cdn.brandfetch.io/idwWX3Neii/w/512/h/512/theme/dark/icon.png"
|
|
218
|
-
},
|
|
219
|
-
amazon: {
|
|
220
|
-
svg: "https://cdn.simpleicons.org/amazonaws",
|
|
221
|
-
png: "https://cdn.brandfetch.io/idawORoPJZ/w/512/h/512/theme/dark/icon.png"
|
|
222
|
-
},
|
|
223
|
-
// --- HuggingFace Inference Providers ---
|
|
224
|
-
"hf-inference": {
|
|
225
|
-
svg: "https://cdn.simpleicons.org/huggingface",
|
|
226
|
-
png: "https://cdn.brandfetch.io/idnrPPHe87/w/512/h/512/theme/dark/icon.png"
|
|
227
|
-
},
|
|
228
|
-
"sambanova": {
|
|
229
|
-
png: "https://cdn.brandfetch.io/id__2e5yMY/w/512/h/512/theme/dark/icon.png"
|
|
230
|
-
},
|
|
231
|
-
"together": {
|
|
232
|
-
svg: "https://cdn.simpleicons.org/togetherai",
|
|
233
|
-
png: "https://cdn.brandfetch.io/idH5EoFVaH/w/512/h/512/theme/dark/icon.png"
|
|
234
|
-
},
|
|
235
|
-
"fireworks-ai": {
|
|
236
|
-
png: "https://cdn.brandfetch.io/idj1VQ2O4C/w/512/h/512/theme/dark/icon.png"
|
|
237
|
-
},
|
|
238
|
-
"replicate": {
|
|
239
|
-
svg: "https://cdn.simpleicons.org/replicate",
|
|
240
|
-
png: "https://cdn.brandfetch.io/idWKE4rRaH/w/512/h/512/theme/dark/icon.png"
|
|
241
|
-
},
|
|
242
|
-
"nebius": {
|
|
243
|
-
png: "https://cdn.brandfetch.io/idiUqSQ52b/w/512/h/512/theme/dark/icon.png"
|
|
244
|
-
},
|
|
245
|
-
"novita": {
|
|
246
|
-
png: "https://novita.ai/favicon.png"
|
|
247
|
-
}
|
|
248
|
-
};
|
|
136
|
+
var CDN_BASE = "https://blockchainstarter.nyc3.digitaloceanspaces.com/noosphere/logos";
|
|
137
|
+
var PROVIDER_IDS = [
|
|
138
|
+
// Cloud LLM
|
|
139
|
+
"openai",
|
|
140
|
+
"anthropic",
|
|
141
|
+
"google",
|
|
142
|
+
"groq",
|
|
143
|
+
"mistral",
|
|
144
|
+
"xai",
|
|
145
|
+
"openrouter",
|
|
146
|
+
"cerebras",
|
|
147
|
+
"pi-ai",
|
|
148
|
+
// Media
|
|
149
|
+
"fal",
|
|
150
|
+
"huggingface",
|
|
151
|
+
// Local
|
|
152
|
+
"comfyui",
|
|
153
|
+
"piper",
|
|
154
|
+
"kokoro",
|
|
155
|
+
"ollama",
|
|
156
|
+
// Model orgs (from OpenRouter prefixes)
|
|
157
|
+
"meta",
|
|
158
|
+
"deepseek",
|
|
159
|
+
"microsoft",
|
|
160
|
+
"nvidia",
|
|
161
|
+
"qwen",
|
|
162
|
+
"cohere",
|
|
163
|
+
"perplexity",
|
|
164
|
+
"amazon",
|
|
165
|
+
// Additional model orgs
|
|
166
|
+
"zai",
|
|
167
|
+
"minimax",
|
|
168
|
+
"baidu",
|
|
169
|
+
"bytedance",
|
|
170
|
+
"tencent",
|
|
171
|
+
"xiaomi",
|
|
172
|
+
"ibm",
|
|
173
|
+
"ai21",
|
|
174
|
+
"inflection",
|
|
175
|
+
"upstage",
|
|
176
|
+
// HuggingFace inference providers
|
|
177
|
+
"sambanova",
|
|
178
|
+
"together",
|
|
179
|
+
"fireworks-ai",
|
|
180
|
+
"replicate",
|
|
181
|
+
"nebius",
|
|
182
|
+
"novita"
|
|
183
|
+
];
|
|
184
|
+
var HAS_SVG = /* @__PURE__ */ new Set([
|
|
185
|
+
"openai",
|
|
186
|
+
"anthropic",
|
|
187
|
+
"google",
|
|
188
|
+
"groq",
|
|
189
|
+
"mistral",
|
|
190
|
+
"xai",
|
|
191
|
+
"openrouter",
|
|
192
|
+
"cerebras",
|
|
193
|
+
"huggingface",
|
|
194
|
+
"ollama",
|
|
195
|
+
"meta",
|
|
196
|
+
"deepseek",
|
|
197
|
+
"microsoft",
|
|
198
|
+
"nvidia",
|
|
199
|
+
"qwen",
|
|
200
|
+
"cohere",
|
|
201
|
+
"perplexity",
|
|
202
|
+
"amazon",
|
|
203
|
+
"baidu",
|
|
204
|
+
"together",
|
|
205
|
+
"fireworks-ai",
|
|
206
|
+
"replicate",
|
|
207
|
+
"nebius",
|
|
208
|
+
"novita",
|
|
209
|
+
"comfyui",
|
|
210
|
+
"fal",
|
|
211
|
+
"kokoro",
|
|
212
|
+
"piper",
|
|
213
|
+
"sambanova",
|
|
214
|
+
"pi-ai",
|
|
215
|
+
"zai"
|
|
216
|
+
// NO SVG: bytedance, tencent, xiaomi, ibm, ai21, inflection, upstage, minimax
|
|
217
|
+
]);
|
|
218
|
+
var _cache = /* @__PURE__ */ new Map();
|
|
249
219
|
function getProviderLogo(providerId) {
|
|
250
220
|
if (!providerId) return void 0;
|
|
251
|
-
|
|
221
|
+
const cached = _cache.get(providerId);
|
|
222
|
+
if (cached) return cached;
|
|
252
223
|
const normalized = providerId.toLowerCase().replace(/[-_\s]/g, "");
|
|
253
|
-
|
|
254
|
-
|
|
224
|
+
let matchedId = null;
|
|
225
|
+
for (const id of PROVIDER_IDS) {
|
|
226
|
+
if (id === providerId) {
|
|
227
|
+
matchedId = id;
|
|
228
|
+
break;
|
|
229
|
+
}
|
|
255
230
|
}
|
|
256
|
-
|
|
231
|
+
if (!matchedId) {
|
|
232
|
+
for (const id of PROVIDER_IDS) {
|
|
233
|
+
if (id.replace(/[-_\s]/g, "") === normalized) {
|
|
234
|
+
matchedId = id;
|
|
235
|
+
break;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
if (!matchedId) return void 0;
|
|
240
|
+
const logo = {
|
|
241
|
+
png: `${CDN_BASE}/png/${matchedId}.png`
|
|
242
|
+
};
|
|
243
|
+
if (HAS_SVG.has(matchedId)) {
|
|
244
|
+
logo.svg = `${CDN_BASE}/svg/${matchedId}.svg`;
|
|
245
|
+
}
|
|
246
|
+
_cache.set(providerId, logo);
|
|
247
|
+
return logo;
|
|
257
248
|
}
|
|
249
|
+
function getAllProviderLogos() {
|
|
250
|
+
const result = {};
|
|
251
|
+
for (const id of PROVIDER_IDS) {
|
|
252
|
+
const logo = getProviderLogo(id);
|
|
253
|
+
if (logo) result[id] = logo;
|
|
254
|
+
}
|
|
255
|
+
return result;
|
|
256
|
+
}
|
|
257
|
+
var _allLogos = null;
|
|
258
|
+
var PROVIDER_LOGOS = new Proxy({}, {
|
|
259
|
+
get(_, prop) {
|
|
260
|
+
if (!_allLogos) _allLogos = getAllProviderLogos();
|
|
261
|
+
return _allLogos[prop];
|
|
262
|
+
},
|
|
263
|
+
ownKeys() {
|
|
264
|
+
if (!_allLogos) _allLogos = getAllProviderLogos();
|
|
265
|
+
return Object.keys(_allLogos);
|
|
266
|
+
},
|
|
267
|
+
getOwnPropertyDescriptor(_, prop) {
|
|
268
|
+
if (!_allLogos) _allLogos = getAllProviderLogos();
|
|
269
|
+
if (prop in _allLogos) {
|
|
270
|
+
return { configurable: true, enumerable: true, value: _allLogos[prop] };
|
|
271
|
+
}
|
|
272
|
+
return void 0;
|
|
273
|
+
},
|
|
274
|
+
has(_, prop) {
|
|
275
|
+
if (!_allLogos) _allLogos = getAllProviderLogos();
|
|
276
|
+
return prop in _allLogos;
|
|
277
|
+
}
|
|
278
|
+
});
|
|
258
279
|
|
|
259
280
|
// src/registry.ts
|
|
260
281
|
var Registry = class {
|
|
@@ -792,7 +813,20 @@ var PiAiProvider = class {
|
|
|
792
813
|
"qwen/": "qwen",
|
|
793
814
|
"cohere/": "cohere",
|
|
794
815
|
"perplexity/": "perplexity",
|
|
795
|
-
"amazon/": "amazon"
|
|
816
|
+
"amazon/": "amazon",
|
|
817
|
+
"z-ai/": "zai",
|
|
818
|
+
"minimax/": "minimax",
|
|
819
|
+
"baidu/": "baidu",
|
|
820
|
+
"bytedance/": "bytedance",
|
|
821
|
+
"bytedance-seed/": "bytedance",
|
|
822
|
+
"tencent/": "tencent",
|
|
823
|
+
"xiaomi/": "xiaomi",
|
|
824
|
+
"ibm-granite/": "ibm",
|
|
825
|
+
"ibm/": "ibm",
|
|
826
|
+
"ai21/": "ai21",
|
|
827
|
+
"inflection/": "inflection",
|
|
828
|
+
"upstage/": "upstage",
|
|
829
|
+
"alibaba/": "qwen"
|
|
796
830
|
};
|
|
797
831
|
const lower = modelId.toLowerCase();
|
|
798
832
|
for (const [prefix, provider] of Object.entries(MODEL_PREFIX_TO_PROVIDER)) {
|
|
@@ -1745,7 +1779,9 @@ var Noosphere = class {
|
|
|
1745
1779
|
0 && (module.exports = {
|
|
1746
1780
|
Noosphere,
|
|
1747
1781
|
NoosphereError,
|
|
1782
|
+
PROVIDER_IDS,
|
|
1748
1783
|
PROVIDER_LOGOS,
|
|
1784
|
+
getAllProviderLogos,
|
|
1749
1785
|
getProviderLogo
|
|
1750
1786
|
});
|
|
1751
1787
|
//# sourceMappingURL=index.cjs.map
|