Compare commits

...

2 Commits

Author SHA1 Message Date
abeatrix 517d7afd0c update nebius nousResearch and vertex 2026-01-19 23:19:37 -08:00
abeatrix b2a21e1a30 feat: models package with comprehensive LLM provider support
Add new models package containing:
- Model definitions and configurations for 15+ LLM providers (OpenAI, Anthropic, Google, AWS, Azure, OpenRouter, xAI, etc.)
- Standardized model metadata including pricing, context windows, capabilities (vision, prompt caching, streaming)
- TypeScript types and interfaces for model configuration
- Bun-based development environment with cursor rules
- Support for 100+ model variants across providers

This package provides a centralized source of truth for LLM model specifications, enabling consistent model selection and cost estimation across the application.
2026-01-19 23:14:15 -08:00
48 changed files with 5399 additions and 0 deletions
@@ -0,0 +1,99 @@
---
description: Use Bun instead of Node.js, npm, pnpm, or vite.
globs: "*.ts, *.tsx, *.html, *.css, *.js, *.jsx, package.json"
alwaysApply: false
---
Default to using Bun instead of Node.js.
- Use `bun <file>` instead of `node <file>` or `ts-node <file>`
- Use `bun test` instead of `jest` or `vitest`
- Use `bun build <file.html|file.ts|file.css>` instead of `webpack` or `esbuild`
- Use `bun install` instead of `npm install` or `yarn install` or `pnpm install`
- Use `bun run <script>` instead of `npm run <script>` or `yarn run <script>` or `pnpm run <script>`
- Bun automatically loads .env, so don't use dotenv.
## APIs
- `Bun.serve()` supports WebSockets, HTTPS, and routes. Don't use `express`.
- `bun:sqlite` for SQLite. Don't use `better-sqlite3`.
- `Bun.redis` for Redis. Don't use `ioredis`.
- `Bun.sql` for Postgres. Don't use `pg` or `postgres.js`.
- `WebSocket` is built-in. Don't use `ws`.
- Prefer `Bun.file` over `node:fs`'s readFile/writeFile
- Bun.$`ls` instead of execa.
## Frontend
Use HTML imports with `Bun.serve()`. Don't use `vite`. HTML imports fully support React, CSS, Tailwind.
Server:
```ts#index.ts
import index from "./index.html"
Bun.serve({
routes: {
"/": index,
"/api/users/:id": {
GET: (req) => {
return new Response(JSON.stringify({ id: req.params.id }));
},
},
},
// optional websocket support
websocket: {
open: (ws) => {
ws.send("Hello, world!");
},
message: (ws, message) => {
ws.send(message);
},
close: (ws) => {
// handle close
}
},
development: {
hmr: true,
console: true,
}
})
```
HTML files can import .tsx, .jsx or .js files directly and Bun's bundler will transpile & bundle automatically. `<link>` tags can point to stylesheets and Bun's CSS bundler will bundle.
```html#index.html
<html>
<body>
<h1>Hello, world!</h1>
<script type="module" src="./frontend.tsx"></script>
</body>
</html>
```
With the following `frontend.tsx`:
```tsx#frontend.tsx
import React from "react";
// import .css files directly and it works
import './index.css';
import { createRoot } from "react-dom/client";
const root = createRoot(document.body);
export default function Frontend() {
return <h1>Hello, world!</h1>;
}
root.render(<Frontend />);
```
Then, run index.ts
```sh
bun --hot ./index.ts
```
For more information, read the Bun API docs in `node_modules/bun-types/docs/**.md`.
+34
View File
@@ -0,0 +1,34 @@
# dependencies (bun install)
node_modules
# output
out
dist
*.tgz
# code coverage
coverage
*.lcov
# logs
logs
_.log
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
# caches
.eslintcache
.cache
*.tsbuildinfo
# IntelliJ based IDEs
.idea
# Finder (MacOS) folder config
.DS_Store
+15
View File
@@ -0,0 +1,15 @@
# @cline/models
To install dependencies:
```bash
bun install
```
To run:
```bash
bun run index.ts
```
This project was created using `bun init` in bun v1.2.16. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.
+25
View File
@@ -0,0 +1,25 @@
{
"lockfileVersion": 1,
"workspaces": {
"": {
"name": "@cline/models",
"devDependencies": {
"@types/bun": "latest",
},
"peerDependencies": {
"typescript": "^5",
},
},
},
"packages": {
"@types/bun": ["@types/bun@1.3.6", "", { "dependencies": { "bun-types": "1.3.6" } }, "sha512-uWCv6FO/8LcpREhenN1d1b6fcspAB+cefwD7uti8C8VffIv0Um08TKMn98FynpTiU38+y2dUO55T11NgDt8VAA=="],
"@types/node": ["@types/node@25.0.9", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-/rpCXHlCWeqClNBwUhDcusJxXYDjZTyE8v5oTO7WbL8eij2nKhUeU89/6xgjU7N4/Vh3He0BtyhJdQbDyhiXAw=="],
"bun-types": ["bun-types@1.3.6", "", { "dependencies": { "@types/node": "*" } }, "sha512-OlFwHcnNV99r//9v5IIOgQ9Uk37gZqrNMCcqEaExdkVq3Avwqok1bJFmvGMCkCE0FqzdY8VMOZpfpR3lwI+CsQ=="],
"typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
"undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="],
}
}
+1
View File
@@ -0,0 +1 @@
console.log("Hello via Bun!")
+11
View File
@@ -0,0 +1,11 @@
{
"name": "@cline/models",
"module": "index.ts",
"type": "module",
"devDependencies": {
"@types/bun": "latest"
},
"peerDependencies": {
"typescript": "^5"
}
}
+8
View File
@@ -0,0 +1,8 @@
// Import all providers to trigger registration
import "./providers/anthropic"
import "./providers/openai"
import "./providers/gemini"
// Export the registry and types for client use
export { ModelRegistry, modelRegistry, type ProviderModels, type RegistryOutput } from "./registry"
export { ApiFormat, type ModelInfo } from "./types"
+8
View File
@@ -0,0 +1,8 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "aihubmix"
const MODELS: Record<string, ModelInfo> = {}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+201
View File
@@ -0,0 +1,201 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "anthropic"
const ANTHROPIC_MODELS: Record<string, ModelInfo> = {
"claude-sonnet-4-5-20250929": {
contextWindow: 200_000,
maxOutputTokens: 8192,
pricing: {
input: 3.0,
output: 15.0,
cacheWrite: 3.75,
cacheRead: 0.3,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: { enabled: true },
},
"claude-sonnet-4-5-20250929:1m": {
contextWindow: 1_000_000,
maxOutputTokens: 8192,
pricing: {
input: 3.0,
output: 15.0,
cacheWrite: 3.75,
cacheRead: 0.3,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: { enabled: true },
},
"claude-haiku-4-5-20251001": {
contextWindow: 200_000,
maxOutputTokens: 8192,
pricing: {
input: 1.0,
output: 5.0,
cacheWrite: 1.25,
cacheRead: 0.1,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: { enabled: true },
},
"claude-sonnet-4-20250514": {
contextWindow: 200_000,
maxOutputTokens: 8192,
pricing: {
input: 3.0,
output: 15.0,
cacheWrite: 3.75,
cacheRead: 0.3,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: { enabled: true },
},
"claude-sonnet-4-20250514:1m": {
contextWindow: 1_000_000,
maxOutputTokens: 8192,
pricing: {
input: 3.0,
output: 15.0,
cacheWrite: 3.75,
cacheRead: 0.3,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: { enabled: true },
},
"claude-opus-4-5-20251101": {
contextWindow: 200_000,
maxOutputTokens: 8192,
pricing: {
input: 5.0,
output: 25.0,
cacheWrite: 6.25,
cacheRead: 0.5,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: { enabled: true },
},
"claude-opus-4-1-20250805": {
contextWindow: 200_000,
maxOutputTokens: 8192,
pricing: {
input: 15.0,
output: 75.0,
cacheWrite: 18.75,
cacheRead: 1.5,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: { enabled: true },
},
"claude-opus-4-20250514": {
contextWindow: 200_000,
maxOutputTokens: 8192,
pricing: {
input: 15.0,
output: 75.0,
cacheWrite: 18.75,
cacheRead: 1.5,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: { enabled: true },
},
"claude-3-7-sonnet-20250219": {
contextWindow: 200_000,
maxOutputTokens: 8192,
pricing: {
input: 3.0,
output: 15.0,
cacheWrite: 3.75,
cacheRead: 0.3,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: { enabled: true },
},
"claude-3-5-sonnet-20241022": {
contextWindow: 200_000,
maxOutputTokens: 8192,
pricing: {
input: 3.0,
output: 15.0,
cacheWrite: 3.75,
cacheRead: 0.3,
},
capabilities: {
images: true,
promptCache: true,
},
},
"claude-3-5-haiku-20241022": {
contextWindow: 200_000,
maxOutputTokens: 8192,
pricing: {
input: 0.8,
output: 4.0,
cacheWrite: 1.0,
cacheRead: 0.08,
},
capabilities: {
images: true,
promptCache: true,
},
},
"claude-3-opus-20240229": {
contextWindow: 200_000,
maxOutputTokens: 4096,
pricing: {
input: 15.0,
output: 75.0,
cacheWrite: 18.75,
cacheRead: 1.5,
},
capabilities: {
images: true,
promptCache: true,
},
},
"claude-3-haiku-20240307": {
contextWindow: 200_000,
maxOutputTokens: 4096,
pricing: {
input: 0.25,
output: 1.25,
cacheWrite: 0.3,
cacheRead: 0.03,
},
capabilities: {
images: true,
promptCache: true,
},
},
}
// Register Anthropic models with the registry
modelRegistry.registerProvider(PROVIDER_NAME, ANTHROPIC_MODELS)
+177
View File
@@ -0,0 +1,177 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "asksage"
const MODELS: Record<string, ModelInfo> = {
"gpt-4o": {
maxOutputTokens: 4096,
contextWindow: 128_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
},
"gpt-4o-gov": {
maxOutputTokens: 4096,
contextWindow: 128_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
},
"gpt-4.1": {
maxOutputTokens: 32_768,
contextWindow: 1_047_576,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
},
"claude-35-sonnet": {
maxOutputTokens: 8192,
contextWindow: 200_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
},
"aws-bedrock-claude-35-sonnet-gov": {
maxOutputTokens: 8192,
contextWindow: 200_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
},
"claude-37-sonnet": {
maxOutputTokens: 8192,
contextWindow: 200_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
},
"claude-4-sonnet": {
maxOutputTokens: 8192,
contextWindow: 200_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
},
"claude-4-opus": {
maxOutputTokens: 8192,
contextWindow: 200_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
},
"google-gemini-2.5-pro": {
maxOutputTokens: 65536,
contextWindow: 1_048_576,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
},
"google-claude-45-sonnet": {
maxOutputTokens: 64000,
contextWindow: 200_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
},
"google-claude-4-opus": {
maxOutputTokens: 32000,
contextWindow: 200_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
},
"gpt-5": {
maxOutputTokens: 65536,
contextWindow: 2_097_152,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
},
"gpt-5-mini": {
maxOutputTokens: 32768,
contextWindow: 1_048_576,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
},
"gpt-5-nano": {
maxOutputTokens: 16384,
contextWindow: 262_144,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
},
}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+8
View File
@@ -0,0 +1,8 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "azure"
const MODELS: Record<string, ModelInfo> = {}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+176
View File
@@ -0,0 +1,176 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "baseten"
const MODELS: Record<string, ModelInfo> = {
"zai-org/GLM-4.6": {
maxOutputTokens: 200_000,
contextWindow: 200_000,
pricing: {
input: 0.6,
output: 2.2,
},
capabilities: {
images: false,
promptCache: false,
},
reasoning: {
enabled: true,
},
description: "Frontier open model with advanced agentic, reasoning and coding capabilities",
},
"moonshotai/Kimi-K2-Thinking": {
maxOutputTokens: 163_800,
contextWindow: 262_000,
pricing: {
input: 0.6,
output: 2.5,
},
capabilities: {
images: false,
promptCache: false,
},
reasoning: {
enabled: true,
},
description: "Kimi K2 Thinking - A model with enhanced reasoning capabilities from Kimi K2",
},
"deepseek-ai/DeepSeek-R1": {
maxOutputTokens: 131_072,
contextWindow: 163_840,
pricing: {
input: 2.55,
output: 5.95,
},
capabilities: {
images: false,
promptCache: false,
},
reasoning: {
enabled: true,
},
description: "DeepSeek's first-generation reasoning model",
},
"deepseek-ai/DeepSeek-R1-0528": {
maxOutputTokens: 131_072,
contextWindow: 163_840,
pricing: {
input: 2.55,
output: 5.95,
},
capabilities: {
images: false,
promptCache: false,
},
reasoning: {
enabled: true,
},
description: "The latest revision of DeepSeek's first-generation reasoning model",
},
"deepseek-ai/DeepSeek-V3-0324": {
maxOutputTokens: 131_072,
contextWindow: 163_840,
pricing: {
input: 0.77,
output: 0.77,
},
capabilities: {
images: false,
promptCache: false,
},
reasoning: {
enabled: true,
},
description: "Fast general-purpose LLM with enhanced reasoning capabilities",
},
"deepseek-ai/DeepSeek-V3.1": {
maxOutputTokens: 131_072,
contextWindow: 163_840,
pricing: {
input: 0.5,
output: 1.5,
},
capabilities: {
images: false,
promptCache: false,
},
reasoning: {
enabled: true,
},
description: "Extremely capable general-purpose LLM with hybrid reasoning capabilities and advanced tool calling",
},
"deepseek-ai/DeepSeek-V3.2": {
maxOutputTokens: 131_072,
contextWindow: 163_840,
pricing: {
input: 0.3,
output: 0.45,
},
capabilities: {
images: false,
promptCache: false,
},
reasoning: {
enabled: true,
},
description: "DeepSeek's hybrid reasoning model with efficient long context scaling with GPT-5 level performance",
},
"Qwen/Qwen3-235B-A22B-Instruct-2507": {
maxOutputTokens: 262_144,
contextWindow: 262_144,
pricing: {
input: 0.22,
output: 0.8,
},
capabilities: {
images: false,
promptCache: false,
},
description: "Mixture-of-experts LLM with math and reasoning capabilities",
},
"Qwen/Qwen3-Coder-480B-A35B-Instruct": {
maxOutputTokens: 262_144,
contextWindow: 262_144,
pricing: {
input: 0.38,
output: 1.53,
},
capabilities: {
images: false,
promptCache: false,
},
description: "Mixture-of-experts LLM with advanced coding and reasoning capabilities",
},
"openai/gpt-oss-120b": {
maxOutputTokens: 128_072,
contextWindow: 128_072,
pricing: {
input: 0.1,
output: 0.5,
},
capabilities: {
images: false,
promptCache: false,
},
reasoning: {
enabled: true,
},
description: "Extremely capable general-purpose LLM with strong, controllable reasoning capabilities",
},
"moonshotai/Kimi-K2-Instruct-0905": {
maxOutputTokens: 168_000,
contextWindow: 262_000,
pricing: {
input: 0.6,
output: 2.5,
},
capabilities: {
images: false,
promptCache: false,
},
description: "State of the art language model for agentic and coding tasks. September Update.",
},
}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+8
View File
@@ -0,0 +1,8 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "bedrock"
const MODELS: Record<string, ModelInfo> = {}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+88
View File
@@ -0,0 +1,88 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "cerebras"
const MODELS: Record<string, ModelInfo> = {
"zai-glm-4.6": {
maxOutputTokens: 40000,
contextWindow: 131072,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
description: "Fast general-purpose model on Cerebras (up to 1,000 tokens/s). To be deprecated soon.",
},
"zai-glm-4.7": {
maxOutputTokens: 40000,
contextWindow: 131072,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
description:
"Highly capable general-purpose model on Cerebras (up to 1,000 tokens/s), competitive with leading proprietary models on coding tasks.",
},
"gpt-oss-120b": {
maxOutputTokens: 65536,
contextWindow: 128000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
description: "Intelligent general purpose model with 3,000 tokens/s",
},
"qwen-3-235b-a22b-instruct-2507": {
maxOutputTokens: 64000,
contextWindow: 64000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
description: "Intelligent model with ~1400 tokens/s",
},
"llama-3.3-70b": {
maxOutputTokens: 64000,
contextWindow: 64000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
description: "Powerful model with ~2600 tokens/s",
},
"qwen-3-32b": {
maxOutputTokens: 64000,
contextWindow: 64000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
description: "SOTA coding performance with ~2500 tokens/s",
},
}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+8
View File
@@ -0,0 +1,8 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "claude-code"
const MODELS: Record<string, ModelInfo> = {}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+37
View File
@@ -0,0 +1,37 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "deepseek"
const MODELS: Record<string, ModelInfo> = {
"deepseek-chat": {
maxOutputTokens: 8_000,
contextWindow: 128_000,
pricing: {
input: 0, // technically there is no input price, it's all either a cache hit or miss (ApiOptions will not show this). Input is the sum of cache reads and writes
output: 1.1,
cacheWrite: 0.27,
cacheRead: 0.07,
},
capabilities: {
images: false,
promptCache: true, // supports context caching, but not in the way anthropic does it (deepseek reports input tokens and reads/writes in the same usage report) FIXME: we need to show users cache stats how deepseek does it
},
},
"deepseek-reasoner": {
maxOutputTokens: 8_000,
contextWindow: 128_000,
pricing: {
input: 0, // technically there is no input price, it's all either a cache hit or miss (ApiOptions will not show this)
output: 2.19,
cacheWrite: 0.55,
cacheRead: 0.14,
},
capabilities: {
images: false,
promptCache: true, // supports context caching, but not in the way anthropic does it (deepseek reports input tokens and reads/writes in the same usage report) FIXME: we need to show users cache stats how deepseek does it
},
},
}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+8
View File
@@ -0,0 +1,8 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "dify"
const MODELS: Record<string, ModelInfo> = {}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+57
View File
@@ -0,0 +1,57 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "doubao"
const MODELS: Record<string, ModelInfo> = {
"doubao-1-5-pro-256k-250115": {
maxOutputTokens: 12_288,
contextWindow: 256_000,
pricing: {
input: 0.7,
output: 1.3,
},
capabilities: {
images: false,
promptCache: false,
},
},
"doubao-1-5-pro-32k-250115": {
maxOutputTokens: 12_288,
contextWindow: 32_000,
pricing: {
input: 0.11,
output: 0.3,
},
capabilities: {
images: false,
promptCache: false,
},
},
"deepseek-v3-250324": {
maxOutputTokens: 12_288,
contextWindow: 128_000,
pricing: {
input: 0.55,
output: 2.19,
},
capabilities: {
images: false,
promptCache: false,
},
},
"deepseek-r1-250120": {
maxOutputTokens: 32_768,
contextWindow: 64_000,
pricing: {
input: 0.27,
output: 1.09,
},
capabilities: {
images: false,
promptCache: false,
},
},
}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+78
View File
@@ -0,0 +1,78 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "fireworks"
const MODELS: Record<string, ModelInfo> = {
"accounts/fireworks/models/kimi-k2-instruct-0905": {
maxOutputTokens: 16384,
contextWindow: 262144,
pricing: {
input: 0.6,
output: 2.5,
cacheRead: 0.15,
},
capabilities: {
images: false,
promptCache: true,
},
description:
"Kimi K2 model gets a new version update: Agentic coding: more accurate, better generalization across scaffolds. Frontend coding: improved aesthetics and functionalities on web, 3d, and other tasks. Context length: extended from 128k to 256k, providing better long-horizon support.",
},
"accounts/fireworks/models/qwen3-235b-a22b-instruct-2507": {
maxOutputTokens: 32768,
contextWindow: 256000,
pricing: {
input: 0.22,
output: 0.88,
},
capabilities: {
images: false,
promptCache: false,
},
description: "Latest Qwen3 thinking model, competitive against the best closed source models in Jul 2025.",
},
"accounts/fireworks/models/qwen3-coder-480b-a35b-instruct": {
maxOutputTokens: 32768,
contextWindow: 256000,
pricing: {
input: 0.45,
output: 1.8,
},
capabilities: {
images: false,
promptCache: false,
},
description: "Qwen3's most agentic code model to date.",
},
"accounts/fireworks/models/deepseek-r1-0528": {
maxOutputTokens: 20480,
contextWindow: 160000,
pricing: {
input: 3,
output: 8,
},
capabilities: {
images: false,
promptCache: false,
},
description:
"05/28 updated checkpoint of Deepseek R1. Its overall performance is now approaching that of leading models, such as O3 and Gemini 2.5 Pro. Compared to the previous version, the upgraded model shows significant improvements in handling complex reasoning tasks, and this version also offers a reduced hallucination rate, enhanced support for function calling, and better experience for vibe coding. Note that fine-tuning for this model is only available through contacting fireworks at https://fireworks.ai/company/contact-us.",
},
"accounts/fireworks/models/deepseek-v3": {
maxOutputTokens: 16384,
contextWindow: 128000,
pricing: {
input: 0.9,
output: 0.9,
},
capabilities: {
images: false,
promptCache: false,
},
description:
"A strong Mixture-of-Experts (MoE) language model with 671B total parameters with 37B activated for each token from Deepseek. Note that fine-tuning for this model is only available through contacting fireworks at https://fireworks.ai/company/contact-us.",
},
}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+300
View File
@@ -0,0 +1,300 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "gemini"
const GEMINI_MODELS: Record<string, ModelInfo> = {
"gemini-3-pro-preview": {
contextWindow: 1_048_576,
maxOutputTokens: 65536,
pricing: {
input: 4.0,
output: 18.0,
cacheRead: 0.4,
},
pricingTiers: [
{
contextWindow: 200000,
input: 2.0,
output: 12.0,
cacheRead: 0.2,
},
{
contextWindow: Infinity,
input: 4.0,
output: 18.0,
cacheRead: 0.4,
},
],
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
thinkingLevel: "high",
supportsThinkingLevel: true,
},
},
"gemini-3-flash-preview": {
contextWindow: 1_048_576,
maxOutputTokens: 65536,
pricing: {
input: 0.5,
output: 3.0,
cacheWrite: 0.05,
},
pricingTiers: [
{
contextWindow: 200000,
input: 0.3,
output: 2.5,
cacheRead: 0.03,
},
{
contextWindow: Infinity,
input: 0.3,
output: 2.5,
cacheRead: 0.03,
},
],
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
enabled: true,
thinkingLevel: "low",
supportsThinkingLevel: true,
},
supportsGlobalEndpoint: true,
},
"gemini-2.5-pro": {
contextWindow: 1_048_576,
maxOutputTokens: 65536,
pricing: {
input: 2.5,
output: 15,
cacheRead: 0.625,
},
pricingTiers: [
{
contextWindow: 200000,
input: 1.25,
output: 10,
cacheRead: 0.31,
},
{
contextWindow: Infinity,
input: 2.5,
output: 15,
cacheRead: 0.625,
},
],
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
maxBudgetTokens: 32767,
},
},
"gemini-2.5-flash-lite-preview-06-17": {
contextWindow: 1_000_000,
maxOutputTokens: 64000,
pricing: {
input: 0.1,
output: 0.4,
cacheRead: 0.025,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
maxBudgetTokens: 24576,
},
supportsGlobalEndpoint: true,
description: "Preview version - may not be available in all regions",
},
"gemini-2.5-flash": {
contextWindow: 1_048_576,
maxOutputTokens: 65536,
pricing: {
input: 0.3,
output: 2.5,
cacheRead: 0.075,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
maxBudgetTokens: 24576,
outputPrice: 3.5,
},
},
"gemini-2.0-flash-001": {
contextWindow: 1_048_576,
maxOutputTokens: 8192,
pricing: {
input: 0.1,
output: 0.4,
cacheRead: 0.025,
cacheWrite: 1.0,
},
capabilities: {
images: true,
promptCache: true,
},
},
"gemini-2.0-flash-lite-preview-02-05": {
contextWindow: 1_048_576,
maxOutputTokens: 8192,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
},
"gemini-2.0-pro-exp-02-05": {
contextWindow: 2_097_152,
maxOutputTokens: 8192,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
},
"gemini-2.0-flash-thinking-exp-01-21": {
contextWindow: 1_048_576,
maxOutputTokens: 65_536,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
},
"gemini-2.0-flash-thinking-exp-1219": {
contextWindow: 32_767,
maxOutputTokens: 8192,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
},
"gemini-2.0-flash-exp": {
contextWindow: 1_048_576,
maxOutputTokens: 8192,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
},
"gemini-1.5-flash-002": {
contextWindow: 1_048_576,
maxOutputTokens: 8192,
pricing: {
input: 0.15,
output: 0.6,
cacheRead: 0.0375,
cacheWrite: 1.0,
},
pricingTiers: [
{
contextWindow: 128000,
input: 0.075,
output: 0.3,
cacheRead: 0.01875,
},
{
contextWindow: Infinity,
input: 0.15,
output: 0.6,
cacheRead: 0.0375,
},
],
capabilities: {
images: true,
promptCache: true,
},
},
"gemini-1.5-flash-exp-0827": {
contextWindow: 1_048_576,
maxOutputTokens: 8192,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
},
"gemini-1.5-flash-8b-exp-0827": {
contextWindow: 1_048_576,
maxOutputTokens: 8192,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
},
"gemini-1.5-pro-002": {
contextWindow: 2_097_152,
maxOutputTokens: 8192,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
},
"gemini-1.5-pro-exp-0827": {
contextWindow: 2_097_152,
maxOutputTokens: 8192,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
},
"gemini-exp-1206": {
contextWindow: 2_097_152,
maxOutputTokens: 8192,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
},
}
modelRegistry.registerProvider(PROVIDER_NAME, GEMINI_MODELS)
+166
View File
@@ -0,0 +1,166 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "groq"
const MODELS: Record<string, ModelInfo> = {
"openai/gpt-oss-120b": {
maxOutputTokens: 32766, // Model fails if you try to use more than 32K tokens
contextWindow: 131_072,
pricing: {
input: 0.15,
output: 0.75,
},
capabilities: {
images: false,
promptCache: false,
},
description:
"A state-of-the-art 120B open-weight Mixture-of-Experts language model optimized for strong reasoning, tool use, and efficient deployment on large GPUs",
},
"openai/gpt-oss-20b": {
maxOutputTokens: 32766, // Model fails if you try to use more than 32K tokens
contextWindow: 131_072,
pricing: {
input: 0.1,
output: 0.5,
},
capabilities: {
images: false,
promptCache: false,
},
description:
"A compact 20B open-weight Mixture-of-Experts language model designed for strong reasoning and tool use, ideal for edge devices and local inference.",
},
// Compound Beta Models - Hybrid architectures optimized for tool use
"compound-beta": {
maxOutputTokens: 8192,
contextWindow: 128000,
pricing: {
input: 0.0,
output: 0.0,
},
capabilities: {
images: false,
promptCache: false,
},
description:
"Compound model using Llama 4 Scout for core reasoning with Llama 3.3 70B for routing and tool use. Excellent for plan/act workflows.",
},
"compound-beta-mini": {
maxOutputTokens: 8192,
contextWindow: 128000,
pricing: {
input: 0.0,
output: 0.0,
},
capabilities: {
images: false,
promptCache: false,
},
description: "Lightweight compound model for faster inference while maintaining tool use capabilities.",
},
// DeepSeek Models - Reasoning-optimized
"deepseek-r1-distill-llama-70b": {
maxOutputTokens: 131072,
contextWindow: 131072,
pricing: {
input: 0.75,
output: 0.99,
},
capabilities: {
images: false,
promptCache: false,
},
description:
"DeepSeek R1 reasoning capabilities distilled into Llama 70B architecture. Excellent for complex problem-solving and planning.",
},
// Llama 4 Models
"meta-llama/llama-4-maverick-17b-128e-instruct": {
maxOutputTokens: 8192,
contextWindow: 131072,
pricing: {
input: 0.2,
output: 0.6,
},
capabilities: {
images: true,
promptCache: false,
},
description: "Meta's Llama 4 Maverick 17B model with 128 experts, supports vision and multimodal tasks.",
},
"meta-llama/llama-4-scout-17b-16e-instruct": {
maxOutputTokens: 8192,
contextWindow: 131072,
pricing: {
input: 0.11,
output: 0.34,
},
capabilities: {
images: true,
promptCache: false,
},
description: "Meta's Llama 4 Scout 17B model with 16 experts, optimized for fast inference and general tasks.",
},
// Llama 3.3 Models
"llama-3.3-70b-versatile": {
maxOutputTokens: 32768,
contextWindow: 131072,
pricing: {
input: 0.59,
output: 0.79,
},
capabilities: {
images: false,
promptCache: false,
},
description: "Meta's latest Llama 3.3 70B model optimized for versatile use cases with excellent performance and speed.",
},
// Llama 3.1 Models - Fast inference
"llama-3.1-8b-instant": {
maxOutputTokens: 131072,
contextWindow: 131072,
pricing: {
input: 0.05,
output: 0.08,
},
capabilities: {
images: false,
promptCache: false,
},
description: "Fast and efficient Llama 3.1 8B model optimized for speed, low latency, and reliable tool execution.",
},
// Moonshot Models
"moonshotai/kimi-k2-instruct": {
maxOutputTokens: 16384,
contextWindow: 131072,
pricing: {
input: 1.0,
output: 3.0,
cacheRead: 0.5, // 50% discount for cached input tokens
},
capabilities: {
images: false,
promptCache: true,
},
description:
"Kimi K2 is Moonshot AI's state-of-the-art Mixture-of-Experts (MoE) language model with 1 trillion total parameters and 32 billion activated parameters.",
},
"moonshotai/kimi-k2-instruct-0905": {
maxOutputTokens: 16384,
contextWindow: 262144,
pricing: {
input: 0.6,
output: 2.5,
cacheRead: 0.15,
},
capabilities: {
images: false,
promptCache: true,
},
description:
"Kimi K2 model gets a new version update: Agentic coding: more accurate, better generalization across scaffolds. Frontend coding: improved aesthetics and functionalities on web, 3d, and other tasks. Context length: extended from 128k to 256k, providing better long-horizon support.",
},
}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+8
View File
@@ -0,0 +1,8 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "hicap"
const MODELS: Record<string, ModelInfo> = {}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
@@ -0,0 +1,9 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "vercel-ai-gateway"
const MODELS: Record<string, ModelInfo> = {}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
modelRegistry.setDefaultModel(PROVIDER_NAME, "DeepSeek-V3")
+102
View File
@@ -0,0 +1,102 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "huggingface"
const MODELS: Record<string, ModelInfo> = {
"openai/gpt-oss-120b": {
contextWindow: 131_072,
maxOutputTokens: 32766,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
description:
"Large open-weight reasoning model for high-end desktops and data centers, built for complex coding, math, and general AI tasks.",
},
"openai/gpt-oss-20b": {
contextWindow: 131_072,
maxOutputTokens: 32766,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
description:
"Medium open-weight reasoning model that runs on most desktops, balancing strong reasoning with broad accessibility.",
},
"moonshotai/Kimi-K2-Instruct": {
contextWindow: 131_072,
maxOutputTokens: 131_072,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
description: "Advanced reasoning model with superior performance across coding, math, and general capabilities.",
},
"deepseek-ai/DeepSeek-V3-0324": {
contextWindow: 64_000,
maxOutputTokens: 8192,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
description: "Advanced reasoning model with superior performance across coding, math, and general capabilities.",
},
"deepseek-ai/DeepSeek-R1": {
contextWindow: 64_000,
maxOutputTokens: 8192,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
description: "DeepSeek's reasoning model with step-by-step thinking capabilities.",
},
"deepseek-ai/DeepSeek-R1-0528": {
contextWindow: 64_000,
maxOutputTokens: 64_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
description: "DeepSeek's reasoning model's latest version with step-by-step thinking capabilities",
},
"meta-llama/Llama-3.1-8B-Instruct": {
contextWindow: 128_000,
maxOutputTokens: 8192,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
description: "Efficient 8B parameter Llama model for general-purpose tasks.",
},
}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+24
View File
@@ -0,0 +1,24 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "liteLlm"
const MODELS: Record<string, ModelInfo> = {
"anthropic/claude-3-7-sonnet-20250219": {
contextWindow: 128_000,
maxOutputTokens: 8_192,
pricing: {
input: 0,
output: 0,
cacheWrite: 0,
cacheRead: 0,
},
capabilities: {
images: true,
promptCache: true,
},
temperature: 0,
},
}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+8
View File
@@ -0,0 +1,8 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "meta"
const MODELS: Record<string, ModelInfo> = {}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+49
View File
@@ -0,0 +1,49 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "minimax"
const MODELS: Record<string, ModelInfo> = {
"MiniMax-M2.1": {
maxOutputTokens: 128_000,
contextWindow: 192_000,
pricing: {
input: 0.3,
output: 1.2,
cacheWrite: 0.0375,
cacheRead: 0.03,
},
capabilities: {
images: false,
promptCache: true,
},
},
"MiniMax-M2.1-lightning": {
maxOutputTokens: 128_000,
contextWindow: 192_000,
pricing: {
input: 0.3,
output: 2.4,
cacheWrite: 0.0375,
cacheRead: 0.03,
},
capabilities: {
images: false,
promptCache: true,
},
},
"MiniMax-M2": {
maxOutputTokens: 128_000,
contextWindow: 192_000,
pricing: {
input: 0.3,
output: 1.2,
},
capabilities: {
images: false,
promptCache: false,
},
},
}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+213
View File
@@ -0,0 +1,213 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "mistral"
const MODELS: Record<string, ModelInfo> = {
"devstral-2512": {
contextWindow: 256_000,
maxOutputTokens: 256_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
},
"labs-devstral-small-2512": {
contextWindow: 256_000,
maxOutputTokens: 256_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
},
"mistral-large-2512": {
contextWindow: 256_000,
maxOutputTokens: 256_000,
pricing: {
input: 0.5,
output: 1.5,
},
capabilities: {
images: false,
promptCache: false,
},
},
"ministral-14b-2512": {
contextWindow: 256_000,
maxOutputTokens: 256_000,
pricing: {
input: 0.2,
output: 0.2,
},
capabilities: {
images: false,
promptCache: false,
},
},
"mistral-large-2411": {
contextWindow: 128_000,
maxOutputTokens: 128_000,
pricing: {
input: 2.0,
output: 6.0,
},
capabilities: {
images: false,
promptCache: false,
},
},
"pixtral-large-2411": {
contextWindow: 131_000,
maxOutputTokens: 131_000,
pricing: {
input: 2.0,
output: 6.0,
},
capabilities: {
images: true,
promptCache: false,
},
},
"ministral-3b-2410": {
contextWindow: 128_000,
maxOutputTokens: 128_000,
pricing: {
input: 0.04,
output: 0.04,
},
capabilities: {
images: false,
promptCache: false,
},
},
"ministral-8b-2410": {
contextWindow: 128_000,
maxOutputTokens: 128_000,
pricing: {
input: 0.1,
output: 0.1,
},
capabilities: {
images: false,
promptCache: false,
},
},
"mistral-small-latest": {
contextWindow: 128_000,
maxOutputTokens: 128_000,
pricing: {
input: 0.1,
output: 0.3,
},
capabilities: {
images: true,
promptCache: false,
},
},
"mistral-medium-latest": {
contextWindow: 128_000,
maxOutputTokens: 128_000,
pricing: {
input: 0.4,
output: 2.0,
},
capabilities: {
images: true,
promptCache: false,
},
},
"mistral-small-2501": {
contextWindow: 32_000,
maxOutputTokens: 32_000,
pricing: {
input: 0.1,
output: 0.3,
},
capabilities: {
images: false,
promptCache: false,
},
},
"pixtral-12b-2409": {
contextWindow: 128_000,
maxOutputTokens: 128_000,
pricing: {
input: 0.15,
output: 0.15,
},
capabilities: {
images: true,
promptCache: false,
},
},
"open-mistral-nemo-2407": {
contextWindow: 128_000,
maxOutputTokens: 128_000,
pricing: {
input: 0.15,
output: 0.15,
},
capabilities: {
images: false,
promptCache: false,
},
},
"open-codestral-mamba": {
contextWindow: 256_000,
maxOutputTokens: 256_000,
pricing: {
input: 0.15,
output: 0.15,
},
capabilities: {
images: false,
promptCache: false,
},
},
"codestral-2501": {
contextWindow: 256_000,
maxOutputTokens: 256_000,
pricing: {
input: 0.3,
output: 0.9,
},
capabilities: {
images: false,
promptCache: false,
},
},
"devstral-small-2505": {
contextWindow: 131_072,
maxOutputTokens: 128_000,
pricing: {
input: 0.1,
output: 0.3,
},
capabilities: {
images: false,
promptCache: false,
},
},
"devstral-medium-latest": {
contextWindow: 131_072,
maxOutputTokens: 128_000,
pricing: {
input: 0.4,
output: 2.0,
},
capabilities: {
images: false,
promptCache: false,
},
},
}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+80
View File
@@ -0,0 +1,80 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "moonshot"
const MODELS: Record<string, ModelInfo> = {
"kimi-k2-0905-preview": {
contextWindow: 262144,
maxOutputTokens: 16384,
pricing: {
input: 0.6,
output: 2.5,
},
capabilities: {
images: false,
promptCache: false,
},
temperature: 0.6,
},
"kimi-k2-0711-preview": {
contextWindow: 131_072,
maxOutputTokens: 32_000,
pricing: {
input: 0.6,
output: 2.5,
},
capabilities: {
images: false,
promptCache: false,
},
temperature: 0.6,
},
"kimi-k2-turbo-preview": {
contextWindow: 262_144,
maxOutputTokens: 32_000,
pricing: {
input: 2.4,
output: 10,
},
capabilities: {
images: false,
promptCache: false,
},
temperature: 0.6,
},
"kimi-k2-thinking": {
contextWindow: 262_144,
maxOutputTokens: 32_000,
pricing: {
input: 0.6,
output: 2.5,
},
capabilities: {
images: false,
promptCache: false,
},
reasoning: {
enabled: true,
},
temperature: 1.0,
},
"kimi-k2-thinking-turbo": {
contextWindow: 262_144,
maxOutputTokens: 32_000,
pricing: {
input: 2.4,
output: 10,
},
capabilities: {
images: false,
promptCache: false,
},
reasoning: {
enabled: true,
},
temperature: 1.0,
},
}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+273
View File
@@ -0,0 +1,273 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "nebius"
const MODELS: Record<string, ModelInfo> = {
"Qwen/Qwen2.5-32B-Instruct-fast": {
maxOutputTokens: 8_192,
contextWindow: 32_768,
pricing: {
input: 0.13,
output: 0.4,
},
capabilities: {
images: false,
promptCache: false,
},
},
"deepseek-ai/DeepSeek-V3": {
maxOutputTokens: 32_000,
contextWindow: 96_000,
pricing: {
input: 0.5,
output: 1.5,
},
capabilities: {
images: false,
promptCache: false,
},
},
"deepseek-ai/DeepSeek-V3-0324-fast": {
maxOutputTokens: 128_000,
contextWindow: 128_000,
pricing: {
input: 2,
output: 6,
},
capabilities: {
images: false,
promptCache: false,
},
},
"deepseek-ai/DeepSeek-R1": {
maxOutputTokens: 32_000,
contextWindow: 96_000,
pricing: {
input: 0.8,
output: 2.4,
},
capabilities: {
images: false,
promptCache: false,
},
},
"deepseek-ai/DeepSeek-R1-fast": {
maxOutputTokens: 32_000,
contextWindow: 96_000,
pricing: {
input: 2,
output: 6,
},
capabilities: {
images: false,
promptCache: false,
},
},
"deepseek-ai/DeepSeek-R1-0528": {
maxOutputTokens: 128_000,
contextWindow: 163_840,
pricing: {
input: 0.8,
output: 2.4,
},
capabilities: {
images: false,
promptCache: false,
},
},
"meta-llama/Llama-3.3-70B-Instruct-fast": {
maxOutputTokens: 32_000,
contextWindow: 96_000,
pricing: {
input: 0.25,
output: 0.75,
},
capabilities: {
images: false,
promptCache: false,
},
},
"Qwen/Qwen2.5-Coder-32B-Instruct-fast": {
maxOutputTokens: 128_000,
contextWindow: 128_000,
pricing: {
input: 0.1,
output: 0.3,
},
capabilities: {
images: false,
promptCache: false,
},
},
"Qwen/Qwen3-4B-fast": {
maxOutputTokens: 32_000,
contextWindow: 41_000,
pricing: {
input: 0.08,
output: 0.24,
},
capabilities: {
images: false,
promptCache: false,
},
},
"Qwen/Qwen3-30B-A3B-fast": {
maxOutputTokens: 32_000,
contextWindow: 41_000,
pricing: {
input: 0.3,
output: 0.9,
},
capabilities: {
images: false,
promptCache: false,
},
},
"Qwen/Qwen3-235B-A22B": {
maxOutputTokens: 32_000,
contextWindow: 41_000,
pricing: {
input: 0.2,
output: 0.6,
},
capabilities: {
images: false,
promptCache: false,
},
},
"openai/gpt-oss-120b": {
maxOutputTokens: 32766, // Quantization: fp4
contextWindow: 131_000,
pricing: {
input: 0.15,
output: 0.6,
},
capabilities: {
images: false,
promptCache: false,
},
},
"moonshotai/Kimi-K2-Instruct": {
maxOutputTokens: 16384, // Quantization: fp4
contextWindow: 131_000,
pricing: {
input: 0.5,
output: 2.4,
},
capabilities: {
images: false,
promptCache: true,
},
},
"Qwen/Qwen3-Coder-480B-A35B-Instruct": {
maxOutputTokens: 163800, // Quantization: fp8
contextWindow: 262_000,
pricing: {
input: 0.4,
output: 1.8,
},
capabilities: {
images: false,
promptCache: false,
},
},
"openai/gpt-oss-20b": {
maxOutputTokens: 32766, // Quantization: fp4
contextWindow: 131_000,
pricing: {
input: 0.05,
output: 0.2,
},
capabilities: {
images: false,
promptCache: false,
},
},
"zai-org/GLM-4.5": {
maxOutputTokens: 98304, // Quantization: fp8
contextWindow: 128_000,
pricing: {
input: 0.6,
output: 2.2,
},
capabilities: {
images: false,
promptCache: true,
},
},
"zai-org/GLM-4.5-Air": {
maxOutputTokens: 98304, // Quantization: fp8
contextWindow: 128_000,
pricing: {
input: 0.2,
output: 1.2,
},
capabilities: {
images: false,
promptCache: true,
},
},
"deepseek-ai/DeepSeek-R1-0528-fast": {
maxOutputTokens: 128000, // Quantization: fp4
contextWindow: 164_000,
pricing: {
input: 2.0,
output: 6.0,
},
capabilities: {
images: false,
promptCache: false,
},
},
"Qwen/Qwen3-235B-A22B-Instruct-2507": {
maxOutputTokens: 64000, // Quantization: fp8
contextWindow: 262_000,
pricing: {
input: 0.2,
output: 0.6,
},
capabilities: {
images: false,
promptCache: false,
},
},
"Qwen/Qwen3-30B-A3B": {
maxOutputTokens: 32000, // Quantization: fp8
contextWindow: 41_000,
pricing: {
input: 0.1,
output: 0.3,
},
capabilities: {
images: false,
promptCache: false,
},
},
"Qwen/Qwen3-32B": {
maxOutputTokens: 16384, // Quantization: fp8
contextWindow: 41_000,
pricing: {
input: 0.1,
output: 0.3,
},
capabilities: {
images: false,
promptCache: false,
},
},
"Qwen/Qwen3-32B-fast": {
maxOutputTokens: 16384, // Quantization: fp8
contextWindow: 41_000,
pricing: {
input: 0.2,
output: 0.6,
},
capabilities: {
images: false,
promptCache: false,
},
},
}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+37
View File
@@ -0,0 +1,37 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "nousResearch"
const MODELS: Record<string, ModelInfo> = {
"Hermes-4-405B": {
maxOutputTokens: 8192,
contextWindow: 128_000,
pricing: {
input: 0.09,
output: 0.37,
},
capabilities: {
images: false,
promptCache: false,
},
description:
"This is the largest model in the Hermes 4 family, and it is the fullest expression of our design, focused on advanced reasoning and creative depth rather than optimizing inference speed or cost.",
},
"Hermes-4-70B": {
maxOutputTokens: 8192,
contextWindow: 128_000,
pricing: {
input: 0.05,
output: 0.2,
},
capabilities: {
images: false,
promptCache: false,
},
description:
"This incarnation of Hermes 4 balances scale and size. It handles complex reasoning tasks, while staying fast and cost effective. A versatile choice for many use cases.",
},
}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+8
View File
@@ -0,0 +1,8 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "oca"
const MODELS: Record<string, ModelInfo> = {}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+78
View File
@@ -0,0 +1,78 @@
import { modelRegistry } from "../registry"
import { ApiFormat, type ModelInfo } from "../types"
const PROVIDER_NAME = "openai-codex"
const MODELS: Record<string, ModelInfo> = {
"gpt-5.2-codex": {
maxOutputTokens: 128_000,
contextWindow: 400_000,
pricing: {
// Subscription-based: no per-token costs
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
enabled: true,
},
apiFormat: ApiFormat.OPENAI_RESPONSES,
description: "GPT-5.2 Codex: OpenAI's flagship coding model via ChatGPT subscription",
},
"gpt-5.1-codex-max": {
maxOutputTokens: 128_000,
contextWindow: 400_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
enabled: true,
},
apiFormat: ApiFormat.OPENAI_RESPONSES,
description: "GPT-5.1 Codex Max: Maximum capability coding model via ChatGPT subscription",
},
"gpt-5.1-codex-mini": {
maxOutputTokens: 128_000,
contextWindow: 400_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
enabled: true,
},
apiFormat: ApiFormat.OPENAI_RESPONSES,
description: "GPT-5.1 Codex Mini: Faster version for coding tasks via ChatGPT subscription",
},
"gpt-5.2": {
maxOutputTokens: 128_000,
contextWindow: 400_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
enabled: true,
},
apiFormat: ApiFormat.OPENAI_RESPONSES,
description: "GPT-5.2: Latest GPT model via ChatGPT subscription",
},
}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+405
View File
@@ -0,0 +1,405 @@
import { modelRegistry } from "../registry"
import { ApiFormat, type ModelInfo } from "../types"
const PROVIDER_NAME = "openai"
const OPENAI_MODELS: Record<string, ModelInfo> = {
"gpt-5.2": {
contextWindow: 272000,
maxOutputTokens: 8_192,
pricing: {
input: 1.75,
output: 14.0,
cacheRead: 0.175,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
enabled: true,
supportsEffortLevel: true,
},
temperature: 1,
systemRole: "developer",
},
"gpt-5.2-codex": {
contextWindow: 400000,
maxOutputTokens: 8_192,
pricing: {
input: 1.75,
output: 14.0,
cacheRead: 0.175,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
enabled: true,
supportsEffortLevel: true,
},
apiFormat: ApiFormat.OPENAI_RESPONSES,
temperature: 1,
systemRole: "developer",
},
"gpt-5.1-2025-11-13": {
contextWindow: 272000,
maxOutputTokens: 8_192,
pricing: {
input: 1.25,
output: 10.0,
cacheRead: 0.125,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
enabled: true,
supportsEffortLevel: true,
},
temperature: 1,
systemRole: "developer",
},
"gpt-5.1": {
contextWindow: 272000,
maxOutputTokens: 8_192,
pricing: {
input: 1.25,
output: 10.0,
cacheRead: 0.125,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
enabled: true,
supportsEffortLevel: true,
},
temperature: 1,
systemRole: "developer",
},
"gpt-5.1-codex": {
contextWindow: 400000,
maxOutputTokens: 8_192,
pricing: {
input: 1.25,
output: 10.0,
cacheRead: 0.125,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
enabled: true,
supportsEffortLevel: true,
},
apiFormat: ApiFormat.OPENAI_RESPONSES,
temperature: 1,
systemRole: "developer",
},
"gpt-5.1-chat-latest": {
contextWindow: 400000,
maxOutputTokens: 8_192,
pricing: {
input: 1.25,
output: 10,
cacheRead: 0.125,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
enabled: true,
supportsEffortLevel: true,
},
temperature: 1,
systemRole: "developer",
},
"gpt-5-2025-08-07": {
contextWindow: 272000,
maxOutputTokens: 8_192,
pricing: {
input: 1.25,
output: 10.0,
cacheRead: 0.125,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
enabled: true,
supportsEffortLevel: true,
},
temperature: 1,
systemRole: "developer",
},
"gpt-5-codex": {
contextWindow: 400000,
maxOutputTokens: 8_192,
pricing: {
input: 1.25,
output: 10.0,
cacheRead: 0.125,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
enabled: true,
supportsEffortLevel: true,
},
apiFormat: ApiFormat.OPENAI_RESPONSES,
temperature: 1,
systemRole: "developer",
},
"gpt-5-mini-2025-08-07": {
contextWindow: 272000,
maxOutputTokens: 8_192,
pricing: {
input: 0.25,
output: 2.0,
cacheRead: 0.025,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
enabled: true,
supportsEffortLevel: true,
},
temperature: 1,
systemRole: "developer",
},
"gpt-5-nano-2025-08-07": {
contextWindow: 272000,
maxOutputTokens: 8_192,
pricing: {
input: 0.05,
output: 0.4,
cacheRead: 0.005,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
enabled: true,
supportsEffortLevel: true,
},
temperature: 1,
systemRole: "developer",
},
"gpt-5-chat-latest": {
contextWindow: 400000,
maxOutputTokens: 8_192,
pricing: {
input: 1.25,
output: 10,
cacheRead: 0.125,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
enabled: true,
supportsEffortLevel: true,
},
temperature: 1,
systemRole: "developer",
},
o3: {
contextWindow: 200_000,
maxOutputTokens: 100_000,
pricing: {
input: 2.0,
output: 8.0,
cacheRead: 0.5,
},
capabilities: {
images: true,
promptCache: true,
tools: false,
},
reasoning: {
enabled: true,
supportsEffortLevel: true,
},
systemRole: "developer",
},
"o4-mini": {
contextWindow: 200_000,
maxOutputTokens: 100_000,
pricing: {
input: 1.1,
output: 4.4,
cacheRead: 0.275,
},
capabilities: {
images: true,
promptCache: true,
tools: false,
},
reasoning: {
enabled: true,
supportsEffortLevel: true,
},
systemRole: "developer",
},
"gpt-4.1": {
contextWindow: 1_047_576,
maxOutputTokens: 32_768,
pricing: {
input: 2,
output: 8,
cacheRead: 0.5,
},
capabilities: {
images: true,
promptCache: true,
},
temperature: 0,
},
"gpt-4.1-mini": {
contextWindow: 1_047_576,
maxOutputTokens: 32_768,
pricing: {
input: 0.4,
output: 1.6,
cacheRead: 0.1,
},
capabilities: {
images: true,
promptCache: true,
},
temperature: 0,
},
"gpt-4.1-nano": {
contextWindow: 1_047_576,
maxOutputTokens: 32_768,
pricing: {
input: 0.1,
output: 0.4,
cacheRead: 0.025,
},
capabilities: {
images: true,
promptCache: true,
},
temperature: 0,
},
"o3-mini": {
contextWindow: 200_000,
maxOutputTokens: 100_000,
pricing: {
input: 1.1,
output: 4.4,
cacheRead: 0.55,
},
capabilities: {
images: false,
promptCache: true,
tools: false,
},
reasoning: {
enabled: true,
supportsEffortLevel: true,
},
systemRole: "developer",
},
// don't support tool use yet
o1: {
contextWindow: 200_000,
maxOutputTokens: 100_000,
pricing: {
input: 15,
output: 60,
cacheRead: 7.5,
},
capabilities: {
images: true,
promptCache: false,
streaming: false,
},
},
"o1-preview": {
contextWindow: 128_000,
maxOutputTokens: 32_768,
pricing: {
input: 15,
output: 60,
cacheRead: 7.5,
},
capabilities: {
images: true,
promptCache: true,
streaming: false,
},
},
"o1-mini": {
contextWindow: 128_000,
maxOutputTokens: 65_536,
pricing: {
input: 1.1,
output: 4.4,
cacheRead: 0.55,
},
capabilities: {
images: true,
promptCache: true,
streaming: false,
},
},
"gpt-4o": {
contextWindow: 128_000,
maxOutputTokens: 4_096,
pricing: {
input: 2.5,
output: 10,
cacheRead: 1.25,
},
capabilities: {
images: true,
promptCache: true,
},
temperature: 0,
},
"gpt-4o-mini": {
contextWindow: 128_000,
maxOutputTokens: 16_384,
pricing: {
input: 0.15,
output: 0.6,
cacheRead: 0.075,
},
capabilities: {
images: true,
promptCache: true,
},
temperature: 0,
},
"chatgpt-4o-latest": {
contextWindow: 128_000,
maxOutputTokens: 16_384,
pricing: {
input: 5,
output: 15,
},
capabilities: {
images: true,
promptCache: false,
},
temperature: 0,
},
}
// Register OpenAI models with the registry
modelRegistry.registerProvider(PROVIDER_NAME, OPENAI_MODELS)
+35
View File
@@ -0,0 +1,35 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "qwen-code"
const MODELS: Record<string, ModelInfo> = {
"qwen3-coder-plus": {
maxOutputTokens: 65_536,
contextWindow: 1_000_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
description: "Qwen3 Coder Plus - High-performance coding model with 1M context window for large codebases",
},
"qwen3-coder-flash": {
maxOutputTokens: 65_536,
contextWindow: 1_000_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
description: "Qwen3 Coder Flash - Fast coding model with 1M context window optimized for speed",
},
}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+465
View File
@@ -0,0 +1,465 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "qwen-international"
const MODELS: Record<string, ModelInfo> = {
"qwen3-coder-plus": {
maxOutputTokens: 65_536,
contextWindow: 1_000_000,
pricing: {
input: 1,
output: 5,
},
capabilities: {
images: false,
promptCache: false,
},
},
"qwen3-coder-480b-a35b-instruct": {
maxOutputTokens: 65_536,
contextWindow: 204_800,
pricing: {
input: 1.5,
output: 7.5,
},
capabilities: {
images: false,
promptCache: false,
},
},
"qwen3-235b-a22b": {
maxOutputTokens: 16_384,
contextWindow: 131_072,
pricing: {
input: 2,
output: 8,
cacheWrite: 2,
cacheRead: 8,
},
capabilities: {
images: false,
promptCache: false,
},
reasoning: {
maxBudgetTokens: 38_912,
outputPrice: 20,
},
},
"qwen3-32b": {
maxOutputTokens: 16_384,
contextWindow: 131_072,
pricing: {
input: 2,
output: 8,
cacheWrite: 2,
cacheRead: 8,
},
capabilities: {
images: false,
promptCache: false,
},
reasoning: {
maxBudgetTokens: 38_912,
outputPrice: 20,
},
},
"qwen3-30b-a3b": {
maxOutputTokens: 16_384,
contextWindow: 131_072,
pricing: {
input: 0.75,
output: 3,
cacheWrite: 0.75,
cacheRead: 3,
},
capabilities: {
images: false,
promptCache: false,
},
reasoning: {
maxBudgetTokens: 38_912,
outputPrice: 7.5,
},
},
"qwen3-14b": {
maxOutputTokens: 8_192,
contextWindow: 131_072,
pricing: {
input: 1,
output: 4,
cacheWrite: 1,
cacheRead: 4,
},
capabilities: {
images: false,
promptCache: false,
},
reasoning: {
maxBudgetTokens: 38_912,
outputPrice: 10,
},
},
"qwen3-8b": {
maxOutputTokens: 8_192,
contextWindow: 131_072,
pricing: {
input: 0.5,
output: 2,
cacheWrite: 0.5,
cacheRead: 2,
},
capabilities: {
images: false,
promptCache: false,
},
reasoning: {
maxBudgetTokens: 38_912,
outputPrice: 5,
},
},
"qwen3-4b": {
maxOutputTokens: 8_192,
contextWindow: 131_072,
pricing: {
input: 0.3,
output: 1.2,
cacheWrite: 0.3,
cacheRead: 1.2,
},
capabilities: {
images: false,
promptCache: false,
},
reasoning: {
maxBudgetTokens: 38_912,
outputPrice: 3,
},
},
"qwen3-1.7b": {
maxOutputTokens: 8_192,
contextWindow: 32_768,
pricing: {
input: 0.3,
output: 1.2,
cacheWrite: 0.3,
cacheRead: 1.2,
},
capabilities: {
images: false,
promptCache: false,
},
reasoning: {
maxBudgetTokens: 30_720,
outputPrice: 3,
},
},
"qwen3-0.6b": {
maxOutputTokens: 8_192,
contextWindow: 32_768,
pricing: {
input: 0.3,
output: 1.2,
cacheWrite: 0.3,
cacheRead: 1.2,
},
capabilities: {
images: false,
promptCache: false,
},
reasoning: {
maxBudgetTokens: 30_720,
outputPrice: 3,
},
},
"qwen2.5-coder-32b-instruct": {
maxOutputTokens: 8_192,
contextWindow: 131_072,
pricing: {
input: 0.002,
output: 0.006,
cacheWrite: 0.002,
cacheRead: 0.006,
},
capabilities: {
images: false,
promptCache: false,
},
},
"qwen2.5-coder-14b-instruct": {
maxOutputTokens: 8_192,
contextWindow: 131_072,
pricing: {
input: 0.002,
output: 0.006,
cacheWrite: 0.002,
cacheRead: 0.006,
},
capabilities: {
images: false,
promptCache: false,
},
},
"qwen2.5-coder-7b-instruct": {
maxOutputTokens: 8_192,
contextWindow: 131_072,
pricing: {
input: 0.001,
output: 0.002,
cacheWrite: 0.001,
cacheRead: 0.002,
},
capabilities: {
images: false,
promptCache: false,
},
},
"qwen2.5-coder-3b-instruct": {
maxOutputTokens: 8_192,
contextWindow: 32_768,
pricing: {
input: 0.0,
output: 0.0,
cacheWrite: 0.0,
cacheRead: 0.0,
},
capabilities: {
images: false,
promptCache: false,
},
},
"qwen2.5-coder-1.5b-instruct": {
maxOutputTokens: 8_192,
contextWindow: 32_768,
pricing: {
input: 0.0,
output: 0.0,
cacheWrite: 0.0,
cacheRead: 0.0,
},
capabilities: {
images: false,
promptCache: false,
},
},
"qwen2.5-coder-0.5b-instruct": {
maxOutputTokens: 8_192,
contextWindow: 32_768,
pricing: {
input: 0.0,
output: 0.0,
cacheWrite: 0.0,
cacheRead: 0.0,
},
capabilities: {
images: false,
promptCache: false,
},
},
"qwen-coder-plus-latest": {
maxOutputTokens: 129_024,
contextWindow: 131_072,
pricing: {
input: 3.5,
output: 7,
cacheWrite: 3.5,
cacheRead: 7,
},
capabilities: {
images: false,
promptCache: false,
},
},
"qwen-plus-latest": {
maxOutputTokens: 16_384,
contextWindow: 131_072,
pricing: {
input: 0.8,
output: 2,
cacheWrite: 0.8,
cacheRead: 2,
},
capabilities: {
images: false,
promptCache: false,
},
reasoning: {
maxBudgetTokens: 38_912,
outputPrice: 16,
},
},
"qwen-turbo-latest": {
maxOutputTokens: 16_384,
contextWindow: 1_000_000,
pricing: {
input: 0.3,
output: 0.6,
cacheWrite: 0.3,
cacheRead: 0.6,
},
capabilities: {
images: false,
promptCache: false,
},
reasoning: {
maxBudgetTokens: 38_912,
outputPrice: 6,
},
},
"qwen-max-latest": {
maxOutputTokens: 30_720,
contextWindow: 32_768,
pricing: {
input: 2.4,
output: 9.6,
cacheWrite: 2.4,
cacheRead: 9.6,
},
capabilities: {
images: false,
promptCache: false,
},
},
"qwen-coder-plus": {
maxOutputTokens: 129_024,
contextWindow: 131_072,
pricing: {
input: 3.5,
output: 7,
cacheWrite: 3.5,
cacheRead: 7,
},
capabilities: {
images: false,
promptCache: false,
},
},
"qwen-plus": {
maxOutputTokens: 129_024,
contextWindow: 131_072,
pricing: {
input: 0.8,
output: 2,
cacheWrite: 0.8,
cacheRead: 0.2,
},
capabilities: {
images: false,
promptCache: false,
},
},
"qwen-turbo": {
maxOutputTokens: 1_000_000,
contextWindow: 1_000_000,
pricing: {
input: 0.3,
output: 0.6,
cacheWrite: 0.3,
cacheRead: 0.6,
},
capabilities: {
images: false,
promptCache: false,
},
},
"qwen-max": {
maxOutputTokens: 30_720,
contextWindow: 32_768,
pricing: {
input: 2.4,
output: 9.6,
cacheWrite: 2.4,
cacheRead: 9.6,
},
capabilities: {
images: false,
promptCache: false,
},
},
"deepseek-v3": {
maxOutputTokens: 8_000,
contextWindow: 64_000,
pricing: {
input: 0,
output: 0.28,
cacheWrite: 0.14,
cacheRead: 0.014,
},
capabilities: {
images: false,
promptCache: true,
},
},
"deepseek-r1": {
maxOutputTokens: 8_000,
contextWindow: 64_000,
pricing: {
input: 0,
output: 2.19,
cacheWrite: 0.55,
cacheRead: 0.14,
},
capabilities: {
images: false,
promptCache: true,
},
},
"qwen-vl-max": {
maxOutputTokens: 30_720,
contextWindow: 32_768,
pricing: {
input: 3,
output: 9,
cacheWrite: 3,
cacheRead: 9,
},
capabilities: {
images: true,
promptCache: false,
},
},
"qwen-vl-max-latest": {
maxOutputTokens: 129_024,
contextWindow: 131_072,
pricing: {
input: 3,
output: 9,
cacheWrite: 3,
cacheRead: 9,
},
capabilities: {
images: true,
promptCache: false,
},
},
"qwen-vl-plus": {
maxOutputTokens: 6_000,
contextWindow: 8_000,
pricing: {
input: 1.5,
output: 4.5,
cacheWrite: 1.5,
cacheRead: 4.5,
},
capabilities: {
images: true,
promptCache: false,
},
},
"qwen-vl-plus-latest": {
maxOutputTokens: 129_024,
contextWindow: 131_072,
pricing: {
input: 1.5,
output: 4.5,
cacheWrite: 1.5,
cacheRead: 4.5,
},
capabilities: {
images: true,
promptCache: false,
},
},
}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+469
View File
@@ -0,0 +1,469 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "qwen-mainland"
const MODELS: Record<string, ModelInfo> = {
"qwen3-235b-a22b": {
maxOutputTokens: 16_384,
contextWindow: 131_072,
capabilities: {
images: false,
promptCache: false,
},
pricing: {
input: 2,
output: 8,
cacheWrite: 2,
cacheRead: 8,
},
reasoning: {
maxBudgetTokens: 38_912,
outputPrice: 20,
},
},
"qwen3-32b": {
maxOutputTokens: 16_384,
contextWindow: 131_072,
capabilities: {
images: false,
promptCache: false,
},
pricing: {
input: 2,
output: 8,
cacheWrite: 2,
cacheRead: 8,
},
reasoning: {
maxBudgetTokens: 38_912,
outputPrice: 20,
},
},
"qwen3-30b-a3b": {
maxOutputTokens: 16_384,
contextWindow: 131_072,
capabilities: {
images: false,
promptCache: false,
},
pricing: {
input: 0.75,
output: 3,
cacheWrite: 0.75,
cacheRead: 3,
},
reasoning: {
maxBudgetTokens: 38_912,
outputPrice: 7.5,
},
},
"qwen3-14b": {
maxOutputTokens: 8_192,
contextWindow: 131_072,
capabilities: {
images: false,
promptCache: false,
},
pricing: {
input: 1,
output: 4,
cacheWrite: 1,
cacheRead: 4,
},
reasoning: {
maxBudgetTokens: 38_912,
outputPrice: 10,
},
},
"qwen3-8b": {
maxOutputTokens: 8_192,
contextWindow: 131_072,
capabilities: {
images: false,
promptCache: false,
},
pricing: {
input: 0.5,
output: 2,
cacheWrite: 0.5,
cacheRead: 2,
},
reasoning: {
maxBudgetTokens: 38_912,
outputPrice: 5,
},
},
"qwen3-4b": {
maxOutputTokens: 8_192,
contextWindow: 131_072,
capabilities: {
images: false,
promptCache: false,
},
pricing: {
input: 0.3,
output: 1.2,
cacheWrite: 0.3,
cacheRead: 1.2,
},
reasoning: {
maxBudgetTokens: 38_912,
outputPrice: 3,
},
},
"qwen3-1.7b": {
maxOutputTokens: 8_192,
contextWindow: 32_768,
capabilities: {
images: false,
promptCache: false,
},
pricing: {
input: 0.3,
output: 1.2,
cacheWrite: 0.3,
cacheRead: 1.2,
},
reasoning: {
maxBudgetTokens: 30_720,
outputPrice: 3,
},
},
"qwen3-0.6b": {
maxOutputTokens: 8_192,
contextWindow: 32_768,
capabilities: {
images: false,
promptCache: false,
},
pricing: {
input: 0.3,
output: 1.2,
cacheWrite: 0.3,
cacheRead: 1.2,
},
reasoning: {
maxBudgetTokens: 30_720,
outputPrice: 3,
},
},
"qwen2.5-coder-32b-instruct": {
maxOutputTokens: 8_192,
contextWindow: 131_072,
capabilities: {
images: false,
promptCache: false,
},
pricing: {
input: 0.002,
output: 0.006,
cacheWrite: 0.002,
cacheRead: 0.006,
},
},
"qwen2.5-coder-14b-instruct": {
maxOutputTokens: 8_192,
contextWindow: 131_072,
capabilities: {
images: false,
promptCache: false,
},
pricing: {
input: 0.002,
output: 0.006,
cacheWrite: 0.002,
cacheRead: 0.006,
},
},
"qwen2.5-coder-7b-instruct": {
maxOutputTokens: 8_192,
contextWindow: 131_072,
capabilities: {
images: false,
promptCache: false,
},
pricing: {
input: 0.001,
output: 0.002,
cacheWrite: 0.001,
cacheRead: 0.002,
},
},
"qwen2.5-coder-3b-instruct": {
maxOutputTokens: 8_192,
contextWindow: 32_768,
capabilities: {
images: false,
promptCache: false,
},
pricing: {
input: 0.0,
output: 0.0,
cacheWrite: 0.0,
cacheRead: 0.0,
},
},
"qwen2.5-coder-1.5b-instruct": {
maxOutputTokens: 8_192,
contextWindow: 32_768,
capabilities: {
images: false,
promptCache: false,
},
pricing: {
input: 0.0,
output: 0.0,
cacheWrite: 0.0,
cacheRead: 0.0,
},
},
"qwen2.5-coder-0.5b-instruct": {
maxOutputTokens: 8_192,
contextWindow: 32_768,
capabilities: {
images: false,
promptCache: false,
},
pricing: {
input: 0.0,
output: 0.0,
cacheWrite: 0.0,
cacheRead: 0.0,
},
},
"qwen-coder-plus-latest": {
maxOutputTokens: 129_024,
contextWindow: 131_072,
capabilities: {
images: false,
promptCache: false,
},
pricing: {
input: 3.5,
output: 7,
cacheWrite: 3.5,
cacheRead: 7,
},
},
"qwen-plus-latest": {
maxOutputTokens: 16_384,
contextWindow: 131_072,
capabilities: {
images: false,
promptCache: false,
},
pricing: {
input: 0.8,
output: 2,
cacheWrite: 0.8,
cacheRead: 2,
},
reasoning: {
maxBudgetTokens: 38_912,
outputPrice: 16,
},
},
"qwen-turbo-latest": {
maxOutputTokens: 16_384,
contextWindow: 1_000_000,
capabilities: {
images: false,
promptCache: false,
},
pricing: {
input: 0.3,
output: 0.6,
cacheWrite: 0.3,
cacheRead: 0.6,
},
reasoning: {
maxBudgetTokens: 38_912,
outputPrice: 6,
},
},
"qwen-max-latest": {
maxOutputTokens: 30_720,
contextWindow: 32_768,
capabilities: {
images: false,
promptCache: false,
},
pricing: {
input: 2.4,
output: 9.6,
cacheWrite: 2.4,
cacheRead: 9.6,
},
},
"qwq-plus-latest": {
maxOutputTokens: 8_192,
contextWindow: 131_071,
capabilities: {
images: false,
promptCache: false,
},
pricing: {
input: 0.0,
output: 0.0,
cacheWrite: 0.0,
cacheRead: 0.0,
},
},
"qwq-plus": {
maxOutputTokens: 8_192,
contextWindow: 131_071,
capabilities: {
images: false,
promptCache: false,
},
pricing: {
input: 0.0,
output: 0.0,
cacheWrite: 0.0,
cacheRead: 0.0,
},
},
"qwen-coder-plus": {
maxOutputTokens: 129_024,
contextWindow: 131_072,
capabilities: {
images: false,
promptCache: false,
},
pricing: {
input: 3.5,
output: 7,
cacheWrite: 3.5,
cacheRead: 7,
},
},
"qwen-plus": {
maxOutputTokens: 129_024,
contextWindow: 131_072,
capabilities: {
images: false,
promptCache: false,
},
pricing: {
input: 0.8,
output: 2,
cacheWrite: 0.8,
cacheRead: 0.2,
},
},
"qwen-turbo": {
maxOutputTokens: 1_000_000,
contextWindow: 1_000_000,
capabilities: {
images: false,
promptCache: false,
},
pricing: {
input: 0.3,
output: 0.6,
cacheWrite: 0.3,
cacheRead: 0.6,
},
},
"qwen-max": {
maxOutputTokens: 30_720,
contextWindow: 32_768,
capabilities: {
images: false,
promptCache: false,
},
pricing: {
input: 2.4,
output: 9.6,
cacheWrite: 2.4,
cacheRead: 9.6,
},
},
"deepseek-v3": {
maxOutputTokens: 8_000,
contextWindow: 64_000,
capabilities: {
images: false,
promptCache: true,
},
pricing: {
input: 0,
output: 0.28,
cacheWrite: 0.14,
cacheRead: 0.014,
},
},
"deepseek-r1": {
maxOutputTokens: 8_000,
contextWindow: 64_000,
capabilities: {
images: false,
promptCache: true,
},
pricing: {
input: 0,
output: 2.19,
cacheWrite: 0.55,
cacheRead: 0.14,
},
},
"qwen-vl-max": {
maxOutputTokens: 30_720,
contextWindow: 32_768,
capabilities: {
images: true,
promptCache: false,
},
pricing: {
input: 3,
output: 9,
cacheWrite: 3,
cacheRead: 9,
},
},
"qwen-vl-max-latest": {
maxOutputTokens: 129_024,
contextWindow: 131_072,
capabilities: {
images: true,
promptCache: false,
},
pricing: {
input: 3,
output: 9,
cacheWrite: 3,
cacheRead: 9,
},
},
"qwen-vl-plus": {
maxOutputTokens: 6_000,
contextWindow: 8_000,
capabilities: {
images: true,
promptCache: false,
},
pricing: {
input: 1.5,
output: 4.5,
cacheWrite: 1.5,
cacheRead: 4.5,
},
},
"qwen-vl-plus-latest": {
maxOutputTokens: 129_024,
contextWindow: 131_072,
capabilities: {
images: true,
promptCache: false,
},
pricing: {
input: 1.5,
output: 4.5,
cacheWrite: 1.5,
cacheRead: 4.5,
},
},
}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+8
View File
@@ -0,0 +1,8 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "requesty"
const MODELS: Record<string, ModelInfo> = {}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+165
View File
@@ -0,0 +1,165 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "sambanova"
const MODELS: Record<string, ModelInfo> = {
"Llama-4-Maverick-17B-128E-Instruct": {
contextWindow: 8_000,
maxOutputTokens: 4096,
pricing: {
input: 0.63,
output: 1.8,
},
capabilities: {
images: true,
promptCache: false,
},
},
"Llama-4-Scout-17B-16E-Instruct": {
contextWindow: 8_000,
maxOutputTokens: 4096,
pricing: {
input: 0.4,
output: 0.7,
},
capabilities: {
images: false,
promptCache: false,
},
},
"Meta-Llama-3.3-70B-Instruct": {
contextWindow: 128_000,
maxOutputTokens: 4096,
pricing: {
input: 0.6,
output: 1.2,
},
capabilities: {
images: false,
promptCache: false,
},
},
"DeepSeek-R1-Distill-Llama-70B": {
contextWindow: 128_000,
maxOutputTokens: 4096,
pricing: {
input: 0.7,
output: 1.4,
},
capabilities: {
images: false,
promptCache: false,
},
},
"DeepSeek-R1": {
contextWindow: 16_000,
maxOutputTokens: 4096,
pricing: {
input: 5.0,
output: 7.0,
},
capabilities: {
images: false,
promptCache: false,
},
},
"Meta-Llama-3.1-405B-Instruct": {
contextWindow: 16_000,
maxOutputTokens: 4096,
pricing: {
input: 5.0,
output: 10.0,
},
capabilities: {
images: false,
promptCache: false,
},
},
"Meta-Llama-3.1-8B-Instruct": {
contextWindow: 16_000,
maxOutputTokens: 4096,
pricing: {
input: 0.1,
output: 0.2,
},
capabilities: {
images: false,
promptCache: false,
},
},
"Meta-Llama-3.2-1B-Instruct": {
contextWindow: 16_000,
maxOutputTokens: 4096,
pricing: {
input: 0.04,
output: 0.08,
},
capabilities: {
images: false,
promptCache: false,
},
},
"Meta-Llama-3.2-3B-Instruct": {
contextWindow: 8_000,
maxOutputTokens: 4096,
pricing: {
input: 0.08,
output: 0.16,
},
capabilities: {
images: false,
promptCache: false,
},
},
"Qwen3-32B": {
contextWindow: 16_000,
maxOutputTokens: 4096,
pricing: {
input: 0.4,
output: 0.8,
},
capabilities: {
images: false,
promptCache: false,
},
},
"QwQ-32B": {
contextWindow: 16_000,
maxOutputTokens: 4096,
pricing: {
input: 0.5,
output: 1.0,
},
capabilities: {
images: false,
promptCache: false,
},
},
"DeepSeek-V3-0324": {
contextWindow: 8_000,
maxOutputTokens: 4096,
pricing: {
input: 3.0,
output: 4.5,
},
capabilities: {
images: false,
promptCache: false,
},
},
"DeepSeek-V3.1": {
contextWindow: 32_000,
maxOutputTokens: 7168,
pricing: {
input: 3.0,
output: 4.5,
},
capabilities: {
images: false,
promptCache: false,
},
},
}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+385
View File
@@ -0,0 +1,385 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "sapaicore"
const sapAiCoreModelDescription = "Pricing is calculated using SAP's Capacity Units rather than direct USD pricing."
const MODELS: Record<string, ModelInfo> = {
"anthropic--claude-4.5-haiku": {
maxOutputTokens: 64000,
contextWindow: 200_000,
pricing: {
input: 0,
output: 0,
cacheWrite: 0,
cacheRead: 0,
},
capabilities: {
images: true,
promptCache: true,
},
description: sapAiCoreModelDescription,
},
"anthropic--claude-4.5-sonnet": {
maxOutputTokens: 8192,
contextWindow: 200_000,
pricing: {
input: 0,
output: 0,
cacheWrite: 0,
cacheRead: 0,
},
capabilities: {
images: true,
promptCache: true,
},
description: sapAiCoreModelDescription,
},
"anthropic--claude-4-sonnet": {
maxOutputTokens: 8192,
contextWindow: 200_000,
pricing: {
input: 0,
output: 0,
cacheWrite: 0,
cacheRead: 0,
},
capabilities: {
images: true,
promptCache: true,
},
description: sapAiCoreModelDescription,
},
"anthropic--claude-4.5-opus": {
maxOutputTokens: 8192,
contextWindow: 200_000,
pricing: {
input: 0,
output: 0,
cacheWrite: 0,
cacheRead: 0,
},
capabilities: {
images: true,
promptCache: true,
},
description: sapAiCoreModelDescription,
},
"anthropic--claude-4-opus": {
maxOutputTokens: 8192,
contextWindow: 200_000,
pricing: {
input: 0,
output: 0,
cacheWrite: 0,
cacheRead: 0,
},
capabilities: {
images: true,
promptCache: true,
},
description: sapAiCoreModelDescription,
},
"anthropic--claude-3.7-sonnet": {
maxOutputTokens: 64_000,
contextWindow: 200_000,
pricing: {
input: 0,
output: 0,
cacheWrite: 0,
cacheRead: 0,
},
capabilities: {
images: true,
promptCache: true,
},
description: sapAiCoreModelDescription,
},
"anthropic--claude-3.5-sonnet": {
maxOutputTokens: 8192,
contextWindow: 200_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
description: sapAiCoreModelDescription,
},
"anthropic--claude-3-sonnet": {
maxOutputTokens: 4096,
contextWindow: 200_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
description: sapAiCoreModelDescription,
},
"anthropic--claude-3-haiku": {
maxOutputTokens: 4096,
contextWindow: 200_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
description: sapAiCoreModelDescription,
},
"anthropic--claude-3-opus": {
maxOutputTokens: 4096,
contextWindow: 200_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
description: sapAiCoreModelDescription,
},
"gemini-2.5-pro": {
maxOutputTokens: 65536,
contextWindow: 1_048_576,
pricing: {
input: 0,
output: 0,
cacheWrite: 0,
cacheRead: 0,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
maxBudgetTokens: 32767,
},
description: sapAiCoreModelDescription,
},
"gemini-2.5-flash": {
maxOutputTokens: 65536,
contextWindow: 1_048_576,
pricing: {
input: 0,
output: 0,
cacheWrite: 0,
cacheRead: 0,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
maxBudgetTokens: 24576,
},
description: sapAiCoreModelDescription,
},
"gpt-4": {
maxOutputTokens: 4096,
contextWindow: 200_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
description: sapAiCoreModelDescription,
},
"gpt-4o": {
maxOutputTokens: 4096,
contextWindow: 200_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
description: sapAiCoreModelDescription,
},
"gpt-4o-mini": {
maxOutputTokens: 4096,
contextWindow: 200_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
description: sapAiCoreModelDescription,
},
"gpt-4.1": {
maxOutputTokens: 32_768,
contextWindow: 1_047_576,
pricing: {
input: 0,
output: 0,
cacheWrite: 0,
cacheRead: 0,
},
capabilities: {
images: true,
promptCache: true,
},
description: sapAiCoreModelDescription,
},
"gpt-4.1-nano": {
maxOutputTokens: 32_768,
contextWindow: 1_047_576,
pricing: {
input: 0,
output: 0,
cacheWrite: 0,
cacheRead: 0,
},
capabilities: {
images: true,
promptCache: true,
},
description: sapAiCoreModelDescription,
},
"gpt-5": {
maxOutputTokens: 128_000,
contextWindow: 272_000,
pricing: {
input: 0,
output: 0,
cacheWrite: 0,
cacheRead: 0,
},
capabilities: {
images: true,
promptCache: true,
},
description: sapAiCoreModelDescription,
},
"gpt-5-nano": {
maxOutputTokens: 128_000,
contextWindow: 272_000,
pricing: {
input: 0,
output: 0,
cacheWrite: 0,
cacheRead: 0,
},
capabilities: {
images: true,
promptCache: true,
},
description: sapAiCoreModelDescription,
},
"gpt-5-mini": {
maxOutputTokens: 128_000,
contextWindow: 272_000,
pricing: {
input: 0,
output: 0,
cacheWrite: 0,
cacheRead: 0,
},
capabilities: {
images: true,
promptCache: true,
},
description: sapAiCoreModelDescription,
},
o1: {
maxOutputTokens: 4096,
contextWindow: 200_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
description: sapAiCoreModelDescription,
},
o3: {
maxOutputTokens: 100_000,
contextWindow: 200_000,
pricing: {
input: 0,
output: 0,
cacheWrite: 0,
cacheRead: 0,
},
capabilities: {
images: true,
promptCache: true,
},
description: sapAiCoreModelDescription,
},
"o3-mini": {
maxOutputTokens: 4096,
contextWindow: 200_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
description: sapAiCoreModelDescription,
},
"o4-mini": {
maxOutputTokens: 100_000,
contextWindow: 200_000,
pricing: {
input: 0,
output: 0,
cacheWrite: 0,
cacheRead: 0,
},
capabilities: {
images: true,
promptCache: true,
},
description: sapAiCoreModelDescription,
},
sonar: {
maxOutputTokens: 128_000,
contextWindow: 128_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
description: sapAiCoreModelDescription,
},
"sonar-pro": {
maxOutputTokens: 128_000,
contextWindow: 200_000,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: false,
promptCache: false,
},
description: sapAiCoreModelDescription,
},
}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
@@ -0,0 +1,8 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "vercel-ai-gateway"
const MODELS: Record<string, ModelInfo> = {}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+532
View File
@@ -0,0 +1,532 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "vertex"
const MODELS: Record<string, ModelInfo> = {
"gemini-3-pro-preview": {
maxOutputTokens: 8192,
contextWindow: 1_048_576,
pricing: {
input: 2.0,
output: 12.0,
},
capabilities: {
images: true,
promptCache: true,
},
supportsGlobalEndpoint: true,
temperature: 1.0,
reasoning: {
enabled: true,
thinkingLevel: "high",
supportsThinkingLevel: true,
},
},
"gemini-3-flash-preview": {
maxOutputTokens: 65536,
contextWindow: 1_048_576,
pricing: {
input: 0.5,
output: 3.0,
cacheWrite: 0.05,
},
capabilities: {
images: true,
promptCache: true,
},
supportsGlobalEndpoint: true,
temperature: 1.0,
reasoning: {
enabled: true,
thinkingLevel: "high",
supportsThinkingLevel: true,
},
},
"claude-sonnet-4-5@20250929": {
maxOutputTokens: 8192,
contextWindow: 200_000,
pricing: {
input: 3.0,
output: 15.0,
cacheWrite: 3.75,
cacheRead: 0.3,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
enabled: true,
},
},
"claude-sonnet-4@20250514": {
maxOutputTokens: 8192,
contextWindow: 200_000,
pricing: {
input: 3.0,
output: 15.0,
cacheWrite: 3.75,
cacheRead: 0.3,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
enabled: true,
},
},
"claude-haiku-4-5@20251001": {
maxOutputTokens: 8192,
contextWindow: 200_000,
pricing: {
input: 1.0,
output: 5.0,
cacheWrite: 1.25,
cacheRead: 0.1,
},
capabilities: {
images: false,
promptCache: true,
},
reasoning: {
enabled: true,
},
},
"claude-opus-4-5@20251101": {
maxOutputTokens: 8192,
contextWindow: 200_000,
pricing: {
input: 5.0,
output: 25.0,
cacheWrite: 6.25,
cacheRead: 0.5,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
enabled: true,
},
},
"claude-opus-4-1@20250805": {
maxOutputTokens: 8192,
contextWindow: 200_000,
pricing: {
input: 15.0,
output: 75.0,
cacheWrite: 18.75,
cacheRead: 1.5,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
enabled: true,
},
},
"claude-opus-4@20250514": {
maxOutputTokens: 8192,
contextWindow: 200_000,
pricing: {
input: 15.0,
output: 75.0,
cacheWrite: 18.75,
cacheRead: 1.5,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
enabled: true,
},
},
"claude-3-7-sonnet@20250219": {
maxOutputTokens: 8192,
contextWindow: 200_000,
pricing: {
input: 3.0,
output: 15.0,
cacheWrite: 3.75,
cacheRead: 0.3,
},
capabilities: {
images: true,
promptCache: true,
},
reasoning: {
enabled: true,
maxBudgetTokens: 64000,
outputPrice: 15.0,
},
},
"claude-3-5-sonnet-v2@20241022": {
maxOutputTokens: 8192,
contextWindow: 200_000,
pricing: {
input: 3.0,
output: 15.0,
cacheWrite: 3.75,
cacheRead: 0.3,
},
capabilities: {
images: true,
promptCache: true,
},
},
"claude-3-5-sonnet@20240620": {
maxOutputTokens: 8192,
contextWindow: 200_000,
pricing: {
input: 3.0,
output: 15.0,
cacheWrite: 3.75,
cacheRead: 0.3,
},
capabilities: {
images: true,
promptCache: true,
},
},
"claude-3-5-haiku@20241022": {
maxOutputTokens: 8192,
contextWindow: 200_000,
pricing: {
input: 1.0,
output: 5.0,
cacheWrite: 1.25,
cacheRead: 0.1,
},
capabilities: {
images: true,
promptCache: true,
},
},
"claude-3-opus@20240229": {
maxOutputTokens: 4096,
contextWindow: 200_000,
pricing: {
input: 15.0,
output: 75.0,
cacheWrite: 18.75,
cacheRead: 1.5,
},
capabilities: {
images: true,
promptCache: true,
},
},
"claude-3-haiku@20240307": {
maxOutputTokens: 4096,
contextWindow: 200_000,
pricing: {
input: 0.25,
output: 1.25,
cacheWrite: 0.3,
cacheRead: 0.03,
},
capabilities: {
images: true,
promptCache: true,
},
},
"mistral-large-2411": {
maxOutputTokens: 128_000,
contextWindow: 128_000,
pricing: {
input: 2.0,
output: 6.0,
},
capabilities: {
images: false,
promptCache: false,
},
},
"mistral-small-2503": {
maxOutputTokens: 128_000,
contextWindow: 128_000,
pricing: {
input: 0.1,
output: 0.3,
},
capabilities: {
images: true,
promptCache: false,
},
},
"codestral-2501": {
maxOutputTokens: 256_000,
contextWindow: 256_000,
pricing: {
input: 0.3,
output: 0.9,
},
capabilities: {
images: false,
promptCache: false,
},
},
"llama-4-maverick-17b-128e-instruct-maas": {
maxOutputTokens: 128_000,
contextWindow: 1_048_576,
pricing: {
input: 0.35,
output: 1.15,
},
capabilities: {
images: true,
promptCache: false,
},
},
"llama-4-scout-17b-16e-instruct-maas": {
maxOutputTokens: 1_000_000,
contextWindow: 10_485_760,
pricing: {
input: 0.25,
output: 0.7,
},
capabilities: {
images: true,
promptCache: false,
},
},
"gemini-2.0-flash-001": {
maxOutputTokens: 8192,
contextWindow: 1_048_576,
pricing: {
input: 0.15,
output: 0.6,
cacheWrite: 1.0,
cacheRead: 0.025,
},
capabilities: {
images: true,
promptCache: true,
},
supportsGlobalEndpoint: true,
},
"gemini-2.0-flash-lite-001": {
maxOutputTokens: 8192,
contextWindow: 1_048_576,
pricing: {
input: 0.075,
output: 0.3,
},
capabilities: {
images: true,
promptCache: false,
},
supportsGlobalEndpoint: true,
},
"gemini-2.0-flash-thinking-exp-1219": {
maxOutputTokens: 8192,
contextWindow: 32_767,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
supportsGlobalEndpoint: true,
},
"gemini-2.0-flash-exp": {
maxOutputTokens: 8192,
contextWindow: 1_048_576,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
supportsGlobalEndpoint: true,
},
"gemini-2.5-pro-exp-03-25": {
maxOutputTokens: 65536,
contextWindow: 1_048_576,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
},
"gemini-2.5-pro": {
maxOutputTokens: 65536,
contextWindow: 1_048_576,
pricing: {
input: 2.5,
output: 15,
cacheRead: 0.625,
},
capabilities: {
images: true,
promptCache: true,
},
supportsGlobalEndpoint: true,
reasoning: {
maxBudgetTokens: 32767,
},
pricingTiers: [
{
contextWindow: 200000,
input: 1.25,
output: 10,
cacheRead: 0.31,
},
{
contextWindow: Infinity,
input: 2.5,
output: 15,
cacheRead: 0.625,
},
],
},
"gemini-2.5-flash": {
maxOutputTokens: 65536,
contextWindow: 1_048_576,
pricing: {
input: 0.3,
output: 2.5,
},
capabilities: {
images: true,
promptCache: true,
},
supportsGlobalEndpoint: true,
reasoning: {
maxBudgetTokens: 24576,
outputPrice: 3.5,
},
},
"gemini-2.5-flash-lite-preview-06-17": {
maxOutputTokens: 64000,
contextWindow: 1_000_000,
pricing: {
input: 0.1,
output: 0.4,
cacheRead: 0.025,
},
capabilities: {
images: true,
promptCache: true,
},
supportsGlobalEndpoint: true,
description: "Preview version - may not be available in all regions",
reasoning: {
maxBudgetTokens: 24576,
},
},
"gemini-2.0-flash-thinking-exp-01-21": {
maxOutputTokens: 65_536,
contextWindow: 1_048_576,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
supportsGlobalEndpoint: true,
},
"gemini-exp-1206": {
maxOutputTokens: 8192,
contextWindow: 2_097_152,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
},
"gemini-1.5-flash-002": {
maxOutputTokens: 8192,
contextWindow: 1_048_576,
pricing: {
input: 0.15,
output: 0.6,
cacheWrite: 1.0,
cacheRead: 0.0375,
},
capabilities: {
images: true,
promptCache: true,
},
pricingTiers: [
{
contextWindow: 128000,
input: 0.075,
output: 0.3,
cacheRead: 0.01875,
},
{
contextWindow: Infinity,
input: 0.15,
output: 0.6,
cacheRead: 0.0375,
},
],
},
"gemini-1.5-flash-exp-0827": {
maxOutputTokens: 8192,
contextWindow: 1_048_576,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
},
"gemini-1.5-flash-8b-exp-0827": {
maxOutputTokens: 8192,
contextWindow: 1_048_576,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
},
"gemini-1.5-pro-002": {
maxOutputTokens: 8192,
contextWindow: 2_097_152,
pricing: {
input: 1.25,
output: 5,
},
capabilities: {
images: true,
promptCache: false,
},
},
"gemini-1.5-pro-exp-0827": {
maxOutputTokens: 8192,
contextWindow: 2_097_152,
pricing: {
input: 0,
output: 0,
},
capabilities: {
images: true,
promptCache: false,
},
},
}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+286
View File
@@ -0,0 +1,286 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "xai"
const MODELS: Record<string, ModelInfo> = {
"grok-4": {
maxOutputTokens: 8192,
contextWindow: 262144,
pricing: {
input: 3.0, // will have different pricing for long context vs short context
output: 15.0,
cacheRead: 0.75,
},
capabilities: {
images: true,
promptCache: true,
},
},
"grok-4-1-fast-reasoning": {
contextWindow: 2_000_000,
maxOutputTokens: 8192,
pricing: {
input: 0.2,
output: 0.5,
cacheRead: 0.05,
},
capabilities: {
images: false,
promptCache: true,
},
description: "xAI's Grok 4.1 Reasoning Fast - multimodal model with 2M context.",
},
"grok-4-1-fast-non-reasoning": {
contextWindow: 2_000_000,
maxOutputTokens: 8192,
pricing: {
input: 0.2,
output: 0.5,
cacheRead: 0.05,
},
capabilities: {
images: true,
promptCache: true,
},
description: "xAI's Grok 4.1 Non-Reasoning Fast - multimodal model with 2M context.",
},
"grok-code-fast-1": {
contextWindow: 256_000,
maxOutputTokens: 8192,
pricing: {
input: 0.2,
output: 1.5,
cacheRead: 0.02,
},
capabilities: {
images: false,
promptCache: true,
},
description: "xAI's Grok Coding model.",
},
"grok-4-fast-reasoning": {
maxOutputTokens: 30000,
contextWindow: 2000000,
pricing: {
input: 0.2,
output: 0.5,
cacheRead: 0.05,
},
capabilities: {
images: true,
promptCache: false,
},
description: "xAI's Grok 4 Fast (free) multimodal model with 2M context.",
},
"grok-3-beta": {
maxOutputTokens: 8192,
contextWindow: 131072,
pricing: {
input: 3.0,
output: 15.0,
},
capabilities: {
images: false,
promptCache: true,
},
description: "X AI's Grok-3 beta model with 131K context window",
},
"grok-3-fast-beta": {
maxOutputTokens: 8192,
contextWindow: 131072,
pricing: {
input: 5.0,
output: 25.0,
},
capabilities: {
images: false,
promptCache: true,
},
description: "X AI's Grok-3 fast beta model with 131K context window",
},
"grok-3-mini-beta": {
maxOutputTokens: 8192,
contextWindow: 131072,
pricing: {
input: 0.3,
output: 0.5,
},
capabilities: {
images: false,
promptCache: true,
},
description: "X AI's Grok-3 mini beta model with 131K context window",
},
"grok-3-mini-fast-beta": {
maxOutputTokens: 8192,
contextWindow: 131072,
pricing: {
input: 0.6,
output: 4.0,
},
capabilities: {
images: false,
promptCache: true,
},
description: "X AI's Grok-3 mini fast beta model with 131K context window",
},
"grok-3": {
maxOutputTokens: 8192,
contextWindow: 131072,
pricing: {
input: 3.0,
output: 15.0,
},
capabilities: {
images: false,
promptCache: true,
},
description: "X AI's Grok-3 model with 131K context window",
},
"grok-3-fast": {
maxOutputTokens: 8192,
contextWindow: 131072,
pricing: {
input: 5.0,
output: 25.0,
},
capabilities: {
images: false,
promptCache: true,
},
description: "X AI's Grok-3 fast model with 131K context window",
},
"grok-3-mini": {
maxOutputTokens: 8192,
contextWindow: 131072,
pricing: {
input: 0.3,
output: 0.5,
},
capabilities: {
images: false,
promptCache: true,
},
description: "X AI's Grok-3 mini model with 131K context window",
},
"grok-3-mini-fast": {
maxOutputTokens: 8192,
contextWindow: 131072,
pricing: {
input: 0.6,
output: 4.0,
},
capabilities: {
images: false,
promptCache: true,
},
description: "X AI's Grok-3 mini fast model with 131K context window",
},
"grok-2-latest": {
maxOutputTokens: 8192,
contextWindow: 131072,
pricing: {
input: 2.0,
output: 10.0,
},
capabilities: {
images: false,
promptCache: false,
},
description: "X AI's Grok-2 model - latest version with 131K context window",
},
"grok-2": {
maxOutputTokens: 8192,
contextWindow: 131072,
pricing: {
input: 2.0,
output: 10.0,
},
capabilities: {
images: false,
promptCache: false,
},
description: "X AI's Grok-2 model with 131K context window",
},
"grok-2-1212": {
maxOutputTokens: 8192,
contextWindow: 131072,
pricing: {
input: 2.0,
output: 10.0,
},
capabilities: {
images: false,
promptCache: false,
},
description: "X AI's Grok-2 model (version 1212) with 131K context window",
},
"grok-2-vision-latest": {
maxOutputTokens: 8192,
contextWindow: 32768,
pricing: {
input: 2.0,
output: 10.0,
},
capabilities: {
images: true,
promptCache: false,
},
description: "X AI's Grok-2 Vision model - latest version with image support and 32K context window",
},
"grok-2-vision": {
maxOutputTokens: 8192,
contextWindow: 32768,
pricing: {
input: 2.0,
output: 10.0,
},
capabilities: {
images: true,
promptCache: false,
},
description: "X AI's Grok-2 Vision model with image support and 32K context window",
},
"grok-2-vision-1212": {
maxOutputTokens: 8192,
contextWindow: 32768,
pricing: {
input: 2.0,
output: 10.0,
},
capabilities: {
images: true,
promptCache: false,
},
description: "X AI's Grok-2 Vision model (version 1212) with image support and 32K context window",
},
"grok-vision-beta": {
maxOutputTokens: 8192,
contextWindow: 8192,
pricing: {
input: 5.0,
output: 15.0,
},
capabilities: {
images: true,
promptCache: false,
},
description: "X AI's Grok Vision Beta model with image support and 8K context window",
},
"grok-beta": {
maxOutputTokens: 8192,
contextWindow: 131072,
pricing: {
input: 5.0,
output: 15.0,
},
capabilities: {
images: false,
promptCache: false,
},
description: "X AI's Grok Beta model (legacy) with 131K context window",
},
}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
@@ -0,0 +1,8 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "zai-international"
const MODELS: Record<string, ModelInfo> = {}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+8
View File
@@ -0,0 +1,8 @@
import { modelRegistry } from "../registry"
import type { ModelInfo } from "../types"
const PROVIDER_NAME = "zai-mainland"
const MODELS: Record<string, ModelInfo> = {}
modelRegistry.registerProvider(PROVIDER_NAME, MODELS)
+129
View File
@@ -0,0 +1,129 @@
import type { ModelInfo } from "./types"
export interface ProviderModels {
[modelId: string]: ModelInfo
}
export interface RegistryOutput {
[providerName: string]: ProviderModels
}
class ModelRegistry {
private providers: Map<string, ProviderModels> = new Map()
private defaultModels: Map<string, string> = new Map()
/**
* Register a provider with its models
* @param providerName - The name of the provider (e.g., "anthropic", "openai")
* @param models - A record of model IDs to their ModelInfo
*/
registerProvider(providerName: string, models: ProviderModels): void {
const existing = this.providers.get(providerName) ?? {}
this.providers.set(providerName, { ...existing, ...models })
}
/**
* Get all registered providers and their models as a JSON object
* @returns An object with provider names as keys and their models as values
*/
getAllModels(): RegistryOutput {
const output: RegistryOutput = {}
for (const [providerName, models] of this.providers) {
output[providerName] = models
}
return output
}
/**
* Get models for a specific provider
* @param providerName - The name of the provider
* @returns The models for that provider, or undefined if not found
*/
getProviderModels(providerName: string): ProviderModels | undefined {
return this.providers.get(providerName)
}
/**
* Get a specific model's info
* @param providerName - The name of the provider
* @param modelId - The model ID
* @returns The ModelInfo for that model, or undefined if not found
*/
getModel(providerName: string, modelId: string): ModelInfo | undefined {
return this.providers.get(providerName)?.[modelId]
}
/**
* Get a list of all registered provider names
* @returns Array of provider names
*/
getProviderNames(): string[] {
return Array.from(this.providers.keys())
}
/**
* Set the default model for a provider
* @param providerName - The name of the provider
* @param modelId - The model ID to set as default
* @throws Error if the provider or model doesn't exist
*/
setDefaultModel(providerName: string, modelId: string): void {
const models = this.providers.get(providerName)
if (!models) {
throw new Error(`Provider "${providerName}" not found`)
}
if (!models[modelId]) {
throw new Error(`Model "${modelId}" not found in provider "${providerName}"`)
}
this.defaultModels.set(providerName, modelId)
}
/**
* Get the default model for a provider
* Falls back to the first registered model if no default is set
* @param providerName - The name of the provider
* @returns The default model ID, or undefined if provider not found
*/
getDefaultModel(providerName: string): string | undefined {
const explicitDefault = this.defaultModels.get(providerName)
if (explicitDefault) {
return explicitDefault
}
// Fall back to first registered model
const models = this.providers.get(providerName)
if (!models) {
return undefined
}
const modelIds = Object.keys(models)
return modelIds[0]
}
/**
* Get the default model info for a provider
* Falls back to the first registered model if no default is set
* @param providerName - The name of the provider
* @returns The ModelInfo for the default model, or undefined if provider not found
*/
getDefaultModelInfo(providerName: string): ModelInfo | undefined {
const modelId = this.getDefaultModel(providerName)
if (!modelId) {
return undefined
}
return this.providers.get(providerName)?.[modelId]
}
/**
* Get all models as a JSON string
* @param pretty - Whether to format with indentation (default: true)
* @returns JSON string of all providers and models
*/
toJSON(pretty: boolean = true): string {
return JSON.stringify(this.getAllModels(), null, pretty ? 2 : undefined)
}
}
// Export a singleton instance for use across the application
export const modelRegistry = new ModelRegistry()
// Also export the class for testing or custom instances
export { ModelRegistry }
+63
View File
@@ -0,0 +1,63 @@
export interface ModelInfo {
// === Token Limits ===
contextWindow: number
maxOutputTokens: number
// === Pricing (per million tokens in USD) ===
pricing: {
input: number
output: number
cacheWrite?: number
cacheRead?: number
}
// === Tiered Pricing (for models with context-based pricing) ===
pricingTiers?: {
contextWindow: number
input?: number
output?: number
cacheWrite?: number
cacheRead?: number
}[]
// === Capabilities ===
capabilities: {
images?: boolean
streaming?: boolean
tools?: boolean
promptCache?: boolean
}
// === Reasoning/Thinking ===
reasoning?: {
enabled?: boolean
supportsEffortLevel?: boolean
maxBudgetTokens?: number
outputPrice?: number // price when thinking budget > 0
// Gemini-specific
thinkingLevel?: "low" | "high"
supportsThinkingLevel?: boolean
}
// === API Configuration ===
apiFormat?: ApiFormat
temperature?: number
systemRole?: string
// === Provider-Specific ===
supportsGlobalEndpoint?: boolean // Vertex AI
// === Metadata ===
description?: string
deprecated?: boolean
}
export enum ApiFormat {
ANTHROPIC_CHAT = 0,
GEMINI_CHAT = 1,
OPENAI_CHAT = 2,
R1_CHAT = 3,
OPENAI_RESPONSES = 4,
UNRECOGNIZED = -1,
}
+31
View File
@@ -0,0 +1,31 @@
{
"compilerOptions": {
// Environment setup & latest features
"lib": [
"ESNext"
],
"target": "ESNext",
"module": "Preserve",
"moduleDetection": "force",
"jsx": "react-jsx",
"allowJs": true,
// Bundler mode
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"noEmit": true,
// Best practices
"strict": true,
"skipLibCheck": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
// Some stricter flags (disabled by default)
"noUnusedLocals": false,
"noUnusedParameters": false,
"noPropertyAccessFromIndexSignature": false
}
}