modelpedia 0.0.1
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 +100 -0
- package/dist/index.cjs +35601 -0
- package/dist/index.d.cts +206 -0
- package/dist/index.d.mts +206 -0
- package/dist/index.mjs +35592 -0
- package/package.json +97 -0
package/README.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# modelpedia
|
|
2
|
+
|
|
3
|
+
Open catalog of AI model data — specs, pricing, and capabilities across 30+ providers and 2000+ models.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/modelpedia)
|
|
6
|
+
[](https://github.com/assistant-ui/modelpedia/blob/master/LICENSE)
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install modelpedia
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import {
|
|
18
|
+
allModels,
|
|
19
|
+
providers,
|
|
20
|
+
getModel,
|
|
21
|
+
getProvider,
|
|
22
|
+
getActiveModels,
|
|
23
|
+
getModelsByProvider,
|
|
24
|
+
getModelsByFamily,
|
|
25
|
+
getModelsByCreator,
|
|
26
|
+
} from "modelpedia";
|
|
27
|
+
|
|
28
|
+
// All models (2000+)
|
|
29
|
+
console.log(allModels.length);
|
|
30
|
+
|
|
31
|
+
// Find a specific model
|
|
32
|
+
const model = getModel("openai", "gpt-4o");
|
|
33
|
+
console.log(model?.pricing); // { input: 2.5, output: 10, ... }
|
|
34
|
+
|
|
35
|
+
// Get all active (non-deprecated) models
|
|
36
|
+
const active = getActiveModels();
|
|
37
|
+
|
|
38
|
+
// List models by provider
|
|
39
|
+
const openaiModels = getModelsByProvider("openai");
|
|
40
|
+
|
|
41
|
+
// List models by family
|
|
42
|
+
const gpt4oFamily = getModelsByFamily("gpt-4o");
|
|
43
|
+
|
|
44
|
+
// List models by creator (useful for aggregators like OpenRouter)
|
|
45
|
+
const anthropicModels = getModelsByCreator("anthropic");
|
|
46
|
+
|
|
47
|
+
// Get provider info
|
|
48
|
+
const provider = getProvider("anthropic");
|
|
49
|
+
console.log(provider?.name); // "Anthropic"
|
|
50
|
+
console.log(provider?.api_url); // "https://api.anthropic.com/v1"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Data Structure
|
|
54
|
+
|
|
55
|
+
### Model
|
|
56
|
+
|
|
57
|
+
Each model includes:
|
|
58
|
+
|
|
59
|
+
| Field | Type | Description |
|
|
60
|
+
|-------|------|-------------|
|
|
61
|
+
| `id` | `string` | Model identifier used in API calls |
|
|
62
|
+
| `name` | `string` | Human-readable display name |
|
|
63
|
+
| `provider` | `string` | Provider ID (e.g. `"openai"`) |
|
|
64
|
+
| `created_by` | `string` | Original creator (may differ from provider) |
|
|
65
|
+
| `family` | `string?` | Model family/series (e.g. `"gpt-4o"`) |
|
|
66
|
+
| `status` | `"active" \| "deprecated" \| "preview"` | Lifecycle status |
|
|
67
|
+
| `context_window` | `number?` | Default context window (tokens) |
|
|
68
|
+
| `max_output_tokens` | `number?` | Maximum output tokens |
|
|
69
|
+
| `pricing` | `ModelPricing?` | Pricing per 1M tokens (input, output, cache, batch) |
|
|
70
|
+
| `capabilities` | `ModelCapabilities?` | vision, tool_call, streaming, reasoning, etc. |
|
|
71
|
+
| `modalities` | `ModelModalities?` | Input/output modality support |
|
|
72
|
+
| `performance` | `number?` | Intelligence rating (1-5) |
|
|
73
|
+
| `reasoning` | `number?` | Reasoning rating (1-5) |
|
|
74
|
+
| `speed` | `number?` | Speed rating (1-5) |
|
|
75
|
+
|
|
76
|
+
### Provider
|
|
77
|
+
|
|
78
|
+
Each provider includes:
|
|
79
|
+
|
|
80
|
+
| Field | Type | Description |
|
|
81
|
+
|-------|------|-------------|
|
|
82
|
+
| `id` | `string` | Provider identifier |
|
|
83
|
+
| `name` | `string` | Display name |
|
|
84
|
+
| `region` | `string` | Country code (ISO 3166-1 alpha-2) |
|
|
85
|
+
| `url` | `string` | Website URL |
|
|
86
|
+
| `api_url` | `string` | API base URL |
|
|
87
|
+
| `docs_url` | `string` | Documentation URL |
|
|
88
|
+
| `pricing_url` | `string` | Pricing page URL |
|
|
89
|
+
|
|
90
|
+
## Providers
|
|
91
|
+
|
|
92
|
+
Alibaba Cloud, Amazon Bedrock, Anthropic, Azure, Baseten, Cerebras, Cloudflare, Cohere, Cursor, DeepSeek, Fireworks, Google, Groq, Hugging Face, Meta, Minimax, Mistral, Moonshot, NVIDIA, Ollama, OpenAI, OpenCode, OpenRouter, Perplexity, Qwen, Together AI, Vercel, Vertex AI, xAI, 01.AI, and more.
|
|
93
|
+
|
|
94
|
+
## Data Updates
|
|
95
|
+
|
|
96
|
+
Model data is automatically fetched from provider APIs daily. Community contributions for additional data are welcome — see [CONTRIBUTING.md](../../CONTRIBUTING.md).
|
|
97
|
+
|
|
98
|
+
## License
|
|
99
|
+
|
|
100
|
+
[MIT](../../LICENSE)
|