Compare commits
153
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ceac8a58b | ||
|
|
f107afc57c | ||
|
|
8c677f0134 | ||
|
|
462c7877d9 | ||
|
|
55871f9dca | ||
|
|
4f7194a3c8 | ||
|
|
f65f0148da | ||
|
|
14952f8855 | ||
|
|
d7c6d3ad12 | ||
|
|
356bc79d08 | ||
|
|
a89b1ed726 | ||
|
|
a998576773 | ||
|
|
fbe842bbea | ||
|
|
6c0c3d1b10 | ||
|
|
db0a7cf611 | ||
|
|
d775e37e3b | ||
|
|
36753063d9 | ||
|
|
5ee955297a | ||
|
|
1b77511903 | ||
|
|
8896ead7bf | ||
|
|
eb96594d47 | ||
|
|
327332efe3 | ||
|
|
5020951745 | ||
|
|
cb6f97774e | ||
|
|
7f8b493b0c | ||
|
|
d65a862533 | ||
|
|
8e710e19ea | ||
|
|
36c6896e97 | ||
|
|
a8be548a5d | ||
|
|
8c2fae4ab0 | ||
|
|
5e7fad350d | ||
|
|
feb85ef2c9 | ||
|
|
d4161ebf24 | ||
|
|
b91ab02e2b | ||
|
|
dd09d07f75 | ||
|
|
4515f85d47 | ||
|
|
97572240e1 | ||
|
|
80cc04e9e5 | ||
|
|
d532ebb89b | ||
|
|
9bae3e887f | ||
|
|
0be69bf872 | ||
|
|
0ed38cbecf | ||
|
|
e65703382a | ||
|
|
748754c99b | ||
|
|
ec9c12d0fc | ||
|
|
ac81822c89 | ||
|
|
d32ed764bd | ||
|
|
45fb951c42 | ||
|
|
260d79b2d5 | ||
|
|
746b9caf79 | ||
|
|
8362b55503 | ||
|
|
dde3953a9f | ||
|
|
0a1695212c | ||
|
|
89fbb6bb69 | ||
|
|
005fe0fb5a | ||
|
|
e283875ce7 | ||
|
|
3598019251 | ||
|
|
e9ad8b0a3f | ||
|
|
0ee78eeda5 | ||
|
|
0a5b33e518 | ||
|
|
22416dda64 | ||
|
|
eba2702e3a | ||
|
|
c2c5cc8f21 | ||
|
|
022b1b9946 | ||
|
|
8269e04222 | ||
|
|
a75cf2ed1c | ||
|
|
7b00aafa79 | ||
|
|
e54e0fc8b5 | ||
|
|
38611e75fa | ||
|
|
e62c1e973e | ||
|
|
c2b3c601e4 | ||
|
|
9ff1d36a21 | ||
|
|
e0f4042ad1 | ||
|
|
14736ba4b6 | ||
|
|
9351d68731 | ||
|
|
7a5a1d2aff | ||
|
|
699284ce91 | ||
|
|
21ce5c3ac8 | ||
|
|
3485cf52d0 | ||
|
|
99e8f25c78 | ||
|
|
7102978cb4 | ||
|
|
530f60c69c | ||
|
|
2415c5be21 | ||
|
|
85aba468cd | ||
|
|
d1ec1ba777 | ||
|
|
0f94bf16ec | ||
|
|
506e8f48a9 | ||
|
|
3480bc5992 | ||
|
|
fde97814ef | ||
|
|
ff7eddcb70 | ||
|
|
5cbab85b8d | ||
|
|
6f9820de9f | ||
|
|
cdfb429098 | ||
|
|
1c2546af8a | ||
|
|
2288a1626b | ||
|
|
b3ecfc3d70 | ||
|
|
30b3e677fd | ||
|
|
3b37eee86e | ||
|
|
71f069670e | ||
|
|
f401672689 | ||
|
|
2a0d86a034 | ||
|
|
d9439cdf2f | ||
|
|
3d443d568d | ||
|
|
a76c8fe9dd | ||
|
|
d08e8d6cc1 | ||
|
|
4c06e44047 | ||
|
|
5e344ded49 | ||
|
|
baf4432140 | ||
|
|
bbf72ea4e0 | ||
|
|
addaf1c036 | ||
|
|
55d16a58b6 | ||
|
|
72a4deab66 | ||
|
|
8dd829a187 | ||
|
|
656c6f08a7 | ||
|
|
8979741a32 | ||
|
|
82851b9a3d | ||
|
|
ae511892d7 | ||
|
|
9312418242 | ||
|
|
9828a0177d | ||
|
|
122627a852 | ||
|
|
4dee8d0d34 | ||
|
|
6883e793ce | ||
|
|
e69064709b | ||
|
|
bd8e582b96 | ||
|
|
21945db90f | ||
|
|
1771e02be8 | ||
|
|
bb08fc26e9 | ||
|
|
914a3d9d18 | ||
|
|
bab01dd9ab | ||
|
|
bdaae956af | ||
|
|
6f118145c0 | ||
|
|
386eaed119 | ||
|
|
ba99f1edce | ||
|
|
4aebbe5ca3 | ||
|
|
b98495e9c8 | ||
|
|
950a0446d4 | ||
|
|
41fbfb1a17 | ||
|
|
cf5045a90b | ||
|
|
ef739220de | ||
|
|
7294efee15 | ||
|
|
1e537147eb | ||
|
|
e9f4cecc54 | ||
|
|
fb1ac09883 | ||
|
|
175082d43f | ||
|
|
0f1855c0a7 | ||
|
|
28c0d9ce23 | ||
|
|
90515f1913 | ||
|
|
6c3c4a721c | ||
|
|
c59c4aae6c | ||
|
|
2cb5a99b98 | ||
|
|
0c2e47e8ba | ||
|
|
16a8fa5c20 | ||
|
|
7336b3619c |
No files matched your search
@@ -0,0 +1,83 @@
|
||||
name: Sync Model Catalogs
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "17 8 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- group: aggregators
|
||||
title: "chore(sync): update aggregator model catalogs"
|
||||
branch: automation/sync-models-aggregators
|
||||
labels: automation,model-sync,sync-group:aggregators,provider:openrouter
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
||||
with:
|
||||
ref: dev
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
|
||||
- name: Sync model catalogs
|
||||
run: bun models:sync ${{ matrix.group }}
|
||||
env:
|
||||
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
|
||||
|
||||
- name: Validate models
|
||||
run: bun validate
|
||||
|
||||
- name: Create pull request
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
BRANCH: ${{ matrix.branch }}
|
||||
LABELS: ${{ matrix.labels }}
|
||||
TITLE: ${{ matrix.title }}
|
||||
run: |
|
||||
if [ -z "$(git status --porcelain -- providers)" ]; then
|
||||
echo "No model catalog changes found."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git checkout -B "$BRANCH"
|
||||
git add providers
|
||||
git commit -m "$TITLE"
|
||||
git push --force-with-lease origin "$BRANCH"
|
||||
|
||||
label_args=()
|
||||
IFS=',' read -ra labels <<< "$LABELS"
|
||||
for label in "${labels[@]}"; do
|
||||
gh label create "$label" --color "0E8A16" --description "Automated model catalog sync" >/dev/null 2>&1 || true
|
||||
label_args+=(--label "$label")
|
||||
done
|
||||
|
||||
pr_number="$(gh pr list --head "$BRANCH" --base dev --json number --jq '.[0].number')"
|
||||
if [ -n "$pr_number" ]; then
|
||||
gh pr edit "$pr_number" --title "$TITLE" --body-file .sync/model-sync-report.md
|
||||
for label in "${labels[@]}"; do
|
||||
gh pr edit "$pr_number" --add-label "$label"
|
||||
done
|
||||
else
|
||||
gh pr create --base dev --head "$BRANCH" --title "$TITLE" --body-file .sync/model-sync-report.md "${label_args[@]}"
|
||||
fi
|
||||
@@ -32,6 +32,7 @@
|
||||
"packages/web": {
|
||||
"name": "@models.dev/web",
|
||||
"dependencies": {
|
||||
"@tanstack/virtual-core": "^3.14.0",
|
||||
"hono": "^4.8.0",
|
||||
"models.dev": "workspace:*",
|
||||
},
|
||||
@@ -57,6 +58,8 @@
|
||||
|
||||
"@models.dev/web": ["@models.dev/web@workspace:packages/web"],
|
||||
|
||||
"@tanstack/virtual-core": ["@tanstack/virtual-core@3.14.0", "", {}, "sha512-JLANqGy/D6k4Ujmh8Tr25lGimuOXNiaVyXaCAZS0W+1390sADdGnyUdSWNIfd49gebtIxGMij4IktRVzrdr12Q=="],
|
||||
|
||||
"@tsconfig/bun": ["@tsconfig/bun@1.0.8", "", {}, "sha512-JlJaRaS4hBTypxtFe8WhnwV8blf0R+3yehLk8XuyxUYNx6VXsKCjACSCvOYEFUiqlhlBWxtYCn/zRlOb8BzBQg=="],
|
||||
|
||||
"@types/bun": ["@types/bun@1.3.0", "", { "dependencies": { "bun-types": "1.3.0" } }, "sha512-+lAGCYjXjip2qY375xX/scJeVRmZ5cY0wyHYyCYxNcdEXrQ4AOe3gACgd4iQ8ksOslJtW4VNxBJ8llUwc3a6AA=="],
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{"data":[{"id":"anthropic/claude-opus-4.7-fast","canonical_slug":"anthropic/claude-4.7-opus-fast-20260512","hugging_face_id":null,"name":"Anthropic: Claude Opus 4.7 (Fast)","created":1778613011,"description":"Fast-mode variant of [Opus 4.7](/anthropic/claude-opus-4.7) - identical capabilities with higher output speed at premium 6x pricing.\n\nLearn more in Anthropic's docs: https://platform.claude.com/docs/en/build-with-claude/fast-mode","context_length":1000000,"architecture":{"modality":"text+image+file->text","input_modalities":["text","image","file"],"output_modalities":["text"],"tokenizer":"Claude","instruct_type":null},"pricing":{"prompt":"0.00003","completion":"0.00015","web_search":"0.01","input_cache_read":"0.000003","input_cache_write":"0.0000375"},"top_provider":{"context_length":1000000,"max_completion_tokens":128000,"is_moderated":true},"per_request_limits":null,"supported_parameters":["include_reasoning","max_tokens","reasoning","response_format","stop","structured_outputs","tool_choice","tools","verbosity"],"default_parameters":{"temperature":null,"top_p":null,"top_k":null,"frequency_penalty":null,"presence_penalty":null,"repetition_penalty":null},"supported_voices":null,"knowledge_cutoff":null,"expiration_date":null,"links":{"details":"/api/v1/models/anthropic/claude-4.7-opus-fast-20260512/endpoints"}},{"id":"perceptron/perceptron-mk1","canonical_slug":"perceptron/perceptron-mk1-20260512","hugging_face_id":null,"name":"Perceptron: Perceptron Mk1","created":1778597029,"description":"Perceptron Mk1 (Mark One) is Perceptron's highest-quality vision-language model for video and embodied reasoning.** It accepts image and video inputs paired with natural language queries, and produces detailed visual understanding...","context_length":32768,"architecture":{"modality":"text+image+video->text","input_modalities":["text","image","video"],"output_modalities":["text"],"tokenizer":"Other","instruct_type":null},"pricing":{"prompt":"0.00000015","completion":"0.0000015"},"top_provider":{"context_length":32768,"max_completion_tokens":8192,"is_moderated":false},"per_request_limits":null,"supported_parameters":["frequency_penalty","include_reasoning","max_tokens","presence_penalty","reasoning","structured_outputs","temperature","top_k","top_p"],"default_parameters":{"temperature":null,"top_p":null,"top_k":null,"frequency_penalty":null,"presence_penalty":null,"repetition_penalty":null},"supported_voices":null,"knowledge_cutoff":null,"expiration_date":null,"links":{"details":"/api/v1/models/perceptron/perceptron-mk1-20260512/endpoints"}},{"id":"inclusionai/ring-2.6-1t:free","canonical_slug":"inclusionai/ring-2.6-1t-20260508","hugging_face_id":null,"name":"inclusionAI: Ring-2.6-1T (free)","created":1778247440,"description":"Ring-2.6-1T is a 1T-parameter-scale thinking model with 63B active parameters, built for real-world agent workflows that require both strong capability and operational efficiency. It is optimized for coding agents, tool...","context_length":262144,"architecture":{"modality":"text->text","input_modalities":["text"],"output_modalities":["text"],"tokenizer":"Other","instruct_type":null},"pricing":{"prompt":"0","completion":"0"},"top_provider":{"context_length":262144,"max_completion_tokens":65536,"is_moderated":false},"per_request_limits":null,"supported_parameters":["frequency_penalty","include_reasoning","max_tokens","presence_penalty","reasoning","repetition_penalty","seed","stop","temperature","tool_choice","tools","top_k","top_p"],"default_parameters":{"temperature":null,"top_p":null,"top_k":null,"frequency_penalty":null,"presence_penalty":null,"repetition_penalty":null},"supported_voices":null,"knowledge_cutoff":null,"expiration_date":null,"links":{"details":"/api/v1/models/inclusionai/ring-2.6-1t-20260508/endpoints"}},{"id":"google/gemini-3.1-flash-lite","canonical_slug":"google/gemini-3.1-flash-lite-20260507","hugging_face_id":null,"name":"Google: Gemini 3.1 Flash Lite","created":1778168828,"description":"Gemini 3.1 Flash Lite is Google’s GA high-efficiency multimodal model optimized for low-latency, high-volume workloads. It supports text, image, video, audio, and PDF inputs, and is designed for lightweight agentic...","context_length":1048576,"architecture":{"modality":"text+image+file+audio+video->text","input_modalities":["text","image","video","file","audio"],"output_modalities":["text"],"tokenizer":"Gemini","instruct_type":null},"pricing":{"prompt":"0.00000025","completion":"0.0000015","image":"0.00000025","audio":"0.0000005","web_search":"0.014","internal_reasoning":"0.0000015","input_cache_read":"0.000000025","input_cache_write":"0.00000008333333333333334"},"top_provider":{"context_length":1048576,"max_completion_tokens":65536,"is_moderated":false},"per_request_limits":null,"supported_parameters":["include_reasoning","max_tokens","reasoning","response_format","seed","stop","structured_outputs","temperature","tool_choice","tools","top_p"],"default_parameters":{"temperature":nulLine truncated
|
||||
+4
-1
@@ -18,11 +18,14 @@
|
||||
"validate": "bun ./packages/core/script/validate.ts",
|
||||
"compare:migrations": "bun ./packages/core/script/compare-model-migrations.ts",
|
||||
"chutes:generate": "bun ./packages/core/script/generate-chutes.ts",
|
||||
"databricks:generate": "bun ./packages/core/script/generate-databricks.ts",
|
||||
"helicone:generate": "bun ./packages/core/script/generate-helicone.ts",
|
||||
"venice:generate": "bun ./packages/core/script/generate-venice.ts",
|
||||
"vercel:generate": "bun ./packages/core/script/generate-vercel.ts",
|
||||
"wandb:generate": "bun ./packages/core/script/generate-wandb.ts",
|
||||
"digitalocean:generate": "bun ./packages/core/script/generate-digitalocean.ts"
|
||||
"digitalocean:generate": "bun ./packages/core/script/generate-digitalocean.ts",
|
||||
"ambient:generate": "bun ./packages/core/script/generate-ambient.ts",
|
||||
"models:sync": "bun ./packages/core/script/sync-models.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@cloudflare/workers-types": "^4.20260424.1",
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
#!/usr/bin/env bun
|
||||
|
||||
/**
|
||||
* Generates Ambient model TOML files from https://api.ambient.xyz/v1/models.
|
||||
*
|
||||
* Emits `[extends]`-format TOMLs that inherit upstream metadata
|
||||
* (family, release_date, knowledge, capabilities) from the canonical
|
||||
* provider model, and override only the fields Ambient's API reports:
|
||||
* cost, limit, modalities.
|
||||
*
|
||||
* Flags:
|
||||
* --dry-run Preview generated TOMLs without writing files.
|
||||
*/
|
||||
|
||||
import { z } from "zod";
|
||||
import path from "node:path";
|
||||
import { mkdir } from "node:fs/promises";
|
||||
|
||||
const API_ENDPOINT = "https://api.ambient.xyz/v1/models";
|
||||
|
||||
// Allowlist for the initial rollout.
|
||||
const ALLOWLIST = new Set<string>([
|
||||
"zai-org/GLM-5.1-FP8",
|
||||
"moonshotai/kimi-k2.6",
|
||||
]);
|
||||
|
||||
// Maps Ambient model IDs to canonical <provider>/<model> in this repo.
|
||||
// The generated TOML uses this path as `[extends].from` so capabilities
|
||||
// and metadata propagate from the upstream provider automatically.
|
||||
const EXTENDS_MAP: Record<string, string> = {
|
||||
"zai-org/GLM-5.1-FP8": "zai/glm-5.1",
|
||||
"moonshotai/kimi-k2.6": "moonshotai/kimi-k2.6",
|
||||
};
|
||||
|
||||
const Pricing = z
|
||||
.object({
|
||||
prompt: z.string(),
|
||||
completion: z.string(),
|
||||
input_cache_read: z.string().optional(),
|
||||
input_cache_write: z.string().optional(),
|
||||
})
|
||||
.passthrough();
|
||||
|
||||
const AmbientModel = z
|
||||
.object({
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
context_length: z.number(),
|
||||
max_output_length: z.number(),
|
||||
input_modalities: z.array(z.string()),
|
||||
output_modalities: z.array(z.string()),
|
||||
pricing: Pricing,
|
||||
})
|
||||
.passthrough();
|
||||
|
||||
const AmbientResponse = z
|
||||
.object({
|
||||
object: z.literal("list"),
|
||||
data: z.array(AmbientModel),
|
||||
})
|
||||
.passthrough();
|
||||
|
||||
const ALLOWED_MODALITIES = new Set(["text", "audio", "image", "video", "pdf"]);
|
||||
|
||||
function modalities(values: string[]): string[] {
|
||||
return values
|
||||
.map((v) => v.toLowerCase())
|
||||
.filter((v) => ALLOWED_MODALITIES.has(v));
|
||||
}
|
||||
|
||||
function perMTok(price: string): number {
|
||||
const n = parseFloat(price);
|
||||
if (!Number.isFinite(n)) {
|
||||
throw new Error(`Invalid price: ${price}`);
|
||||
}
|
||||
// Round to 6 decimals to absorb float noise from per-token strings.
|
||||
return Math.round(n * 1_000_000 * 1_000_000) / 1_000_000;
|
||||
}
|
||||
|
||||
function formatToml(
|
||||
model: z.infer<typeof AmbientModel>,
|
||||
extendsFrom: string,
|
||||
): string {
|
||||
const lines: string[] = [];
|
||||
lines.push("[extends]");
|
||||
lines.push(`from = "${extendsFrom}"`);
|
||||
lines.push("");
|
||||
|
||||
lines.push("[cost]");
|
||||
lines.push(`input = ${perMTok(model.pricing.prompt)}`);
|
||||
lines.push(`output = ${perMTok(model.pricing.completion)}`);
|
||||
if (model.pricing.input_cache_read !== undefined) {
|
||||
lines.push(`cache_read = ${perMTok(model.pricing.input_cache_read)}`);
|
||||
}
|
||||
if (model.pricing.input_cache_write !== undefined) {
|
||||
lines.push(`cache_write = ${perMTok(model.pricing.input_cache_write)}`);
|
||||
}
|
||||
lines.push("");
|
||||
|
||||
lines.push("[limit]");
|
||||
lines.push(`context = ${model.context_length}`);
|
||||
lines.push(`output = ${model.max_output_length}`);
|
||||
lines.push("");
|
||||
|
||||
const input = modalities(model.input_modalities);
|
||||
const output = modalities(model.output_modalities);
|
||||
lines.push("[modalities]");
|
||||
lines.push(`input = [${input.map((m) => `"${m}"`).join(", ")}]`);
|
||||
lines.push(`output = [${output.map((m) => `"${m}"`).join(", ")}]`);
|
||||
|
||||
return lines.join("\n") + "\n";
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const dryRun = process.argv.includes("--dry-run");
|
||||
|
||||
const outDir = path.join(
|
||||
import.meta.dirname,
|
||||
"..",
|
||||
"..",
|
||||
"..",
|
||||
"providers",
|
||||
"ambient",
|
||||
"models",
|
||||
);
|
||||
|
||||
const res = await fetch(API_ENDPOINT);
|
||||
if (!res.ok) {
|
||||
console.error(`Fetch failed: ${res.status} ${res.statusText}`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const parsed = AmbientResponse.safeParse(await res.json());
|
||||
if (!parsed.success) {
|
||||
console.error("Invalid Ambient response:", parsed.error.issues);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const selected = parsed.data.data.filter((m) => ALLOWLIST.has(m.id));
|
||||
const missing = [...ALLOWLIST].filter(
|
||||
(id) => !selected.some((m) => m.id === id),
|
||||
);
|
||||
if (missing.length > 0) {
|
||||
console.error(`Allowlisted models missing from API: ${missing.join(", ")}`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
let count = 0;
|
||||
for (const model of selected) {
|
||||
const extendsFrom = EXTENDS_MAP[model.id];
|
||||
if (!extendsFrom) {
|
||||
console.error(`No EXTENDS_MAP entry for ${model.id}; skipping`);
|
||||
continue;
|
||||
}
|
||||
const filePath = path.join(outDir, `${model.id}.toml`);
|
||||
const toml = formatToml(model, extendsFrom);
|
||||
if (dryRun) {
|
||||
console.log(`--- ${path.relative(process.cwd(), filePath)} ---`);
|
||||
console.log(toml);
|
||||
} else {
|
||||
await mkdir(path.dirname(filePath), { recursive: true });
|
||||
await Bun.write(filePath, toml);
|
||||
}
|
||||
count++;
|
||||
}
|
||||
|
||||
console.log(
|
||||
`${dryRun ? "Previewed" : "Wrote"} ${count} model file(s) under providers/ambient/models/`,
|
||||
);
|
||||
}
|
||||
|
||||
await main();
|
||||
@@ -138,7 +138,7 @@ function humanizeModelName(modelId: string): string {
|
||||
return modelPart.replace(/-/g, " ");
|
||||
}
|
||||
|
||||
// ── Family inference (same approach as generate-vercel.ts) ───────────
|
||||
// ── Family inference ───────────
|
||||
|
||||
function isSubstring(target: string, family: string): boolean {
|
||||
return target.toLowerCase().includes(family.toLowerCase());
|
||||
|
||||
@@ -0,0 +1,287 @@
|
||||
#!/usr/bin/env bun
|
||||
|
||||
/**
|
||||
* Generates Databricks model TOML files from the Foundation Model API endpoint.
|
||||
*
|
||||
* Each Databricks endpoint exposes a model from another provider (Anthropic,
|
||||
* OpenAI, Google, etc.), so the generated TOML uses [extends] to inherit
|
||||
* canonical metadata from that upstream provider's TOML in models.dev.
|
||||
*
|
||||
* Usage:
|
||||
* DATABRICKS_HOST=<host> DATABRICKS_TOKEN=<pat> bun run databricks:generate
|
||||
* bun run databricks:generate --workspace <host> --token <pat>
|
||||
*
|
||||
* Flags:
|
||||
* --dry-run: Preview changes without writing files
|
||||
* --new-only: Only create new models, skip updating existing ones
|
||||
*/
|
||||
|
||||
import { z } from "zod";
|
||||
import path from "node:path";
|
||||
import { mkdir, readFile } from "node:fs/promises";
|
||||
import { existsSync } from "node:fs";
|
||||
|
||||
const args = process.argv.slice(2);
|
||||
const flag = (name: string) => {
|
||||
const i = args.indexOf(`--${name}`);
|
||||
return i !== -1 ? args[i + 1] : undefined;
|
||||
};
|
||||
const dryRun = args.includes("--dry-run");
|
||||
const newOnly = args.includes("--new-only");
|
||||
|
||||
const host = flag("workspace") ?? process.env.DATABRICKS_HOST;
|
||||
const token = flag("token") ?? process.env.DATABRICKS_TOKEN;
|
||||
|
||||
if (!host || !token) {
|
||||
console.error(
|
||||
"Usage: DATABRICKS_HOST=<host> DATABRICKS_TOKEN=<pat> bun run databricks:generate",
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const workspace = host.replace(/^https?:\/\//, "").replace(/\/$/, "");
|
||||
const PROVIDERS_DIR = path.join(import.meta.dirname, "..", "..", "..", "providers");
|
||||
const MODELS_DIR = path.join(PROVIDERS_DIR, "databricks", "models");
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// API schemas
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
const FoundationModel = z
|
||||
.object({
|
||||
ai_gateway_v2_supported: z.boolean().optional(),
|
||||
api_types: z.array(z.string()).optional(),
|
||||
})
|
||||
.passthrough();
|
||||
|
||||
const ServedEntity = z
|
||||
.object({
|
||||
foundation_model: FoundationModel.optional(),
|
||||
})
|
||||
.passthrough();
|
||||
|
||||
const Endpoint = z
|
||||
.object({
|
||||
name: z.string(),
|
||||
config: z
|
||||
.object({
|
||||
served_entities: z.array(ServedEntity).optional(),
|
||||
})
|
||||
.passthrough()
|
||||
.optional(),
|
||||
})
|
||||
.passthrough();
|
||||
|
||||
const FoundationModelsResponse = z
|
||||
.object({
|
||||
endpoints: z.array(Endpoint),
|
||||
})
|
||||
.passthrough();
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Canonical resolution: map a Databricks endpoint name to a models.dev entry
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
const PREFIX_TO_PROVIDER: [string, string][] = [
|
||||
["claude-", "anthropic"],
|
||||
["gpt-", "openai"],
|
||||
["gemini-", "google"],
|
||||
["mistral-", "mistral"],
|
||||
["mixtral-", "mistral"],
|
||||
];
|
||||
|
||||
type Resolution =
|
||||
| { type: "extends"; from: string }
|
||||
| { type: "inline"; content: string }
|
||||
| null;
|
||||
|
||||
async function resolveCanonical(endpointName: string): Promise<Resolution> {
|
||||
const bare = endpointName.replace(/^databricks-/, "");
|
||||
|
||||
// Models in provider subdirectories (e.g. openrouter/openai/gpt-oss-*)
|
||||
// can't use [extends] (schema requires provider/model format), so inline.
|
||||
if (bare.startsWith("gpt-oss-")) {
|
||||
const p = path.join(PROVIDERS_DIR, "openrouter", "models", "openai", `${bare}.toml`);
|
||||
if (existsSync(p)) {
|
||||
return { type: "inline", content: await readFile(p, "utf8") };
|
||||
}
|
||||
}
|
||||
|
||||
// Meta Llama: "meta-llama-3-3-70b-instruct" → "llama-3.3-70b-instruct"
|
||||
if (bare.startsWith("meta-llama-") || bare.startsWith("llama-")) {
|
||||
const llamaId = bare
|
||||
.replace(/^meta-llama-/, "llama-")
|
||||
.replace(/^(llama-\d+)-(\d+)-/, "$1.$2-");
|
||||
const p = path.join(PROVIDERS_DIR, "llama", "models", `${llamaId}.toml`);
|
||||
if (existsSync(p)) return { type: "extends", from: `llama/${llamaId}` };
|
||||
}
|
||||
|
||||
for (const [prefix, provider] of PREFIX_TO_PROVIDER) {
|
||||
if (!bare.startsWith(prefix)) continue;
|
||||
|
||||
const exact = path.join(PROVIDERS_DIR, provider, "models", `${bare}.toml`);
|
||||
if (existsSync(exact)) return { type: "extends", from: `${provider}/${bare}` };
|
||||
|
||||
// Try with hyphens-as-dots in version (e.g. gpt-5-4 → gpt-5.4)
|
||||
const dotted = bare.replace(/^((?:[a-z]+-)+\d+)-(\d)/, "$1.$2");
|
||||
if (dotted !== bare) {
|
||||
const dottedExact = path.join(PROVIDERS_DIR, provider, "models", `${dotted}.toml`);
|
||||
if (existsSync(dottedExact)) return { type: "extends", from: `${provider}/${dotted}` };
|
||||
}
|
||||
|
||||
// Fuzzy: longest filename that shares a prefix with bare or its dotted form
|
||||
const candidates = [bare, ...(dotted !== bare ? [dotted] : [])];
|
||||
const files: string[] = [];
|
||||
try {
|
||||
for await (const f of new Bun.Glob("*.toml").scan({
|
||||
cwd: path.join(PROVIDERS_DIR, provider, "models"),
|
||||
})) {
|
||||
files.push(f);
|
||||
}
|
||||
} catch {
|
||||
// provider directory may not exist
|
||||
}
|
||||
const match = files
|
||||
.map((f) => f.replace(/\.toml$/, ""))
|
||||
.filter((id) => candidates.some((c) => id.startsWith(c) || c.startsWith(id)))
|
||||
.sort((a, b) => b.length - a.length)[0];
|
||||
if (match) return { type: "extends", from: `${provider}/${match}` };
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function formatToml(resolution: Resolution, endpointName: string): string {
|
||||
if (resolution?.type === "extends") {
|
||||
return `[extends]\nfrom = "${resolution.from}"\n`;
|
||||
}
|
||||
if (resolution?.type === "inline") {
|
||||
return resolution.content;
|
||||
}
|
||||
return `# TODO: fill in details for ${endpointName}\nname = "${endpointName}"\n`;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Main
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
const IGNORE_PREFIXES = [
|
||||
"databricks-llama-",
|
||||
"databricks-meta-llama-",
|
||||
"databricks-qwen",
|
||||
"databricks-gemma-",
|
||||
];
|
||||
|
||||
async function main() {
|
||||
console.log(
|
||||
`${dryRun ? "[DRY RUN] " : ""}${newOnly ? "[NEW ONLY] " : ""}Fetching Databricks foundation-models...`,
|
||||
);
|
||||
|
||||
const url = `https://${workspace}/api/2.0/serving-endpoints:foundation-models`;
|
||||
const res = await fetch(url, {
|
||||
headers: { Authorization: `Bearer ${token}` },
|
||||
});
|
||||
if (!res.ok) {
|
||||
console.error(`Failed to fetch API: ${res.status} ${res.statusText}`);
|
||||
console.error(await res.text().catch(() => ""));
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const json = await res.json();
|
||||
const parsed = FoundationModelsResponse.safeParse(json);
|
||||
if (!parsed.success) {
|
||||
console.error("Invalid API response:", parsed.error.errors);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const endpoints = parsed.data.endpoints.filter(
|
||||
(e) =>
|
||||
!IGNORE_PREFIXES.some((p) => e.name.startsWith(p)) &&
|
||||
e.config?.served_entities?.some(
|
||||
(se) =>
|
||||
se.foundation_model?.ai_gateway_v2_supported === true &&
|
||||
se.foundation_model?.api_types?.includes("mlflow/v1/chat/completions"),
|
||||
),
|
||||
);
|
||||
|
||||
const existingFiles = new Set<string>();
|
||||
try {
|
||||
for await (const f of new Bun.Glob("*.toml").scan({ cwd: MODELS_DIR })) {
|
||||
existingFiles.add(f);
|
||||
}
|
||||
} catch {
|
||||
// directory may not exist yet
|
||||
}
|
||||
|
||||
console.log(
|
||||
`Found ${endpoints.length} models in API, ${existingFiles.size} existing files\n`,
|
||||
);
|
||||
|
||||
const apiModelIds = new Set<string>();
|
||||
let created = 0;
|
||||
let updated = 0;
|
||||
let unchanged = 0;
|
||||
|
||||
for (const ep of endpoints) {
|
||||
const filename = `${ep.name}.toml`;
|
||||
apiModelIds.add(filename);
|
||||
const filePath = path.join(MODELS_DIR, filename);
|
||||
|
||||
const resolution = await resolveCanonical(ep.name);
|
||||
const newContent = formatToml(resolution, ep.name);
|
||||
const tag = resolution?.type === "extends" ? `extends ${resolution.from}` : resolution?.type ?? "stub";
|
||||
|
||||
const existed = existsSync(filePath);
|
||||
if (!existed) {
|
||||
created++;
|
||||
if (dryRun) {
|
||||
console.log(`[DRY RUN] Would create: ${filename} → ${tag}`);
|
||||
} else {
|
||||
await mkdir(MODELS_DIR, { recursive: true });
|
||||
await Bun.write(filePath, newContent);
|
||||
console.log(`Created: ${filename} → ${tag}`);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (newOnly) {
|
||||
unchanged++;
|
||||
continue;
|
||||
}
|
||||
|
||||
const existingContent = await readFile(filePath, "utf8");
|
||||
if (existingContent === newContent) {
|
||||
unchanged++;
|
||||
continue;
|
||||
}
|
||||
|
||||
updated++;
|
||||
if (dryRun) {
|
||||
console.log(`[DRY RUN] Would update: ${filename} → ${tag}`);
|
||||
} else {
|
||||
await Bun.write(filePath, newContent);
|
||||
console.log(`Updated: ${filename} → ${tag}`);
|
||||
}
|
||||
}
|
||||
|
||||
const orphaned: string[] = [];
|
||||
for (const file of existingFiles) {
|
||||
if (!apiModelIds.has(file)) {
|
||||
orphaned.push(file);
|
||||
console.log(`Warning: Orphaned file (not in API): ${file}`);
|
||||
}
|
||||
}
|
||||
|
||||
console.log("");
|
||||
if (dryRun) {
|
||||
console.log(
|
||||
`Summary: ${created} would be created, ${updated} would be updated, ${unchanged} unchanged, ${orphaned.length} orphaned`,
|
||||
);
|
||||
} else {
|
||||
console.log(
|
||||
`Summary: ${created} created, ${updated} updated, ${unchanged} unchanged, ${orphaned.length} orphaned`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
await main();
|
||||
@@ -0,0 +1,421 @@
|
||||
#!/usr/bin/env bun
|
||||
|
||||
import path from "node:path";
|
||||
import { mkdir, readdir, rm } from "node:fs/promises";
|
||||
import { z } from "zod";
|
||||
|
||||
import { AuthoredModel, AuthoredModelShape } from "../src/schema.js";
|
||||
import { google } from "./sync/google.js";
|
||||
import { openrouter } from "./sync/openrouter.js";
|
||||
|
||||
const ExistingModel = AuthoredModelShape.partial()
|
||||
.extend({
|
||||
extends: z
|
||||
.object({
|
||||
from: z.string(),
|
||||
omit: z.array(z.string()).optional(),
|
||||
})
|
||||
.strict()
|
||||
.optional(),
|
||||
})
|
||||
.strict();
|
||||
|
||||
export type ExistingModel = z.infer<typeof ExistingModel>;
|
||||
export type SyncedModel = Omit<z.infer<typeof AuthoredModelShape>, "id">;
|
||||
|
||||
export interface SyncProvider<SourceModel> {
|
||||
id: string;
|
||||
name: string;
|
||||
modelsDir: string;
|
||||
skipCreates?: boolean;
|
||||
sourceID?(model: SourceModel): string;
|
||||
skippedNotice?(ids: string[]): string[];
|
||||
fetchModels(): Promise<unknown>;
|
||||
parseModels(raw: unknown): SourceModel[];
|
||||
translateModel(
|
||||
model: SourceModel,
|
||||
context: { existing(id: string): ExistingModel | undefined },
|
||||
): { id: string; model: SyncedModel } | undefined;
|
||||
}
|
||||
|
||||
export interface SyncResult {
|
||||
id: string;
|
||||
name: string;
|
||||
status: "changed" | "unchanged";
|
||||
created: number;
|
||||
updated: number;
|
||||
deleted: number;
|
||||
unchanged: number;
|
||||
notices: string[];
|
||||
files: Array<{ status: "created" | "updated" | "deleted"; path: string }>;
|
||||
}
|
||||
|
||||
export const providers: {
|
||||
google: SyncProvider<any>;
|
||||
openrouter: SyncProvider<any>;
|
||||
} = {
|
||||
google,
|
||||
openrouter,
|
||||
};
|
||||
|
||||
export const groups = {
|
||||
aggregators: ["openrouter"],
|
||||
direct: ["google"],
|
||||
} as const;
|
||||
|
||||
type ProviderID = keyof typeof providers;
|
||||
|
||||
interface SyncOptions {
|
||||
dryRun?: boolean;
|
||||
newOnly?: boolean;
|
||||
}
|
||||
|
||||
export async function syncProviderByID(id: ProviderID, options: SyncOptions = {}) {
|
||||
return syncProvider(providers[id], options);
|
||||
}
|
||||
|
||||
export async function syncProvider<SourceModel>(
|
||||
provider: SyncProvider<SourceModel>,
|
||||
options: SyncOptions = {},
|
||||
): Promise<SyncResult> {
|
||||
console.log(`\nSyncing ${provider.name}...`);
|
||||
|
||||
const existing = await readExisting(provider.modelsDir);
|
||||
const sourceModels = provider.parseModels(await provider.fetchModels());
|
||||
const desired = new Map<string, { model: z.infer<typeof AuthoredModel>; content: string }>();
|
||||
const skippedRemote: string[] = [];
|
||||
|
||||
for (const sourceModel of sourceModels) {
|
||||
const translated = provider.translateModel(sourceModel, {
|
||||
existing(id) {
|
||||
return existing.get(`${id}.toml`)?.toml;
|
||||
},
|
||||
});
|
||||
if (translated === undefined) {
|
||||
if (provider.skipCreates) skippedRemote.push(provider.sourceID?.(sourceModel) ?? "unknown");
|
||||
continue;
|
||||
}
|
||||
|
||||
const relativePath = `${translated.id}.toml`;
|
||||
if (provider.skipCreates && !existing.has(relativePath)) {
|
||||
skippedRemote.push(translated.id);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (desired.has(relativePath)) {
|
||||
throw new Error(`Duplicate synced model path: ${provider.id}/${relativePath}`);
|
||||
}
|
||||
|
||||
const parsed = AuthoredModel.safeParse({
|
||||
id: translated.id,
|
||||
...translated.model,
|
||||
});
|
||||
if (!parsed.success) {
|
||||
parsed.error.cause = { provider: provider.id, path: relativePath };
|
||||
throw parsed.error;
|
||||
}
|
||||
|
||||
desired.set(relativePath, {
|
||||
model: parsed.data,
|
||||
content: formatToml(parsed.data),
|
||||
});
|
||||
}
|
||||
|
||||
const files: SyncResult["files"] = [];
|
||||
let unchanged = 0;
|
||||
|
||||
for (const [relativePath, file] of desired) {
|
||||
const filePath = path.join(provider.modelsDir, relativePath);
|
||||
const current = existing.get(relativePath);
|
||||
|
||||
if (current === undefined) {
|
||||
files.push({ status: "created", path: filePath });
|
||||
if (options.dryRun) {
|
||||
console.log(`Would create ${relativePath}`);
|
||||
} else {
|
||||
await mkdir(path.dirname(filePath), { recursive: true });
|
||||
await Bun.write(filePath, file.content);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!sameModel(relativePath, current.toml, file.model)) {
|
||||
if (options.newOnly) {
|
||||
unchanged++;
|
||||
continue;
|
||||
}
|
||||
|
||||
files.push({ status: "updated", path: filePath });
|
||||
if (options.dryRun) {
|
||||
console.log(`Would update ${relativePath}`);
|
||||
} else {
|
||||
if (current.symlink) await rm(filePath, { force: true });
|
||||
await Bun.write(filePath, file.content);
|
||||
}
|
||||
} else {
|
||||
unchanged++;
|
||||
}
|
||||
}
|
||||
|
||||
for (const relativePath of existing.keys()) {
|
||||
if (desired.has(relativePath)) continue;
|
||||
if (options.newOnly) {
|
||||
console.log(`Skipping removal in new-only mode: ${relativePath}`);
|
||||
unchanged++;
|
||||
continue;
|
||||
}
|
||||
|
||||
const filePath = path.join(provider.modelsDir, relativePath);
|
||||
files.push({ status: "deleted", path: filePath });
|
||||
if (options.dryRun) {
|
||||
console.log(`Would remove ${relativePath}`);
|
||||
} else {
|
||||
await rm(filePath, { force: true });
|
||||
}
|
||||
}
|
||||
|
||||
const result = summarize(provider, files, unchanged, provider.skippedNotice?.(skippedRemote) ?? []);
|
||||
console.log(
|
||||
`${options.dryRun ? "Dry run: " : ""}${result.created} created, ${result.updated} updated, ${result.deleted} removed, ${result.unchanged} unchanged`,
|
||||
);
|
||||
return result;
|
||||
}
|
||||
|
||||
export async function syncTargets(target: string, options: SyncOptions = {}) {
|
||||
const ids = target in groups
|
||||
? groups[target as keyof typeof groups]
|
||||
: target in providers
|
||||
? [target as ProviderID]
|
||||
: undefined;
|
||||
|
||||
if (ids === undefined) {
|
||||
throw new Error(`Unknown sync target: ${target}`);
|
||||
}
|
||||
|
||||
const results: SyncResult[] = [];
|
||||
for (const id of ids) {
|
||||
results.push(await syncProviderByID(id as ProviderID, options));
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
async function readExisting(modelsDir: string) {
|
||||
const existing = new Map<string, { text: string; toml: ExistingModel; symlink: boolean }>();
|
||||
|
||||
for (const { file, symlink } of await tomlFiles(modelsDir)) {
|
||||
const text = await Bun.file(path.join(modelsDir, file)).text();
|
||||
const parsed = ExistingModel.safeParse(Bun.TOML.parse(text));
|
||||
if (!parsed.success) {
|
||||
parsed.error.cause = { path: path.join(modelsDir, file) };
|
||||
throw parsed.error;
|
||||
}
|
||||
existing.set(file, { text, toml: parsed.data, symlink });
|
||||
}
|
||||
|
||||
return existing;
|
||||
}
|
||||
|
||||
async function tomlFiles(root: string, dir = "") {
|
||||
const result: Array<{ file: string; symlink: boolean }> = [];
|
||||
|
||||
for (const entry of await readdir(path.join(root, dir), { withFileTypes: true })) {
|
||||
const file = path.join(dir, entry.name);
|
||||
if (entry.isDirectory()) {
|
||||
result.push(...await tomlFiles(root, file));
|
||||
} else if (entry.name.endsWith(".toml") && (entry.isFile() || entry.isSymbolicLink())) {
|
||||
result.push({ file, symlink: entry.isSymbolicLink() });
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function summarize(
|
||||
provider: { id: string; name: string },
|
||||
files: SyncResult["files"],
|
||||
unchanged: number,
|
||||
notices: string[],
|
||||
): SyncResult {
|
||||
return {
|
||||
id: provider.id,
|
||||
name: provider.name,
|
||||
status: files.length > 0 ? "changed" : "unchanged",
|
||||
created: files.filter((file) => file.status === "created").length,
|
||||
updated: files.filter((file) => file.status === "updated").length,
|
||||
deleted: files.filter((file) => file.status === "deleted").length,
|
||||
unchanged,
|
||||
notices,
|
||||
files,
|
||||
};
|
||||
}
|
||||
|
||||
function sameModel(
|
||||
relativePath: string,
|
||||
current: ExistingModel,
|
||||
desired: z.infer<typeof AuthoredModel>,
|
||||
) {
|
||||
const parsed = AuthoredModel.safeParse({
|
||||
id: relativePath.slice(0, -5),
|
||||
...current,
|
||||
});
|
||||
return parsed.success && stable(parsed.data) === stable(desired);
|
||||
}
|
||||
|
||||
function stable(value: unknown): string {
|
||||
if (Array.isArray(value)) {
|
||||
const items = value.map(stable);
|
||||
const ordered = value.every((item) => item === null || typeof item !== "object")
|
||||
? items.sort()
|
||||
: items;
|
||||
return `[${ordered.join(",")}]`;
|
||||
}
|
||||
if (value !== null && typeof value === "object") {
|
||||
return `{${Object.entries(value)
|
||||
.filter(([, item]) => item !== undefined)
|
||||
.sort(([a], [b]) => a.localeCompare(b))
|
||||
.map(([key, item]) => `${JSON.stringify(key)}:${stable(item)}`)
|
||||
.join(",")}}`;
|
||||
}
|
||||
return JSON.stringify(value);
|
||||
}
|
||||
|
||||
async function writeReport(target: string, results: SyncResult[]) {
|
||||
await mkdir(".sync", { recursive: true });
|
||||
|
||||
const lines = [
|
||||
`Updates model TOMLs for the \`${target}\` sync target.`,
|
||||
"",
|
||||
"| Provider | Status | Created | Updated | Deleted |",
|
||||
"| --- | --- | ---: | ---: | ---: |",
|
||||
];
|
||||
|
||||
for (const result of results) {
|
||||
lines.push(
|
||||
`| ${result.name} | ${result.status} | ${result.created} | ${result.updated} | ${result.deleted} |`,
|
||||
);
|
||||
}
|
||||
|
||||
for (const result of results.filter((item) => item.files.length > 0)) {
|
||||
lines.push("", `<details><summary>${result.name} changed files</summary>`, "");
|
||||
for (const file of result.files) {
|
||||
lines.push(`- ${file.status}: \`${file.path}\``);
|
||||
}
|
||||
lines.push("", "</details>");
|
||||
}
|
||||
|
||||
const noticeResults = results.filter((item) => item.notices.length > 0);
|
||||
if (noticeResults.length > 0) {
|
||||
lines.push("", "## Notices");
|
||||
for (const result of noticeResults) {
|
||||
lines.push("", `### ${result.name}`);
|
||||
for (const notice of result.notices) {
|
||||
lines.push(`- ${notice}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lines.push("", "This PR was created automatically by the daily model sync workflow.");
|
||||
await Bun.write(".sync/model-sync-report.md", `${lines.join("\n")}\n`);
|
||||
}
|
||||
|
||||
function quote(value: string) {
|
||||
return `"${value.replaceAll("\\", "\\\\").replaceAll('"', '\\"')}"`;
|
||||
}
|
||||
|
||||
function formatInteger(n: number) {
|
||||
return String(n).replace(/\B(?=(\d{3})+(?!\d))/g, "_");
|
||||
}
|
||||
|
||||
function formatNumber(n: number) {
|
||||
return Number.isInteger(n) ? formatInteger(n) : String(n);
|
||||
}
|
||||
|
||||
function formatToml(model: z.infer<typeof AuthoredModel>) {
|
||||
const lines: string[] = [];
|
||||
|
||||
lines.push(`name = ${quote(model.name)}`);
|
||||
if (model.family !== undefined) lines.push(`family = ${quote(model.family)}`);
|
||||
lines.push(`release_date = ${quote(model.release_date)}`);
|
||||
lines.push(`last_updated = ${quote(model.last_updated)}`);
|
||||
lines.push(`attachment = ${model.attachment}`);
|
||||
lines.push(`reasoning = ${model.reasoning}`);
|
||||
if (model.temperature !== undefined) lines.push(`temperature = ${model.temperature}`);
|
||||
lines.push(`tool_call = ${model.tool_call}`);
|
||||
if (model.structured_output !== undefined) {
|
||||
lines.push(`structured_output = ${model.structured_output}`);
|
||||
}
|
||||
if (model.knowledge !== undefined) lines.push(`knowledge = ${quote(model.knowledge)}`);
|
||||
lines.push(`open_weights = ${model.open_weights}`);
|
||||
if (model.status !== undefined) lines.push(`status = ${quote(model.status)}`);
|
||||
|
||||
if (model.interleaved !== undefined) {
|
||||
lines.push("");
|
||||
if (model.interleaved === true) {
|
||||
lines.push("interleaved = true");
|
||||
} else {
|
||||
lines.push("[interleaved]");
|
||||
lines.push(`field = ${quote(model.interleaved.field)}`);
|
||||
}
|
||||
}
|
||||
|
||||
if (model.cost !== undefined) {
|
||||
lines.push("", "[cost]");
|
||||
lines.push(`input = ${formatNumber(model.cost.input)}`);
|
||||
lines.push(`output = ${formatNumber(model.cost.output)}`);
|
||||
if (model.cost.reasoning !== undefined) {
|
||||
lines.push(`reasoning = ${formatNumber(model.cost.reasoning)}`);
|
||||
}
|
||||
if (model.cost.cache_read !== undefined) {
|
||||
lines.push(`cache_read = ${formatNumber(model.cost.cache_read)}`);
|
||||
}
|
||||
if (model.cost.cache_write !== undefined) {
|
||||
lines.push(`cache_write = ${formatNumber(model.cost.cache_write)}`);
|
||||
}
|
||||
if (model.cost.input_audio !== undefined) {
|
||||
lines.push(`input_audio = ${formatNumber(model.cost.input_audio)}`);
|
||||
}
|
||||
if (model.cost.output_audio !== undefined) {
|
||||
lines.push(`output_audio = ${formatNumber(model.cost.output_audio)}`);
|
||||
}
|
||||
|
||||
for (const tier of model.cost.tiers ?? []) {
|
||||
lines.push("", "[[cost.tiers]]");
|
||||
lines.push(`tier = { size = ${formatInteger(tier.tier.size)} }`);
|
||||
lines.push(`input = ${formatNumber(tier.input)}`);
|
||||
lines.push(`output = ${formatNumber(tier.output)}`);
|
||||
if (tier.reasoning !== undefined) lines.push(`reasoning = ${formatNumber(tier.reasoning)}`);
|
||||
if (tier.cache_read !== undefined) lines.push(`cache_read = ${formatNumber(tier.cache_read)}`);
|
||||
if (tier.cache_write !== undefined) lines.push(`cache_write = ${formatNumber(tier.cache_write)}`);
|
||||
}
|
||||
}
|
||||
|
||||
lines.push("", "[limit]");
|
||||
lines.push(`context = ${formatInteger(model.limit.context)}`);
|
||||
if (model.limit.input !== undefined) lines.push(`input = ${formatInteger(model.limit.input)}`);
|
||||
lines.push(`output = ${formatInteger(model.limit.output)}`);
|
||||
|
||||
lines.push("", "[modalities]");
|
||||
lines.push(`input = [${model.modalities.input.map(quote).join(", ")}]`);
|
||||
lines.push(`output = [${model.modalities.output.map(quote).join(", ")}]`);
|
||||
|
||||
return `${lines.join("\n")}\n`;
|
||||
}
|
||||
|
||||
export async function main(args = process.argv.slice(2)) {
|
||||
const target = args.find((arg) => !arg.startsWith("-")) ?? "aggregators";
|
||||
const results = await syncTargets(target, {
|
||||
dryRun: args.includes("--dry-run"),
|
||||
newOnly: args.includes("--new-only"),
|
||||
});
|
||||
|
||||
await writeReport(target, results);
|
||||
|
||||
console.log("\nSync summary");
|
||||
for (const result of results) {
|
||||
console.log(
|
||||
`${result.name}: ${result.created} created, ${result.updated} updated, ${result.deleted} deleted`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (import.meta.main) await main();
|
||||
@@ -0,0 +1,138 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import type { ExistingModel, SyncProvider, SyncedModel } from "../sync-models.js";
|
||||
|
||||
const API_ENDPOINT = "https://generativelanguage.googleapis.com/v1beta/models";
|
||||
|
||||
const GoogleModel = z.object({
|
||||
name: z.string(),
|
||||
baseModelId: z.string().optional(),
|
||||
version: z.string().optional(),
|
||||
displayName: z.string().optional(),
|
||||
description: z.string().optional(),
|
||||
inputTokenLimit: z.number().int().nonnegative(),
|
||||
outputTokenLimit: z.number().int().nonnegative(),
|
||||
supportedGenerationMethods: z.array(z.string()).optional(),
|
||||
temperature: z.number().optional(),
|
||||
topP: z.number().optional(),
|
||||
topK: z.number().optional(),
|
||||
maxTemperature: z.number().optional(),
|
||||
thinking: z.boolean().optional(),
|
||||
}).passthrough();
|
||||
|
||||
const GoogleResponse = z.object({
|
||||
models: z.array(GoogleModel).optional(),
|
||||
nextPageToken: z.string().optional(),
|
||||
}).passthrough();
|
||||
|
||||
type GoogleModel = z.infer<typeof GoogleModel>;
|
||||
|
||||
export const google = {
|
||||
id: "google",
|
||||
name: "Google",
|
||||
modelsDir: "providers/google/models",
|
||||
skipCreates: true,
|
||||
sourceID(model) {
|
||||
return model.name.replace(/^models\//, "");
|
||||
},
|
||||
skippedNotice(ids) {
|
||||
if (ids.length === 0) return [];
|
||||
return [
|
||||
`${ids.length} Google models returned by the API were not created because the Models API does not provide authoritative modalities, pricing, knowledge cutoff, release date, tool calling, or structured output metadata. Existing models are still updated from API-authoritative fields.`,
|
||||
`Skipped remote IDs: ${ids.map((id) => `\`${id}\``).join(", ")}`,
|
||||
];
|
||||
},
|
||||
async fetchModels() {
|
||||
const key = process.env.GOOGLE_API_KEY
|
||||
?? process.env.GEMINI_API_KEY
|
||||
?? process.env.GOOGLE_GENERATIVE_AI_API_KEY;
|
||||
if (key === undefined) {
|
||||
throw new Error("Google sync requires GOOGLE_API_KEY, GEMINI_API_KEY, or GOOGLE_GENERATIVE_AI_API_KEY");
|
||||
}
|
||||
|
||||
const models: GoogleModel[] = [];
|
||||
let pageToken: string | undefined;
|
||||
|
||||
do {
|
||||
const url = new URL(API_ENDPOINT);
|
||||
url.searchParams.set("key", key);
|
||||
url.searchParams.set("pageSize", "1000");
|
||||
if (pageToken !== undefined) url.searchParams.set("pageToken", pageToken);
|
||||
|
||||
const response = await fetch(url);
|
||||
if (!response.ok) {
|
||||
throw new Error(`Google models request failed: ${response.status} ${response.statusText}`);
|
||||
}
|
||||
|
||||
const page = GoogleResponse.parse(await response.json());
|
||||
models.push(...page.models ?? []);
|
||||
pageToken = page.nextPageToken;
|
||||
} while (pageToken !== undefined);
|
||||
|
||||
return { models };
|
||||
},
|
||||
parseModels(raw) {
|
||||
return GoogleResponse.parse(raw).models ?? [];
|
||||
},
|
||||
translateModel(model, context) {
|
||||
const id = model.name.replace(/^models\//, "");
|
||||
const existing = context.existing(id);
|
||||
if (existing === undefined) return undefined;
|
||||
|
||||
return {
|
||||
id,
|
||||
model: buildModel(model, existing),
|
||||
};
|
||||
},
|
||||
} satisfies SyncProvider<GoogleModel>;
|
||||
|
||||
function buildModel(model: GoogleModel, existing: ExistingModel): SyncedModel {
|
||||
const name = existing.name;
|
||||
const releaseDate = existing.release_date;
|
||||
const lastUpdated = existing.last_updated;
|
||||
const attachment = existing.attachment;
|
||||
const reasoning = existing.reasoning;
|
||||
const toolCall = existing.tool_call;
|
||||
const openWeights = existing.open_weights;
|
||||
const limit = existing.limit;
|
||||
const modalities = existing.modalities;
|
||||
|
||||
if (
|
||||
name === undefined
|
||||
|| releaseDate === undefined
|
||||
|| lastUpdated === undefined
|
||||
|| attachment === undefined
|
||||
|| reasoning === undefined
|
||||
|| toolCall === undefined
|
||||
|| openWeights === undefined
|
||||
|| limit === undefined
|
||||
|| modalities === undefined
|
||||
) {
|
||||
throw new Error(`Google model ${model.name} has incomplete local TOML metadata required for sync`);
|
||||
}
|
||||
|
||||
return {
|
||||
name: model.displayName ?? name,
|
||||
family: existing.family,
|
||||
release_date: releaseDate,
|
||||
last_updated: lastUpdated,
|
||||
attachment,
|
||||
reasoning: model.thinking ?? reasoning,
|
||||
temperature: model.temperature !== undefined || model.maxTemperature !== undefined
|
||||
? true
|
||||
: existing.temperature,
|
||||
tool_call: toolCall,
|
||||
structured_output: existing.structured_output,
|
||||
knowledge: existing.knowledge,
|
||||
open_weights: openWeights,
|
||||
status: existing.status,
|
||||
interleaved: existing.interleaved,
|
||||
cost: existing.cost,
|
||||
limit: {
|
||||
input: limit.input,
|
||||
context: model.inputTokenLimit,
|
||||
output: model.outputTokenLimit,
|
||||
},
|
||||
modalities,
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import { ModelFamilyValues } from "../../src/family.js";
|
||||
import type { ExistingModel, SyncProvider } from "../sync-models.js";
|
||||
|
||||
const API_ENDPOINT = "https://openrouter.ai/api/v1/models";
|
||||
|
||||
const OpenRouterModel = z.object({
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
created: z.number(),
|
||||
hugging_face_id: z.string().nullable(),
|
||||
knowledge_cutoff: z.string().nullable(),
|
||||
context_length: z.number(),
|
||||
architecture: z.object({
|
||||
input_modalities: z.array(z.string()),
|
||||
output_modalities: z.array(z.string()),
|
||||
}),
|
||||
pricing: z.object({
|
||||
prompt: z.string(),
|
||||
completion: z.string(),
|
||||
internal_reasoning: z.string().optional(),
|
||||
input_cache_read: z.string().optional(),
|
||||
input_cache_write: z.string().optional(),
|
||||
}),
|
||||
top_provider: z.object({
|
||||
context_length: z.number().nullable(),
|
||||
max_completion_tokens: z.number().nullable(),
|
||||
}),
|
||||
supported_parameters: z.array(z.string()),
|
||||
});
|
||||
|
||||
const OpenRouterResponse = z.object({
|
||||
data: z.array(OpenRouterModel),
|
||||
}).passthrough();
|
||||
|
||||
type OpenRouterModel = z.infer<typeof OpenRouterModel>;
|
||||
|
||||
export const openrouter = {
|
||||
id: "openrouter",
|
||||
name: "OpenRouter",
|
||||
modelsDir: "providers/openrouter/models",
|
||||
async fetchModels() {
|
||||
const headers = process.env.OPENROUTER_API_KEY
|
||||
? { Authorization: `Bearer ${process.env.OPENROUTER_API_KEY}` }
|
||||
: undefined;
|
||||
const response = await fetch(API_ENDPOINT, { headers });
|
||||
if (!response.ok) {
|
||||
throw new Error(`OpenRouter request failed: ${response.status} ${response.statusText}`);
|
||||
}
|
||||
return response.json();
|
||||
},
|
||||
parseModels(raw) {
|
||||
return OpenRouterResponse.parse(raw).data;
|
||||
},
|
||||
translateModel(model, context) {
|
||||
return {
|
||||
id: model.id,
|
||||
model: buildModel(model, context.existing(model.id)),
|
||||
};
|
||||
},
|
||||
} satisfies SyncProvider<OpenRouterModel>;
|
||||
|
||||
function dateFromTimestamp(timestamp: number) {
|
||||
return new Date(timestamp * 1000).toISOString().slice(0, 10);
|
||||
}
|
||||
|
||||
function price(value: string | undefined) {
|
||||
if (value === undefined) return undefined;
|
||||
const number = Number(value);
|
||||
return Number.isFinite(number) && number >= 0
|
||||
? Math.round(number * 1_000_000_000_000) / 1_000_000
|
||||
: undefined;
|
||||
}
|
||||
|
||||
type Modality = "text" | "audio" | "image" | "video" | "pdf";
|
||||
|
||||
function modalities(values: string[], fallback: Modality[]): Modality[] {
|
||||
const allowed = new Set<Modality>(["text", "audio", "image", "video", "pdf"]);
|
||||
const result = values
|
||||
.map((value) => value.toLowerCase())
|
||||
.map((value) => value === "file" ? "pdf" : value)
|
||||
.filter((value): value is Modality => allowed.has(value as Modality));
|
||||
return [...new Set(result.length > 0 ? result : fallback)];
|
||||
}
|
||||
|
||||
function inferFamily(model: OpenRouterModel, name: string) {
|
||||
const target = `${model.id} ${name}`.toLowerCase();
|
||||
return [...ModelFamilyValues]
|
||||
.sort((a, b) => b.length - a.length)
|
||||
.find((family) => {
|
||||
const value = family.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
if (family === "o") {
|
||||
return new RegExp(`(^|[^a-z0-9])${value}(?=\\d|$|[^a-z0-9])`).test(target);
|
||||
}
|
||||
return new RegExp(`(^|[^a-z0-9])${value}(?=$|[^a-z0-9])`).test(target);
|
||||
});
|
||||
}
|
||||
|
||||
function buildModel(model: OpenRouterModel, existing: ExistingModel | undefined) {
|
||||
const params = new Set(model.supported_parameters);
|
||||
const name = model.name.replace(/^[^:]+:\s+/, "");
|
||||
const input = modalities(model.architecture.input_modalities, ["text"]);
|
||||
const output = modalities(model.architecture.output_modalities, ["text"]);
|
||||
const prompt = price(model.pricing.prompt);
|
||||
const completion = price(model.pricing.completion);
|
||||
const reasoning = params.has("reasoning") || params.has("include_reasoning");
|
||||
const context = model.top_provider.context_length ?? model.context_length;
|
||||
const family = inferFamily(model, name);
|
||||
|
||||
return {
|
||||
name,
|
||||
family: existing?.family === "o" && family !== "o"
|
||||
? family
|
||||
: (existing?.family ?? family),
|
||||
release_date: dateFromTimestamp(model.created),
|
||||
last_updated: dateFromTimestamp(model.created),
|
||||
attachment: input.some((value) => value !== "text"),
|
||||
reasoning,
|
||||
temperature: params.has("temperature"),
|
||||
tool_call: params.has("tools") || params.has("tool_choice"),
|
||||
structured_output: params.has("structured_outputs"),
|
||||
knowledge: model.knowledge_cutoff?.slice(0, 10) ?? existing?.knowledge,
|
||||
open_weights: Boolean(model.hugging_face_id),
|
||||
status: existing?.status,
|
||||
interleaved: existing?.interleaved,
|
||||
cost: prompt !== undefined && completion !== undefined
|
||||
? {
|
||||
input: prompt,
|
||||
output: completion,
|
||||
reasoning: reasoning ? price(model.pricing.internal_reasoning) : undefined,
|
||||
cache_read: price(model.pricing.input_cache_read),
|
||||
cache_write: price(model.pricing.input_cache_write),
|
||||
tiers: existing?.cost?.tiers,
|
||||
}
|
||||
: existing?.cost,
|
||||
limit: {
|
||||
context,
|
||||
input: existing?.limit?.input,
|
||||
output: model.top_provider.max_completion_tokens ?? existing?.limit?.output ?? context,
|
||||
},
|
||||
modalities: { input, output },
|
||||
};
|
||||
}
|
||||
@@ -6,6 +6,7 @@
|
||||
"build": "./script/build.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tanstack/virtual-core": "^3.14.0",
|
||||
"hono": "^4.8.0",
|
||||
"models.dev": "workspace:*"
|
||||
},
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
font-family: 'Rubik', sans-serif;
|
||||
line-height: 1.6;
|
||||
color: var(--color-text);
|
||||
@@ -205,12 +207,17 @@ header {
|
||||
}
|
||||
}
|
||||
|
||||
.table-viewport {
|
||||
height: calc(100svh - var(--header-height));
|
||||
margin-top: var(--header-height);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
font-size: 0.875rem;
|
||||
width: 100%;
|
||||
margin-top: var(--header-height);
|
||||
}
|
||||
|
||||
thead,
|
||||
@@ -218,7 +225,7 @@ tbody {}
|
||||
|
||||
table thead th {
|
||||
position: sticky;
|
||||
top: var(--header-height);
|
||||
top: 0;
|
||||
border-top: 1px solid var(--color-border);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
font-size: 0.75rem;
|
||||
@@ -264,6 +271,7 @@ td {
|
||||
text-align: left;
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
white-space: nowrap;
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
tbody {
|
||||
@@ -319,21 +327,37 @@ tbody {
|
||||
gap: 0.375rem;
|
||||
}
|
||||
|
||||
.provider-cell span:first-child {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.provider-cell img,
|
||||
.provider-cell svg {
|
||||
flex: 0 0 auto;
|
||||
display: block;
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
.virtual-spacer td {
|
||||
height: inherit;
|
||||
padding: 0;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.empty-row td {
|
||||
padding: 2rem 0.75rem;
|
||||
color: var(--color-text-tertiary);
|
||||
}
|
||||
|
||||
.empty-row div {
|
||||
position: sticky;
|
||||
left: 0;
|
||||
width: calc(100vw - 1.5rem);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.model-id-cell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
justify-content: flex-start;
|
||||
gap: 0.375rem;
|
||||
}
|
||||
|
||||
@@ -546,4 +570,4 @@ dialog {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+295
-94
@@ -1,7 +1,53 @@
|
||||
import {
|
||||
Virtualizer,
|
||||
elementScroll,
|
||||
observeElementOffset,
|
||||
observeElementRect,
|
||||
} from "@tanstack/virtual-core";
|
||||
import {
|
||||
type TableRow,
|
||||
renderRow,
|
||||
escapeHtml,
|
||||
booleanText,
|
||||
knowledgeText,
|
||||
weightsText,
|
||||
} from "./shared.js";
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
__TABLE_DATA__: TableRow[];
|
||||
}
|
||||
}
|
||||
|
||||
interface VirtualizedRow extends TableRow {
|
||||
key: string;
|
||||
searchText: string;
|
||||
sortValues: Array<string | number | undefined>;
|
||||
}
|
||||
|
||||
type SortDirection = "asc" | "desc";
|
||||
|
||||
const ESTIMATED_ROW_HEIGHT = 48;
|
||||
const VIRTUAL_OVERSCAN = 5;
|
||||
|
||||
const modal = document.getElementById("modal") as HTMLDialogElement;
|
||||
const modalClose = document.getElementById("close")!;
|
||||
const help = document.getElementById("help")!;
|
||||
const search = document.getElementById("search")! as HTMLInputElement;
|
||||
const viewport = document.getElementById("table-viewport") as HTMLElement;
|
||||
const tbody = document.getElementById(
|
||||
"models-table-body"
|
||||
) as HTMLTableSectionElement;
|
||||
const headers = Array.from(document.querySelectorAll("th.sortable"));
|
||||
const columnCount = document.querySelectorAll("thead th").length;
|
||||
|
||||
let isLoaded = false;
|
||||
let allRows: VirtualizedRow[] = [];
|
||||
let visibleRows: VirtualizedRow[] = [];
|
||||
let currentSort: { column: number; direction: SortDirection } = {
|
||||
column: -1,
|
||||
direction: "asc",
|
||||
};
|
||||
|
||||
/////////////////////////
|
||||
// URL State Management
|
||||
@@ -31,10 +77,7 @@ function getColumnNameForURL(headerEl: Element): string {
|
||||
}
|
||||
|
||||
function getColumnIndexByUrlName(name: string): number {
|
||||
const headers = document.querySelectorAll("th.sortable");
|
||||
return Array.from(headers).findIndex(
|
||||
(header) => getColumnNameForURL(header) === name
|
||||
);
|
||||
return headers.findIndex((header) => getColumnNameForURL(header) === name);
|
||||
}
|
||||
|
||||
/////////////////////////
|
||||
@@ -63,32 +106,181 @@ modal.addEventListener("click", (e) => {
|
||||
});
|
||||
|
||||
////////////////////
|
||||
// Handle Sorting
|
||||
// Row Data
|
||||
////////////////////
|
||||
let currentSort = { column: -1, direction: "asc" };
|
||||
function lockColumnWidths() {
|
||||
const ths = document.querySelectorAll("#models-table thead th");
|
||||
const widths = Array.from(ths).map((th) => th.getBoundingClientRect().width);
|
||||
|
||||
function sortTable(column: number, direction: "asc" | "desc") {
|
||||
const header = document.querySelectorAll("th.sortable")[column];
|
||||
const columnType = header.getAttribute("data-type");
|
||||
if (!columnType) return;
|
||||
const measurementRow = tbody.querySelector('tr[aria-hidden="true"]');
|
||||
if (measurementRow) measurementRow.remove();
|
||||
|
||||
// update state
|
||||
currentSort = { column, direction };
|
||||
updateQueryParams({
|
||||
sort: getColumnNameForURL(header),
|
||||
order: direction,
|
||||
});
|
||||
const table = document.getElementById("models-table")!;
|
||||
table.style.tableLayout = "fixed";
|
||||
|
||||
// sort rows
|
||||
const tbody = document.querySelector("table tbody")!;
|
||||
const rows = Array.from(
|
||||
tbody.querySelectorAll("tr")
|
||||
) as HTMLTableRowElement[];
|
||||
rows.sort((a, b) => {
|
||||
const aValue = getCellValue(a.cells[column], columnType);
|
||||
const bValue = getCellValue(b.cells[column], columnType);
|
||||
const colgroup = document.createElement("colgroup");
|
||||
for (const width of widths) {
|
||||
const col = document.createElement("col");
|
||||
col.style.width = `${width}px`;
|
||||
colgroup.appendChild(col);
|
||||
}
|
||||
table.insertBefore(colgroup, table.firstChild);
|
||||
}
|
||||
|
||||
function prepareRow(row: TableRow): VirtualizedRow {
|
||||
const sortValues: VirtualizedRow["sortValues"] = [
|
||||
row.providerName,
|
||||
row.modelName,
|
||||
row.family,
|
||||
row.providerId,
|
||||
row.modelId,
|
||||
booleanText(row.toolCall),
|
||||
booleanText(row.reasoning),
|
||||
row.input.length,
|
||||
row.output.length,
|
||||
row.inputCost,
|
||||
row.outputCost,
|
||||
row.reasoningCost,
|
||||
row.cacheReadCost,
|
||||
row.cacheWriteCost,
|
||||
row.audioInputCost,
|
||||
row.audioOutputCost,
|
||||
row.contextLimit,
|
||||
row.inputLimit,
|
||||
row.outputLimit,
|
||||
row.structuredOutput === undefined
|
||||
? undefined
|
||||
: booleanText(row.structuredOutput),
|
||||
booleanText(row.temperature),
|
||||
weightsText(row.openWeights),
|
||||
row.knowledge ? knowledgeText(row.knowledge) : undefined,
|
||||
row.releaseDate,
|
||||
row.lastUpdated,
|
||||
];
|
||||
|
||||
const searchableValues = [
|
||||
row.providerName,
|
||||
row.modelName,
|
||||
row.family ?? "",
|
||||
row.providerId,
|
||||
row.modelId,
|
||||
row.releaseDate,
|
||||
row.lastUpdated,
|
||||
];
|
||||
|
||||
return {
|
||||
...row,
|
||||
key: `${row.providerId}/${row.modelId}`,
|
||||
searchText: searchableValues.join(" ").toLowerCase(),
|
||||
sortValues,
|
||||
};
|
||||
}
|
||||
|
||||
////////////////////
|
||||
// Virtual Table
|
||||
////////////////////
|
||||
function getVirtualizerOptions(count: number) {
|
||||
return {
|
||||
count,
|
||||
getScrollElement: () => viewport,
|
||||
estimateSize: () => ESTIMATED_ROW_HEIGHT,
|
||||
getItemKey: (index: number) => visibleRows[index]?.key ?? index,
|
||||
initialRect: {
|
||||
width: viewport.clientWidth || window.innerWidth,
|
||||
height: viewport.clientHeight || window.innerHeight,
|
||||
},
|
||||
overscan: VIRTUAL_OVERSCAN,
|
||||
observeElementRect,
|
||||
observeElementOffset,
|
||||
scrollToFn: elementScroll,
|
||||
onChange: () => renderVirtualRows(),
|
||||
};
|
||||
}
|
||||
|
||||
const virtualizer = new Virtualizer<HTMLElement, HTMLTableRowElement>(
|
||||
getVirtualizerOptions(0)
|
||||
);
|
||||
const cleanupVirtualizer = virtualizer._didMount();
|
||||
virtualizer._willUpdate();
|
||||
window.addEventListener("pagehide", () => cleanupVirtualizer());
|
||||
|
||||
function renderStatusRow(message: string) {
|
||||
tbody.innerHTML = `<tr class="empty-row"><td colspan="${columnCount}"><div>${escapeHtml(
|
||||
message
|
||||
)}</div></td></tr>`;
|
||||
}
|
||||
|
||||
function setVirtualizerCount(count: number, resetScroll: boolean) {
|
||||
virtualizer.setOptions(getVirtualizerOptions(count));
|
||||
virtualizer._willUpdate();
|
||||
if (resetScroll) virtualizer.scrollToOffset(0);
|
||||
renderVirtualRows();
|
||||
}
|
||||
|
||||
function renderVirtualRows() {
|
||||
if (!isLoaded) return;
|
||||
if (visibleRows.length === 0) {
|
||||
renderStatusRow("No models found");
|
||||
return;
|
||||
}
|
||||
|
||||
const virtualRows = virtualizer.getVirtualItems();
|
||||
if (virtualRows.length === 0) return;
|
||||
|
||||
const firstRow = virtualRows[0]!;
|
||||
const lastRow = virtualRows[virtualRows.length - 1]!;
|
||||
const paddingTop = firstRow.start;
|
||||
const paddingBottom = Math.max(virtualizer.getTotalSize() - lastRow.end, 0);
|
||||
const html: string[] = [];
|
||||
|
||||
if (paddingTop > 0) html.push(renderSpacerRow(paddingTop));
|
||||
for (const virtualRow of virtualRows) {
|
||||
const row = visibleRows[virtualRow.index];
|
||||
if (row) html.push(renderRow(row, virtualRow.index));
|
||||
}
|
||||
if (paddingBottom > 0) html.push(renderSpacerRow(paddingBottom));
|
||||
|
||||
tbody.innerHTML = html.join("");
|
||||
tbody.querySelectorAll<HTMLTableRowElement>("tr[data-index]").forEach((row) =>
|
||||
virtualizer.measureElement(row)
|
||||
);
|
||||
}
|
||||
|
||||
function renderSpacerRow(height: number) {
|
||||
return `<tr class="virtual-spacer" style="height: ${height}px"><td colspan="${columnCount}"></td></tr>`;
|
||||
}
|
||||
|
||||
function applyRows(resetScroll = true) {
|
||||
if (!isLoaded) return;
|
||||
visibleRows = getRowsForDisplay();
|
||||
setVirtualizerCount(visibleRows.length, resetScroll);
|
||||
}
|
||||
|
||||
////////////////////
|
||||
// Sorting
|
||||
////////////////////
|
||||
function getRowsForDisplay() {
|
||||
const terms = search.value
|
||||
.toLowerCase()
|
||||
.split(",")
|
||||
.map((term) => term.trim())
|
||||
.filter(Boolean);
|
||||
const filteredRows =
|
||||
terms.length === 0
|
||||
? allRows
|
||||
: allRows.filter((row) =>
|
||||
terms.some((term) => row.searchText.includes(term))
|
||||
);
|
||||
|
||||
if (currentSort.column === -1) return filteredRows;
|
||||
|
||||
const columnType = headers[currentSort.column]?.getAttribute("data-type");
|
||||
if (!columnType) return filteredRows;
|
||||
|
||||
return [...filteredRows].sort((a, b) => {
|
||||
const aValue = a.sortValues[currentSort.column];
|
||||
const bValue = b.sortValues[currentSort.column];
|
||||
|
||||
// Handle undefined values - always sort to bottom
|
||||
if (aValue === undefined && bValue === undefined) return 0;
|
||||
if (aValue === undefined) return 1;
|
||||
if (bValue === undefined) return -1;
|
||||
@@ -96,45 +288,48 @@ function sortTable(column: number, direction: "asc" | "desc") {
|
||||
let comparison = 0;
|
||||
if (columnType === "number" || columnType === "modalities") {
|
||||
comparison = (aValue as number) - (bValue as number);
|
||||
} else if (columnType === "boolean") {
|
||||
comparison = (aValue as string).localeCompare(bValue as string);
|
||||
} else {
|
||||
comparison = (aValue as string).localeCompare(bValue as string);
|
||||
comparison = String(aValue).localeCompare(String(bValue));
|
||||
}
|
||||
|
||||
return direction === "asc" ? comparison : -comparison;
|
||||
return currentSort.direction === "asc" ? comparison : -comparison;
|
||||
});
|
||||
rows.forEach((row) => tbody.appendChild(row));
|
||||
}
|
||||
|
||||
// update sort indicators
|
||||
const headers = document.querySelectorAll("th.sortable");
|
||||
function sortTable(
|
||||
column: number,
|
||||
direction: SortDirection,
|
||||
updateURL = true
|
||||
) {
|
||||
const header = headers[column];
|
||||
if (!header?.getAttribute("data-type")) return;
|
||||
|
||||
currentSort = { column, direction };
|
||||
if (updateURL) {
|
||||
updateQueryParams({
|
||||
sort: getColumnNameForURL(header),
|
||||
order: direction,
|
||||
});
|
||||
}
|
||||
|
||||
updateSortIndicators();
|
||||
applyRows();
|
||||
}
|
||||
|
||||
function updateSortIndicators() {
|
||||
headers.forEach((header, i) => {
|
||||
const indicator = header.querySelector(".sort-indicator")!;
|
||||
|
||||
if (i === column) {
|
||||
indicator.textContent = direction === "asc" ? "↑" : "↓";
|
||||
} else {
|
||||
indicator.textContent = "";
|
||||
}
|
||||
indicator.textContent =
|
||||
i === currentSort.column
|
||||
? currentSort.direction === "asc"
|
||||
? "↑"
|
||||
: "↓"
|
||||
: "";
|
||||
});
|
||||
}
|
||||
|
||||
function getCellValue(
|
||||
cell: HTMLTableCellElement,
|
||||
type: string
|
||||
): string | number | undefined {
|
||||
if (type === "modalities")
|
||||
return cell.querySelectorAll(".modality-icon").length;
|
||||
|
||||
const text = cell.textContent?.trim() || "";
|
||||
if (text === "-") return;
|
||||
if (type === "number") return parseFloat(text.replace(/[$,]/g, "")) || 0;
|
||||
return text;
|
||||
}
|
||||
|
||||
document.querySelectorAll("th.sortable").forEach((header) => {
|
||||
headers.forEach((header, column) => {
|
||||
header.addEventListener("click", () => {
|
||||
const column = Array.from(header.parentElement!.children).indexOf(header);
|
||||
const direction =
|
||||
currentSort.column === column && currentSort.direction === "asc"
|
||||
? "desc"
|
||||
@@ -144,34 +339,19 @@ document.querySelectorAll("th.sortable").forEach((header) => {
|
||||
});
|
||||
|
||||
///////////////////
|
||||
// Handle Search
|
||||
// Search
|
||||
///////////////////
|
||||
function filterTable(value: string) {
|
||||
const lowerCaseValues = value.toLowerCase().split(",").filter(str => str.trim() !== "");
|
||||
const rows = document.querySelectorAll(
|
||||
"table tbody tr"
|
||||
) as NodeListOf<HTMLTableRowElement>;
|
||||
|
||||
rows.forEach((row) => {
|
||||
const cellTexts = Array.from(row.cells).map((cell) =>
|
||||
cell.textContent!.toLowerCase()
|
||||
);
|
||||
const isVisible = lowerCaseValues.length === 0 ||
|
||||
lowerCaseValues.some((lowerCaseValue) => cellTexts.some((text) => text.includes(lowerCaseValue)));
|
||||
row.style.display = isVisible ? "" : "none";
|
||||
});
|
||||
|
||||
updateQueryParams({ search: value || null });
|
||||
}
|
||||
|
||||
search.addEventListener("input", () => {
|
||||
filterTable(search.value);
|
||||
updateQueryParams({ search: search.value || null });
|
||||
applyRows();
|
||||
});
|
||||
|
||||
document.addEventListener("keydown", (e) => {
|
||||
if ((e.metaKey || e.ctrlKey) && e.key === "k") {
|
||||
const key = e.key.toLowerCase();
|
||||
if ((e.metaKey || e.ctrlKey) && (key === "k" || key === "f")) {
|
||||
e.preventDefault();
|
||||
search.focus();
|
||||
search.select();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -185,10 +365,7 @@ search.addEventListener("keydown", (e) => {
|
||||
///////////////////////////////////
|
||||
// Handle Copy model ID function
|
||||
///////////////////////////////////
|
||||
(window as any).copyModelId = async (
|
||||
button: HTMLButtonElement,
|
||||
modelId: string
|
||||
) => {
|
||||
async function copyModelId(button: HTMLButtonElement, modelId: string) {
|
||||
try {
|
||||
if (navigator.clipboard) {
|
||||
await navigator.clipboard.writeText(modelId);
|
||||
@@ -209,7 +386,18 @@ search.addEventListener("keydown", (e) => {
|
||||
} catch (err) {
|
||||
console.error("Failed to copy text: ", err);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
document.addEventListener("click", (event) => {
|
||||
if (!(event.target instanceof Element)) return;
|
||||
const button = event.target.closest<HTMLButtonElement>(
|
||||
".copy-button[data-model-id]"
|
||||
);
|
||||
if (!button) return;
|
||||
|
||||
const modelId = button.dataset.modelId;
|
||||
if (modelId) void copyModelId(button, modelId);
|
||||
});
|
||||
|
||||
///////////////////////////////////
|
||||
// Initialize State from URL
|
||||
@@ -217,24 +405,37 @@ search.addEventListener("keydown", (e) => {
|
||||
function initializeFromURL() {
|
||||
const params = getQueryParams();
|
||||
|
||||
(() => {
|
||||
const searchQuery = params.get("search");
|
||||
if (!searchQuery) return;
|
||||
search.value = searchQuery;
|
||||
filterTable(searchQuery);
|
||||
})();
|
||||
|
||||
(() => {
|
||||
const columnName = params.get("sort");
|
||||
if (!columnName) return;
|
||||
search.value = params.get("search") ?? "";
|
||||
|
||||
currentSort = { column: -1, direction: "asc" };
|
||||
const columnName = params.get("sort");
|
||||
if (columnName) {
|
||||
const columnIndex = getColumnIndexByUrlName(columnName);
|
||||
if (columnIndex === -1) return;
|
||||
if (columnIndex !== -1) {
|
||||
currentSort = {
|
||||
column: columnIndex,
|
||||
direction: params.get("order") === "desc" ? "desc" : "asc",
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
const direction = (params.get("order") as "asc" | "desc") || "asc";
|
||||
sortTable(columnIndex, direction);
|
||||
})();
|
||||
updateSortIndicators();
|
||||
applyRows(false);
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", initializeFromURL);
|
||||
function loadRows() {
|
||||
try {
|
||||
allRows = window.__TABLE_DATA__.map(prepareRow);
|
||||
lockColumnWidths();
|
||||
isLoaded = true;
|
||||
initializeFromURL();
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
isLoaded = true;
|
||||
visibleRows = [];
|
||||
renderStatusRow("Failed to load model data");
|
||||
}
|
||||
}
|
||||
|
||||
loadRows();
|
||||
window.addEventListener("popstate", initializeFromURL);
|
||||
+55
-232
@@ -6,6 +6,7 @@ import { Fragment } from "hono/jsx";
|
||||
import { renderToString } from "hono/jsx/dom/server";
|
||||
import { existsSync } from "fs";
|
||||
import path from "path";
|
||||
import { type TableRow, renderRow, getLargestRow } from "./shared.js";
|
||||
|
||||
export const Providers = await generate(
|
||||
path.join(import.meta.dir, "..", "..", "..", "providers")
|
||||
@@ -38,7 +39,6 @@ const loadProviderSvg = async (providerId: string): Promise<string | null> => {
|
||||
const file = Bun.file(providerLogoPath);
|
||||
return await file.text();
|
||||
}
|
||||
//
|
||||
// Fall back to default logo
|
||||
if (existsSync(defaultLogoPath)) {
|
||||
const file = Bun.file(defaultLogoPath);
|
||||
@@ -62,122 +62,47 @@ for (const [providerId] of Object.entries(Providers)) {
|
||||
}
|
||||
}
|
||||
|
||||
function renderProviderLogo(providerId: string) {
|
||||
const svgContent = providerLogos.get(providerId) || "";
|
||||
export const INITIAL_ROW_COUNT = 50;
|
||||
|
||||
return <span dangerouslySetInnerHTML={{ __html: svgContent }} />;
|
||||
}
|
||||
export const TableRows: TableRow[] = Object.entries(Providers)
|
||||
.sort(([, providerA], [, providerB]) =>
|
||||
providerA.name.localeCompare(providerB.name)
|
||||
)
|
||||
.flatMap(([providerId, provider]) =>
|
||||
Object.entries(provider.models)
|
||||
.filter(([, model]) => model.status !== "alpha")
|
||||
.sort(([, modelA], [, modelB]) => modelA.name.localeCompare(modelB.name))
|
||||
.map(([modelId, model]) => ({
|
||||
providerId,
|
||||
providerName: provider.name,
|
||||
providerLogoSvg: providerLogos.get(providerId) || "",
|
||||
modelId,
|
||||
modelName: model.name,
|
||||
family: model.family,
|
||||
toolCall: model.tool_call,
|
||||
reasoning: model.reasoning,
|
||||
input: model.modalities.input,
|
||||
output: model.modalities.output,
|
||||
inputCost: model.cost?.input,
|
||||
outputCost: model.cost?.output,
|
||||
reasoningCost: model.cost?.reasoning,
|
||||
cacheReadCost: model.cost?.cache_read,
|
||||
cacheWriteCost: model.cost?.cache_write,
|
||||
audioInputCost: model.cost?.input_audio,
|
||||
audioOutputCost: model.cost?.output_audio,
|
||||
contextLimit: model.limit.context,
|
||||
inputLimit: model.limit.input,
|
||||
outputLimit: model.limit.output,
|
||||
structuredOutput: model.structured_output,
|
||||
temperature: model.temperature ?? false,
|
||||
openWeights: model.open_weights,
|
||||
knowledge: model.knowledge,
|
||||
releaseDate: model.release_date,
|
||||
lastUpdated: model.last_updated,
|
||||
}))
|
||||
);
|
||||
|
||||
const getModalityIcon = (modality: string) => {
|
||||
switch (modality) {
|
||||
case "text":
|
||||
return (
|
||||
<span class="modality-icon" data-tooltip="Text">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<polyline points="4,7 4,4 20,4 20,7"></polyline>
|
||||
<line x1="9" y1="20" x2="15" y2="20"></line>
|
||||
<line x1="12" y1="4" x2="12" y2="20"></line>
|
||||
</svg>
|
||||
</span>
|
||||
);
|
||||
case "image":
|
||||
return (
|
||||
<span class="modality-icon" data-tooltip="Image">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<rect width="18" height="18" x="3" y="3" rx="2" ry="2"></rect>
|
||||
<circle cx="9" cy="9" r="2"></circle>
|
||||
<path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"></path>
|
||||
</svg>
|
||||
</span>
|
||||
);
|
||||
case "audio":
|
||||
return (
|
||||
<span class="modality-icon" data-tooltip="Audio">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon>
|
||||
<path d="m19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"></path>
|
||||
</svg>
|
||||
</span>
|
||||
);
|
||||
case "video":
|
||||
return (
|
||||
<span class="modality-icon" data-tooltip="Video">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="m22 8-6 4 6 4V8Z"></path>
|
||||
<rect width="14" height="12" x="2" y="6" rx="2" ry="2"></rect>
|
||||
</svg>
|
||||
</span>
|
||||
);
|
||||
case "pdf":
|
||||
return (
|
||||
<span class="modality-icon" data-tooltip="PDF">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path>
|
||||
<polyline points="14,2 14,8 20,8"></polyline>
|
||||
<line x1="16" y1="13" x2="8" y2="13"></line>
|
||||
<line x1="16" y1="17" x2="8" y2="17"></line>
|
||||
<polyline points="10,9 9,9 8,9"></polyline>
|
||||
</svg>
|
||||
</span>
|
||||
);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
const renderCost = (cost?: number) => {
|
||||
return cost === undefined ? "-" : `$${cost.toFixed(2)}`;
|
||||
};
|
||||
const largestRow = getLargestRow(TableRows);
|
||||
|
||||
export const Rendered = renderToString(
|
||||
<Fragment>
|
||||
@@ -213,7 +138,8 @@ export const Rendered = renderToString(
|
||||
<button id="help">How to use</button>
|
||||
</div>
|
||||
</header>
|
||||
<table>
|
||||
<div id="table-viewport" class="table-viewport">
|
||||
<table id="models-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="sortable" data-type="text">
|
||||
@@ -342,120 +268,12 @@ export const Rendered = renderToString(
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{Object.entries(Providers)
|
||||
.sort(([, providerA], [, providerB]) =>
|
||||
providerA.name.localeCompare(providerB.name)
|
||||
)
|
||||
.flatMap(([providerId, provider]) =>
|
||||
Object.entries(provider.models)
|
||||
.filter(([, model]) => model.status !== "alpha")
|
||||
.sort(([, modelA], [, modelB]) =>
|
||||
modelA.name.localeCompare(modelB.name)
|
||||
)
|
||||
.map(([modelId, model]) => (
|
||||
<tr key={`${providerId}-${modelId}`}>
|
||||
<td>
|
||||
<div class="provider-cell">
|
||||
{renderProviderLogo(providerId)}
|
||||
<span>{provider.name}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>{model.name}</td>
|
||||
<td>{model.family ?? "-"}</td>
|
||||
<td>{providerId}</td>
|
||||
<td>
|
||||
<div class="model-id-cell">
|
||||
<span class="model-id-text">{modelId}</span>
|
||||
<button
|
||||
class="copy-button"
|
||||
onclick={`copyModelId(this, '${modelId}')`}
|
||||
>
|
||||
<svg
|
||||
class="copy-icon"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="14"
|
||||
height="14"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<rect
|
||||
width="14"
|
||||
height="14"
|
||||
x="8"
|
||||
y="8"
|
||||
rx="2"
|
||||
ry="2"
|
||||
/>
|
||||
<path d="m4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />
|
||||
</svg>
|
||||
<svg
|
||||
class="check-icon"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="14"
|
||||
height="14"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
style="display: none;"
|
||||
>
|
||||
<polyline points="20,6 9,17 4,12" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
<td>{model.tool_call ? "Yes" : "No"}</td>
|
||||
<td>{model.reasoning ? "Yes" : "No"}</td>
|
||||
<td>
|
||||
<div class="modalities">
|
||||
{model.modalities.input.map((modality) =>
|
||||
getModalityIcon(modality)
|
||||
)}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="modalities">
|
||||
{model.modalities.output.map((modality) =>
|
||||
getModalityIcon(modality)
|
||||
)}
|
||||
</div>
|
||||
</td>
|
||||
<td>{renderCost(model.cost?.input)}</td>
|
||||
<td>{renderCost(model.cost?.output)}</td>
|
||||
<td>{renderCost(model.cost?.reasoning)}</td>
|
||||
<td>{renderCost(model.cost?.cache_read)}</td>
|
||||
<td>{renderCost(model.cost?.cache_write)}</td>
|
||||
<td>{renderCost(model.cost?.input_audio)}</td>
|
||||
<td>{renderCost(model.cost?.output_audio)}</td>
|
||||
<td>{model.limit.context.toLocaleString()}</td>
|
||||
<td>{model.limit.input?.toLocaleString() ?? "-"}</td>
|
||||
<td>{model.limit.output.toLocaleString()}</td>
|
||||
<td>
|
||||
{model.structured_output === undefined
|
||||
? "-"
|
||||
: model.structured_output
|
||||
? "Yes"
|
||||
: "No"}
|
||||
</td>
|
||||
<td>{model.temperature ? "Yes" : "No"}</td>
|
||||
<td>{model.open_weights ? "Open" : "Closed"}</td>
|
||||
<td>
|
||||
{model.knowledge ? model.knowledge.substring(0, 7) : "-"}
|
||||
</td>
|
||||
<td>{model.release_date}</td>
|
||||
<td>{model.last_updated}</td>
|
||||
</tr>
|
||||
))
|
||||
)}
|
||||
</tbody>
|
||||
</table>
|
||||
<tbody id="models-table-body" dangerouslySetInnerHTML={{
|
||||
__html: TableRows.slice(0, INITIAL_ROW_COUNT).map((row, i) => renderRow(row, i)).join('')
|
||||
+ renderRow(largestRow, -1).replace('<tr', '<tr style="visibility:hidden" aria-hidden="true"')
|
||||
}} />
|
||||
</table>
|
||||
</div>
|
||||
<dialog id="modal">
|
||||
<div class="header">
|
||||
<h2>How to use</h2>
|
||||
@@ -565,10 +383,15 @@ export const Rendered = renderToString(
|
||||
>
|
||||
Edit on GitHub
|
||||
</a>
|
||||
<a href="https://sst.dev" target="_blank" rel="noopener noreferrer">
|
||||
Created by SST
|
||||
<a href="https://opencode.ai" target="_blank" rel="noopener noreferrer">
|
||||
Created by OpenCode
|
||||
</a>
|
||||
</div>
|
||||
</dialog>
|
||||
<script
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `window.__TABLE_DATA__ = ${JSON.stringify(TableRows)}`,
|
||||
}}
|
||||
></script>
|
||||
</Fragment>
|
||||
);
|
||||
@@ -0,0 +1,176 @@
|
||||
export interface TableRow {
|
||||
providerId: string;
|
||||
providerName: string;
|
||||
providerLogoSvg: string;
|
||||
modelId: string;
|
||||
modelName: string;
|
||||
family?: string;
|
||||
toolCall: boolean;
|
||||
reasoning: boolean;
|
||||
input: string[];
|
||||
output: string[];
|
||||
inputCost?: number;
|
||||
outputCost?: number;
|
||||
reasoningCost?: number;
|
||||
cacheReadCost?: number;
|
||||
cacheWriteCost?: number;
|
||||
audioInputCost?: number;
|
||||
audioOutputCost?: number;
|
||||
contextLimit: number;
|
||||
inputLimit?: number;
|
||||
outputLimit: number;
|
||||
structuredOutput?: boolean;
|
||||
temperature: boolean;
|
||||
openWeights: boolean;
|
||||
knowledge?: string;
|
||||
releaseDate: string;
|
||||
lastUpdated: string;
|
||||
}
|
||||
|
||||
const MODALITY_ICONS: Record<string, string> = {
|
||||
text: `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="4,7 4,4 20,4 20,7"></polyline><line x1="9" y1="20" x2="15" y2="20"></line><line x1="12" y1="4" x2="12" y2="20"></line></svg>`,
|
||||
image: `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"></rect><circle cx="9" cy="9" r="2"></circle><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"></path></svg>`,
|
||||
audio: `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="m19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"></path></svg>`,
|
||||
video: `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m22 8-6 4 6 4V8Z"></path><rect width="14" height="12" x="2" y="6" rx="2" ry="2"></rect></svg>`,
|
||||
pdf: `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14,2 14,8 20,8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10,9 9,9 8,9"></polyline></svg>`,
|
||||
};
|
||||
|
||||
export function escapeHtml(value: string | number) {
|
||||
return String(value).replace(/[&<>'"]/g, (char) => {
|
||||
switch (char) {
|
||||
case "&":
|
||||
return "&";
|
||||
case "<":
|
||||
return "<";
|
||||
case ">":
|
||||
return ">";
|
||||
case "'":
|
||||
return "'";
|
||||
case '"':
|
||||
return """;
|
||||
default:
|
||||
return char;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function booleanText(value: boolean) {
|
||||
return value ? "Yes" : "No";
|
||||
}
|
||||
|
||||
export function optionalBooleanText(value?: boolean) {
|
||||
return value === undefined ? "-" : booleanText(value);
|
||||
}
|
||||
|
||||
export function formatCost(cost?: number) {
|
||||
return cost === undefined ? "-" : `$${cost.toFixed(2)}`;
|
||||
}
|
||||
|
||||
export function formatNumber(value?: number) {
|
||||
return value === undefined ? "-" : value.toLocaleString();
|
||||
}
|
||||
|
||||
export function knowledgeText(value?: string) {
|
||||
return value ? value.substring(0, 7) : "-";
|
||||
}
|
||||
|
||||
export function weightsText(value: boolean) {
|
||||
return value ? "Open" : "Closed";
|
||||
}
|
||||
|
||||
export function renderModalityIcon(modality: string) {
|
||||
const label =
|
||||
modality === "pdf"
|
||||
? "PDF"
|
||||
: modality[0]!.toUpperCase() + modality.slice(1);
|
||||
const icon = MODALITY_ICONS[modality];
|
||||
if (!icon) return "";
|
||||
return `<span class="modality-icon" data-tooltip="${label}">${icon}</span>`;
|
||||
}
|
||||
|
||||
export function renderModalities(modalities: string[]) {
|
||||
return `<div class="modalities">${modalities
|
||||
.map(renderModalityIcon)
|
||||
.join("")}</div>`;
|
||||
}
|
||||
|
||||
export function renderCopyButton(modelId: string) {
|
||||
const escapedModelId = escapeHtml(modelId);
|
||||
return `<button type="button" class="copy-button" data-model-id="${escapedModelId}" aria-label="Copy model ID"><svg class="copy-icon" xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="m4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><svg class="check-icon" xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="display: none;"><polyline points="20,6 9,17 4,12"></polyline></svg></button>`;
|
||||
}
|
||||
|
||||
export function renderRow(row: TableRow, index: number) {
|
||||
return `<tr data-index="${index}">
|
||||
<td><div class="provider-cell">${row.providerLogoSvg}<span>${escapeHtml(
|
||||
row.providerName
|
||||
)}</span></div></td>
|
||||
<td>${escapeHtml(row.modelName)}</td>
|
||||
<td>${escapeHtml(row.family ?? "-")}</td>
|
||||
<td>${escapeHtml(row.providerId)}</td>
|
||||
<td><div class="model-id-cell"><span class="model-id-text">${escapeHtml(
|
||||
row.modelId
|
||||
)}</span>${renderCopyButton(row.modelId)}</div></td>
|
||||
<td>${booleanText(row.toolCall)}</td>
|
||||
<td>${booleanText(row.reasoning)}</td>
|
||||
<td>${renderModalities(row.input)}</td>
|
||||
<td>${renderModalities(row.output)}</td>
|
||||
<td>${formatCost(row.inputCost)}</td>
|
||||
<td>${formatCost(row.outputCost)}</td>
|
||||
<td>${formatCost(row.reasoningCost)}</td>
|
||||
<td>${formatCost(row.cacheReadCost)}</td>
|
||||
<td>${formatCost(row.cacheWriteCost)}</td>
|
||||
<td>${formatCost(row.audioInputCost)}</td>
|
||||
<td>${formatCost(row.audioOutputCost)}</td>
|
||||
<td>${formatNumber(row.contextLimit)}</td>
|
||||
<td>${formatNumber(row.inputLimit)}</td>
|
||||
<td>${formatNumber(row.outputLimit)}</td>
|
||||
<td>${optionalBooleanText(row.structuredOutput)}</td>
|
||||
<td>${booleanText(row.temperature)}</td>
|
||||
<td>${weightsText(row.openWeights)}</td>
|
||||
<td>${knowledgeText(row.knowledge)}</td>
|
||||
<td>${escapeHtml(row.releaseDate)}</td>
|
||||
<td>${escapeHtml(row.lastUpdated)}</td>
|
||||
</tr>`;
|
||||
}
|
||||
|
||||
export function getLargestRow(rows: TableRow[]): TableRow {
|
||||
const worst: TableRow = {
|
||||
providerId: "", providerName: "", providerLogoSvg: "", modelId: "", modelName: "",
|
||||
toolCall: true, reasoning: true,
|
||||
input: [], output: [],
|
||||
contextLimit: 0, outputLimit: 0,
|
||||
structuredOutput: true, temperature: true, openWeights: false,
|
||||
releaseDate: "", lastUpdated: "",
|
||||
};
|
||||
|
||||
for (const row of rows) {
|
||||
if (row.providerName.length > worst.providerName.length) worst.providerName = row.providerName;
|
||||
if (row.modelName.length > worst.modelName.length) worst.modelName = row.modelName;
|
||||
if ((row.family ?? "").length > (worst.family ?? "").length) worst.family = row.family;
|
||||
if (row.providerId.length > worst.providerId.length) worst.providerId = row.providerId;
|
||||
if (row.modelId.length > worst.modelId.length) worst.modelId = row.modelId;
|
||||
if ((row.knowledge ?? "").length > (worst.knowledge ?? "").length) worst.knowledge = row.knowledge;
|
||||
if (row.releaseDate.length > worst.releaseDate.length) worst.releaseDate = row.releaseDate;
|
||||
if (row.lastUpdated.length > worst.lastUpdated.length) worst.lastUpdated = row.lastUpdated;
|
||||
if (row.input.length > worst.input.length) worst.input = row.input;
|
||||
if (row.output.length > worst.output.length) worst.output = row.output;
|
||||
|
||||
const costWider = (a: number | undefined, b: number | undefined) =>
|
||||
b !== undefined && (a === undefined || formatCost(b).length > formatCost(a).length);
|
||||
if (costWider(worst.inputCost, row.inputCost)) worst.inputCost = row.inputCost;
|
||||
if (costWider(worst.outputCost, row.outputCost)) worst.outputCost = row.outputCost;
|
||||
if (costWider(worst.reasoningCost, row.reasoningCost)) worst.reasoningCost = row.reasoningCost;
|
||||
if (costWider(worst.cacheReadCost, row.cacheReadCost)) worst.cacheReadCost = row.cacheReadCost;
|
||||
if (costWider(worst.cacheWriteCost, row.cacheWriteCost)) worst.cacheWriteCost = row.cacheWriteCost;
|
||||
if (costWider(worst.audioInputCost, row.audioInputCost)) worst.audioInputCost = row.audioInputCost;
|
||||
if (costWider(worst.audioOutputCost, row.audioOutputCost)) worst.audioOutputCost = row.audioOutputCost;
|
||||
|
||||
const numWider = (a: number | undefined, b: number | undefined) =>
|
||||
b !== undefined && (a === undefined || formatNumber(b).length > formatNumber(a).length);
|
||||
if (numWider(worst.contextLimit as number | undefined, row.contextLimit)) worst.contextLimit = row.contextLimit;
|
||||
if (numWider(worst.inputLimit, row.inputLimit)) worst.inputLimit = row.inputLimit;
|
||||
if (numWider(worst.outputLimit as number | undefined, row.outputLimit)) worst.outputLimit = row.outputLimit;
|
||||
}
|
||||
|
||||
return worst;
|
||||
}
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
name = "DeepSeek V4 Flash Think"
|
||||
family = "deepseek"
|
||||
name = "DeepSeek V4 Flash (Alibaba Cloud)"
|
||||
family = "deepseek-flash"
|
||||
release_date = "2026-04-24"
|
||||
last_updated = "2026-04-24"
|
||||
attachment = false
|
||||
@@ -14,9 +14,9 @@ open_weights = true
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0.154
|
||||
output = 0.308
|
||||
cache_read = 0.0308
|
||||
input = 0.14
|
||||
output = 0.28
|
||||
cache_read = 0.028
|
||||
|
||||
[limit]
|
||||
context = 1_000_000
|
||||
@@ -0,0 +1,27 @@
|
||||
name = "DeepSeek V4 Pro (Alibaba Cloud)"
|
||||
family = "deepseek-thinking"
|
||||
release_date = "2026-04-24"
|
||||
last_updated = "2026-04-24"
|
||||
attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
knowledge = "2025-05"
|
||||
open_weights = true
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 1.69
|
||||
output = 3.38
|
||||
cache_read = 0.13
|
||||
|
||||
[limit]
|
||||
context = 1_000_000
|
||||
output = 384_000
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
output = ["text"]
|
||||
+10
-7
@@ -1,19 +1,22 @@
|
||||
name = "GLM 4.6 (exacto)"
|
||||
name = "GLM-5.1 (Alibaba Cloud)"
|
||||
family = "glm"
|
||||
release_date = "2025-09-30"
|
||||
last_updated = "2025-09-30"
|
||||
release_date = "2026-03-27"
|
||||
last_updated = "2026-03-27"
|
||||
attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
knowledge = "2025-09"
|
||||
open_weights = true
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0.60
|
||||
output = 1.90
|
||||
cache_read = 0.11
|
||||
input = 0.84
|
||||
output = 3.38
|
||||
cache_read = 0.169
|
||||
cache_write = 1.05625
|
||||
|
||||
[limit]
|
||||
context = 200_000
|
||||
@@ -1,4 +1,4 @@
|
||||
name = "Claude Opus 4.6"
|
||||
name = "Claude Opus 4.6 Thinking"
|
||||
family = "claude-opus"
|
||||
release_date = "2026-02-05"
|
||||
last_updated = "2026-03-13"
|
||||
@@ -6,18 +6,29 @@ attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
knowledge = "2025-05-31"
|
||||
open_weights = false
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 5
|
||||
output = 25
|
||||
cache_read = 0.5
|
||||
cache_write = 6.25
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 200_000 }
|
||||
input = 10
|
||||
output = 37.5
|
||||
cache_read = 1.0
|
||||
cache_write = 12.5
|
||||
|
||||
[limit]
|
||||
context = 200_000
|
||||
output = 32_000
|
||||
context = 1_000_000
|
||||
output = 128_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf"]
|
||||
|
||||
@@ -6,15 +6,25 @@ attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
knowledge = "2025-05-31"
|
||||
open_weights = false
|
||||
|
||||
interleaved = true
|
||||
|
||||
[cost]
|
||||
input = 5
|
||||
output = 25
|
||||
cache_read = 0.5
|
||||
cache_write = 6.25
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 200_000 }
|
||||
input = 10
|
||||
output = 37.5
|
||||
cache_read = 1.0
|
||||
cache_write = 12.5
|
||||
|
||||
[limit]
|
||||
context = 1_000_000
|
||||
output = 128_000
|
||||
|
||||
@@ -10,16 +10,26 @@ structured_output = true
|
||||
knowledge = "2026-01-31"
|
||||
open_weights = false
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 5
|
||||
output = 25
|
||||
cache_read = 0.5
|
||||
cache_write = 6.25
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 200_000 }
|
||||
input = 10
|
||||
output = 37.5
|
||||
cache_read = 1.0
|
||||
cache_write = 12.5
|
||||
|
||||
[limit]
|
||||
context = 200_000
|
||||
output = 32_000
|
||||
context = 1_000_000
|
||||
output = 128_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
input = ["text", "image", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -6,15 +6,25 @@ attachment = true
|
||||
reasoning = true
|
||||
temperature = false
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
knowledge = "2026-01-31"
|
||||
open_weights = false
|
||||
|
||||
interleaved = true
|
||||
|
||||
[cost]
|
||||
input = 5
|
||||
output = 25
|
||||
cache_read = 0.5
|
||||
cache_write = 6.25
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 200_000 }
|
||||
input = 10
|
||||
output = 37.5
|
||||
cache_read = 1.0
|
||||
cache_write = 12.5
|
||||
|
||||
[limit]
|
||||
context = 1_000_000
|
||||
output = 128_000
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
name = "Claude Sonnet 4.6 Think"
|
||||
name = "Claude Sonnet 4.6 Thinking"
|
||||
family = "claude-sonnet"
|
||||
release_date = "2026-02-17"
|
||||
last_updated = "2026-02-17"
|
||||
last_updated = "2026-03-13"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
knowledge = "2025-08-31"
|
||||
open_weights = false
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 3.00
|
||||
output = 15.00
|
||||
@@ -23,7 +27,7 @@ cache_read = 0.60
|
||||
cache_write = 7.50
|
||||
|
||||
[limit]
|
||||
context = 200_000
|
||||
context = 1_000_000
|
||||
output = 64_000
|
||||
|
||||
[modalities]
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
name = "Claude Sonnet 4.6"
|
||||
family = "claude-sonnet"
|
||||
release_date = "2026-02-17"
|
||||
last_updated = "2026-02-17"
|
||||
last_updated = "2026-03-13"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
knowledge = "2025-08-31"
|
||||
open_weights = false
|
||||
|
||||
interleaved = true
|
||||
|
||||
[cost]
|
||||
input = 3.00
|
||||
output = 15.00
|
||||
@@ -23,7 +26,7 @@ cache_read = 0.60
|
||||
cache_write = 7.50
|
||||
|
||||
[limit]
|
||||
context = 200_000
|
||||
context = 1_000_000
|
||||
output = 64_000
|
||||
|
||||
[modalities]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name = "Coding GLM 5.1 (free)"
|
||||
family = "glm"
|
||||
family = "glm-free"
|
||||
release_date = "2026-04-11"
|
||||
last_updated = "2026-04-11"
|
||||
attachment = false
|
||||
@@ -7,7 +7,7 @@ reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
open_weights = false
|
||||
open_weights = true
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
@@ -15,10 +15,9 @@ field = "reasoning_content"
|
||||
[cost]
|
||||
input = 0
|
||||
output = 0
|
||||
cache_read = 0
|
||||
|
||||
[limit]
|
||||
context = 204_800
|
||||
context = 200_000
|
||||
output = 128_000
|
||||
|
||||
[modalities]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name = "Coding-GLM-5.1"
|
||||
name = "Coding GLM 5.1"
|
||||
family = "glm"
|
||||
release_date = "2026-04-11"
|
||||
last_updated = "2026-04-11"
|
||||
@@ -6,7 +6,8 @@ attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
structured_output = true
|
||||
open_weights = true
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
@@ -14,10 +15,11 @@ field = "reasoning_content"
|
||||
[cost]
|
||||
input = 0.06
|
||||
output = 0.22
|
||||
cache_read = 0.013
|
||||
|
||||
[limit]
|
||||
context = 200000
|
||||
output = 128000
|
||||
context = 200_000
|
||||
output = 128_000
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -1,20 +1,24 @@
|
||||
name = "Coding-MiniMax-M2.7-Free"
|
||||
family = "minimax"
|
||||
name = "Coding MiniMax M2.7 (Free)"
|
||||
family = "minimax-free"
|
||||
release_date = "2026-03-18"
|
||||
last_updated = "2026-03-18"
|
||||
attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
open_weights = true
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0
|
||||
output = 0
|
||||
|
||||
[limit]
|
||||
context = 204_800
|
||||
output = 13_100
|
||||
output = 128_100
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -9,13 +9,16 @@ tool_call = true
|
||||
structured_output = true
|
||||
open_weights = true
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0.2
|
||||
output = 0.2
|
||||
|
||||
[limit]
|
||||
context = 204_800
|
||||
output = 13_100
|
||||
output = 128_100
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -9,13 +9,16 @@ tool_call = true
|
||||
structured_output = true
|
||||
open_weights = true
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0.2
|
||||
output = 0.2
|
||||
|
||||
[limit]
|
||||
context = 204_800
|
||||
output = 13_100
|
||||
output = 128_100
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
name = "Coding Xiaomi MiMo-V2.5-Pro"
|
||||
family = "mimo-v2.5-pro"
|
||||
last_updated = "2026-05-13"
|
||||
|
||||
[extends]
|
||||
from = "xiaomi/mimo-v2.5-pro"
|
||||
|
||||
[cost]
|
||||
input = 0.20
|
||||
output = 0.60
|
||||
cache_read = 0.04
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 256_000 }
|
||||
input = 0.40
|
||||
output = 1.20
|
||||
cache_read = 0.08
|
||||
@@ -0,0 +1,17 @@
|
||||
name = "Coding Xiaomi MiMo-V2.5"
|
||||
family = "mimo-v2.5"
|
||||
last_updated = "2026-05-13"
|
||||
|
||||
[extends]
|
||||
from = "xiaomi/mimo-v2.5"
|
||||
|
||||
[cost]
|
||||
input = 0.08
|
||||
output = 0.40
|
||||
cache_read = 0.016
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 256_000 }
|
||||
input = 0.16
|
||||
output = 0.80
|
||||
cache_read = 0.032
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
name = "DeepSeek V4 Flash"
|
||||
name = "DeepSeek V4 Flash (DeepSeek)"
|
||||
family = "deepseek-flash"
|
||||
release_date = "2026-04-24"
|
||||
last_updated = "2026-04-24"
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
name = "DeepSeek V4 Pro"
|
||||
name = "DeepSeek V4 Pro (DeepSeek)"
|
||||
family = "deepseek-thinking"
|
||||
release_date = "2026-04-24"
|
||||
last_updated = "2026-04-24"
|
||||
@@ -0,0 +1,38 @@
|
||||
name = "Doubao Seed 2.0 Code Preview"
|
||||
family = "seed"
|
||||
release_date = "2026-02-14"
|
||||
last_updated = "2026-02-14"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
open_weights = false
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0.48
|
||||
output = 2.41
|
||||
cache_read = 0.09644
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 32_000 }
|
||||
input = 0.72
|
||||
output = 3.62
|
||||
cache_read = 0.144656
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 128_000 }
|
||||
input = 1.45
|
||||
output = 7.23
|
||||
cache_read = 0.28932
|
||||
|
||||
[limit]
|
||||
context = 256_000
|
||||
output = 128_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "video"]
|
||||
output = ["text"]
|
||||
@@ -0,0 +1,41 @@
|
||||
name = "Doubao Seed 2.0 Lite 260428"
|
||||
family = "seed"
|
||||
release_date = "2026-04-28"
|
||||
last_updated = "2026-04-28"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
open_weights = false
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0.08
|
||||
output = 0.51
|
||||
cache_read = 0.01692
|
||||
input_audio = 1.269
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 32_000 }
|
||||
input = 0.13
|
||||
output = 0.76
|
||||
cache_read = 0.02536
|
||||
input_audio = 1.902
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 128_000 }
|
||||
input = 0.25
|
||||
output = 1.52
|
||||
cache_read = 0.05072
|
||||
input_audio = 3.804
|
||||
|
||||
[limit]
|
||||
context = 256_000
|
||||
output = 128_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "video"]
|
||||
output = ["text"]
|
||||
@@ -0,0 +1,41 @@
|
||||
name = "Doubao Seed 2.0 Mini 260428"
|
||||
family = "seed"
|
||||
release_date = "2026-04-28"
|
||||
last_updated = "2026-04-28"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
open_weights = false
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0.03
|
||||
output = 0.28
|
||||
cache_read = 0.00564
|
||||
input_audio = 0.423
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 32_000 }
|
||||
input = 0.06
|
||||
output = 0.56
|
||||
cache_read = 0.01128
|
||||
input_audio = 0.846
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 128_000 }
|
||||
input = 0.11
|
||||
output = 1.13
|
||||
cache_read = 0.02256
|
||||
input_audio = 1.692
|
||||
|
||||
[limit]
|
||||
context = 256_000
|
||||
output = 128_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "video"]
|
||||
output = ["text"]
|
||||
@@ -0,0 +1,38 @@
|
||||
name = "Doubao Seed 2.0 Pro"
|
||||
family = "seed"
|
||||
release_date = "2026-02-14"
|
||||
last_updated = "2026-02-14"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
open_weights = false
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0.48
|
||||
output = 2.41
|
||||
cache_read = 0.09644
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 32_000 }
|
||||
input = 0.72
|
||||
output = 3.62
|
||||
cache_read = 0.144656
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 128_000 }
|
||||
input = 1.45
|
||||
output = 7.23
|
||||
cache_read = 0.28932
|
||||
|
||||
[limit]
|
||||
context = 256_000
|
||||
output = 128_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "video"]
|
||||
output = ["text"]
|
||||
@@ -12,8 +12,9 @@ open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.3
|
||||
output = 2.499
|
||||
output = 2.50
|
||||
cache_read = 0.03
|
||||
input_audio = 1.00
|
||||
|
||||
[limit]
|
||||
context = 1_048_576
|
||||
|
||||
@@ -15,6 +15,12 @@ input = 1.25
|
||||
output = 10
|
||||
cache_read = 0.125
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 200_000 }
|
||||
input = 2.50
|
||||
output = 15.00
|
||||
cache_read = 0.25
|
||||
|
||||
[limit]
|
||||
context = 1_048_576
|
||||
output = 65_536
|
||||
|
||||
@@ -15,6 +15,12 @@ input = 0.5
|
||||
output = 3
|
||||
cache_read = 0.05
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 200_000 }
|
||||
input = 0.50
|
||||
output = 3.00
|
||||
cache_read = 0.05
|
||||
|
||||
[limit]
|
||||
context = 1_048_576
|
||||
output = 65_536
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name = "Gemini 3.1 Flash Lite"
|
||||
family = "gemini-flash-lite"
|
||||
release_date = "2026-03-03"
|
||||
last_updated = "2026-03-03"
|
||||
release_date = "2026-05-07"
|
||||
last_updated = "2026-05-07"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
@@ -13,7 +13,8 @@ open_weights = false
|
||||
[cost]
|
||||
input = 0.25
|
||||
output = 1.5
|
||||
cache_read = 0.25
|
||||
cache_read = 0.025
|
||||
cache_write = 1.00
|
||||
|
||||
[limit]
|
||||
context = 1_048_576
|
||||
|
||||
@@ -15,6 +15,12 @@ input = 2
|
||||
output = 12
|
||||
cache_read = 0.2
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 200_000 }
|
||||
input = 4.00
|
||||
output = 18.00
|
||||
cache_read = 0.40
|
||||
|
||||
[limit]
|
||||
context = 1_048_576
|
||||
output = 65_536
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name = "GLM 5 Vision Turbo"
|
||||
family = "glm"
|
||||
family = "glmv"
|
||||
release_date = "2026-05-09"
|
||||
last_updated = "2026-05-09"
|
||||
attachment = true
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
name = "GPT-4.1 mini"
|
||||
family = "gpt-mini"
|
||||
release_date = "2025-04-14"
|
||||
last_updated = "2025-04-14"
|
||||
attachment = true
|
||||
reasoning = false
|
||||
temperature = true
|
||||
knowledge = "2024-04"
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.40
|
||||
output = 1.60
|
||||
cache_read = 0.10
|
||||
|
||||
[limit]
|
||||
context = 1_047_576
|
||||
output = 32_768
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
output = ["text"]
|
||||
@@ -5,20 +5,20 @@ last_updated = "2025-11-13"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = false
|
||||
knowledge = "2024-09-30"
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
knowledge = "2024-09-30"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.25
|
||||
output = 2
|
||||
output = 2.00
|
||||
cache_read = 0.025
|
||||
|
||||
[limit]
|
||||
context = 400_000
|
||||
output = 128_000
|
||||
input = 272_000
|
||||
output = 128_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
|
||||
@@ -5,20 +5,20 @@ last_updated = "2025-11-13"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = false
|
||||
knowledge = "2024-09-30"
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
knowledge = "2024-09-30"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 1.25
|
||||
output = 10
|
||||
output = 10.00
|
||||
cache_read = 0.125
|
||||
|
||||
[limit]
|
||||
context = 400_000
|
||||
output = 128_000
|
||||
input = 272_000
|
||||
output = 128_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
name = "GPT-5.1"
|
||||
family = "gpt"
|
||||
release_date = "2025-11-15"
|
||||
last_updated = "2025-11-15"
|
||||
release_date = "2025-11-13"
|
||||
last_updated = "2025-11-13"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
temperature = false
|
||||
knowledge = "2024-09-30"
|
||||
tool_call = true
|
||||
knowledge = "2025-11"
|
||||
structured_output = true
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 1.25
|
||||
output = 10.00
|
||||
cache_read = 0.125
|
||||
cache_read = 0.13
|
||||
|
||||
[limit]
|
||||
context = 400_000
|
||||
input = 272_000
|
||||
output = 128_000
|
||||
|
||||
[modalities]
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
name = "GPT-5.2-Codex"
|
||||
name = "GPT-5.2 Codex"
|
||||
family = "gpt-codex"
|
||||
release_date = "2026-01-14"
|
||||
last_updated = "2026-01-14"
|
||||
release_date = "2025-12-11"
|
||||
last_updated = "2025-12-11"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = false
|
||||
knowledge = "2025-08-31"
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
@@ -16,8 +17,9 @@ cache_read = 0.175
|
||||
|
||||
[limit]
|
||||
context = 400_000
|
||||
input = 272_000
|
||||
output = 128_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
input = ["text", "image", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -7,6 +7,7 @@ reasoning = true
|
||||
temperature = false
|
||||
knowledge = "2025-08-31"
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
@@ -16,6 +17,7 @@ cache_read = 0.175
|
||||
|
||||
[limit]
|
||||
context = 400_000
|
||||
input = 272_000
|
||||
output = 128_000
|
||||
|
||||
[modalities]
|
||||
|
||||
@@ -5,20 +5,20 @@ last_updated = "2026-02-05"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = false
|
||||
knowledge = "2025-08-31"
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
knowledge = "2025-08-31"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 1.75
|
||||
output = 14
|
||||
output = 14.00
|
||||
cache_read = 0.175
|
||||
|
||||
[limit]
|
||||
context = 400_000
|
||||
output = 128_000
|
||||
input = 272_000
|
||||
output = 128_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf"]
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
name = "GPT-5.4-Mini"
|
||||
name = "GPT-5.4 mini"
|
||||
family = "gpt-mini"
|
||||
release_date = "2026-03-11"
|
||||
last_updated = "2026-03-11"
|
||||
release_date = "2026-03-17"
|
||||
last_updated = "2026-03-17"
|
||||
attachment = true
|
||||
reasoning = false
|
||||
reasoning = true
|
||||
temperature = false
|
||||
knowledge = "2025-08-31"
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
structured_output = true
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 0.75
|
||||
@@ -16,8 +17,13 @@ cache_read = 0.075
|
||||
|
||||
[limit]
|
||||
context = 400_000
|
||||
input = 272_000
|
||||
output = 128_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
output = ["text"]
|
||||
|
||||
[experimental.modes.fast]
|
||||
cost = { input = 1.50, output = 9.00, cache_read = 0.15 }
|
||||
provider = { body = { service_tier = "priority" } }
|
||||
@@ -1,23 +1,35 @@
|
||||
name = "GPT-5.4"
|
||||
family = "gpt"
|
||||
release_date = "2026-03-11"
|
||||
last_updated = "2026-03-11"
|
||||
release_date = "2026-03-05"
|
||||
last_updated = "2026-03-05"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = false
|
||||
knowledge = "2025-08-31"
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
structured_output = true
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 2.50
|
||||
output = 15.00
|
||||
cache_read = 0.25
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 272_000 }
|
||||
input = 5.00
|
||||
output = 22.50
|
||||
cache_read = 0.50
|
||||
|
||||
[limit]
|
||||
context = 400_000
|
||||
context = 1_050_000
|
||||
input = 922_000
|
||||
output = 128_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
input = ["text", "image", "pdf"]
|
||||
output = ["text"]
|
||||
|
||||
[experimental.modes.fast]
|
||||
cost = { input = 5.00, output = 30.00, cache_read = 0.50 }
|
||||
provider = { body = { service_tier = "priority" } }
|
||||
@@ -5,20 +5,31 @@ last_updated = "2026-04-23"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = false
|
||||
knowledge = "2025-12-01"
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
knowledge = "2025-12-01"
|
||||
open_weights = false
|
||||
|
||||
[cost]
|
||||
input = 5
|
||||
output = 30
|
||||
cache_read = 0.5
|
||||
input = 5.00
|
||||
output = 30.00
|
||||
cache_read = 0.50
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 272_000 }
|
||||
input = 10.00
|
||||
output = 45.00
|
||||
cache_read = 1.00
|
||||
|
||||
[limit]
|
||||
context = 1_050_000
|
||||
input = 922_000
|
||||
output = 128_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf"]
|
||||
output = ["text"]
|
||||
|
||||
[experimental.modes.fast]
|
||||
cost = { input = 12.50, output = 75.00, cache_read = 1.25 }
|
||||
provider = { body = { service_tier = "priority" } }
|
||||
@@ -1,23 +0,0 @@
|
||||
name = "Kimi-K2-Thinking"
|
||||
family = "kimi"
|
||||
release_date = "2025-11-06"
|
||||
last_updated = "2025-11-06"
|
||||
attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
knowledge = "2025-11"
|
||||
tool_call = true
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
input = 0.55
|
||||
output = 2.19
|
||||
cache_read = 0.14
|
||||
|
||||
[limit]
|
||||
context = 128_000
|
||||
output = 64_000
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
output = ["text"]
|
||||
@@ -2,7 +2,7 @@ name = "Kimi K2.5"
|
||||
family = "kimi-k2.5"
|
||||
release_date = "2026-01"
|
||||
last_updated = "2026-01"
|
||||
attachment = false
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = false
|
||||
tool_call = true
|
||||
@@ -16,11 +16,11 @@ field = "reasoning_content"
|
||||
[cost]
|
||||
input = 0.6
|
||||
output = 3
|
||||
cache_read = 0.105
|
||||
cache_read = 0.10
|
||||
|
||||
[limit]
|
||||
context = 256_000
|
||||
output = 0
|
||||
context = 262_144
|
||||
output = 32_768
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "video"]
|
||||
|
||||
@@ -4,7 +4,7 @@ release_date = "2026-04-21"
|
||||
last_updated = "2026-04-21"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
temperature = false
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
knowledge = "2025-01"
|
||||
@@ -15,12 +15,12 @@ field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0.95
|
||||
output = 3.9995
|
||||
cache_read = 0.160835
|
||||
output = 4
|
||||
cache_read = 0.16
|
||||
|
||||
[limit]
|
||||
context = 262_144
|
||||
output = 262_144
|
||||
output = 32_768
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "video"]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name = "MiniMax-M2.7"
|
||||
name = "MiniMax M2.7"
|
||||
family = "minimax"
|
||||
release_date = "2026-03-18"
|
||||
last_updated = "2026-03-18"
|
||||
@@ -6,15 +6,20 @@ attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
open_weights = true
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0.2958
|
||||
output = 1.1832
|
||||
cache_read = 0.05916
|
||||
input = 0.3
|
||||
output = 1.2
|
||||
cache_read = 0.06
|
||||
cache_write = 0.375
|
||||
|
||||
[limit]
|
||||
context = 200_000
|
||||
context = 204_800
|
||||
output = 128_000
|
||||
|
||||
[modalities]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name = "Qwen3.6 Flash"
|
||||
family = "qwen"
|
||||
family = "qwen3.6"
|
||||
release_date = "2026-04-02"
|
||||
last_updated = "2026-04-02"
|
||||
attachment = true
|
||||
@@ -10,12 +10,22 @@ structured_output = true
|
||||
knowledge = "2025-04"
|
||||
open_weights = false
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0.169
|
||||
output = 1.014
|
||||
input = 0.17
|
||||
output = 1.01
|
||||
cache_read = 0.0169
|
||||
cache_write = 0.21125
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 256_000 }
|
||||
input = 0.68
|
||||
output = 4.06
|
||||
cache_read = 0.0676
|
||||
cache_write = 0.845
|
||||
|
||||
[limit]
|
||||
context = 991_000
|
||||
output = 64_000
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name = "Qwen3.6 Max Preview"
|
||||
family = "qwen"
|
||||
family = "qwen3.6"
|
||||
release_date = "2026-05-09"
|
||||
last_updated = "2026-05-09"
|
||||
attachment = false
|
||||
@@ -10,12 +10,22 @@ structured_output = true
|
||||
knowledge = "2025-04"
|
||||
open_weights = false
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 1.268
|
||||
output = 7.608
|
||||
input = 1.27
|
||||
output = 7.61
|
||||
cache_read = 0.1268
|
||||
cache_write = 1.585
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 128_000 }
|
||||
input = 2.11
|
||||
output = 12.67
|
||||
cache_read = 0.2112
|
||||
cache_write = 2.64
|
||||
|
||||
[limit]
|
||||
context = 240_000
|
||||
output = 64_000
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name = "Qwen3.6 Plus"
|
||||
family = "qwen"
|
||||
family = "qwen3.6"
|
||||
release_date = "2026-05-09"
|
||||
last_updated = "2026-05-09"
|
||||
attachment = true
|
||||
@@ -10,12 +10,22 @@ structured_output = true
|
||||
knowledge = "2025-04"
|
||||
open_weights = false
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0.282
|
||||
output = 1.692
|
||||
input = 0.28
|
||||
output = 1.69
|
||||
cache_read = 0.0282
|
||||
cache_write = 0.3525
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 256_000 }
|
||||
input = 1.13
|
||||
output = 6.77
|
||||
cache_read = 0.1128
|
||||
cache_write = 1.41
|
||||
|
||||
[limit]
|
||||
context = 991_000
|
||||
output = 64_000
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
name = "Xiaomi MiMo-V2.5 (free)"
|
||||
family = "mimo-v2.5"
|
||||
last_updated = "2026-05-13"
|
||||
|
||||
[extends]
|
||||
from = "xiaomi/mimo-v2.5"
|
||||
omit = ["cost.context_over_200k", "cost.tiers"]
|
||||
|
||||
[cost]
|
||||
input = 0
|
||||
output = 0
|
||||
cache_read = 0
|
||||
|
||||
[limit]
|
||||
context = 1_048_576
|
||||
output = 131_072
|
||||
@@ -0,0 +1,16 @@
|
||||
name = "Xiaomi MiMo-V2.5-Pro (free)"
|
||||
family = "mimo-v2.5-pro"
|
||||
last_updated = "2026-05-13"
|
||||
|
||||
[extends]
|
||||
from = "xiaomi/mimo-v2.5-pro"
|
||||
omit = ["cost.context_over_200k", "cost.tiers"]
|
||||
|
||||
[cost]
|
||||
input = 0
|
||||
output = 0
|
||||
cache_read = 0
|
||||
|
||||
[limit]
|
||||
context = 1_048_576
|
||||
output = 131_072
|
||||
@@ -0,0 +1,17 @@
|
||||
name = "Xiaomi MiMo-V2.5-Pro"
|
||||
family = "mimo-v2.5-pro"
|
||||
last_updated = "2026-05-13"
|
||||
|
||||
[extends]
|
||||
from = "xiaomi/mimo-v2.5-pro"
|
||||
|
||||
[cost]
|
||||
input = 1.10
|
||||
output = 3.30
|
||||
cache_read = 0.22
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 256_000 }
|
||||
input = 2.20
|
||||
output = 6.60
|
||||
cache_read = 0.44
|
||||
@@ -0,0 +1,17 @@
|
||||
name = "Xiaomi MiMo-V2.5"
|
||||
family = "mimo-v2.5"
|
||||
last_updated = "2026-05-13"
|
||||
|
||||
[extends]
|
||||
from = "xiaomi/mimo-v2.5"
|
||||
|
||||
[cost]
|
||||
input = 0.44
|
||||
output = 2.20
|
||||
cache_read = 0.088
|
||||
|
||||
[[cost.tiers]]
|
||||
tier = { size = 256_000 }
|
||||
input = 0.88
|
||||
output = 4.40
|
||||
cache_read = 0.176
|
||||
@@ -1,4 +1,4 @@
|
||||
name = "GLM-5.1"
|
||||
name = "GLM-5.1 (Z.ai)"
|
||||
family = "glm"
|
||||
release_date = "2026-03-27"
|
||||
last_updated = "2026-03-27"
|
||||
@@ -7,7 +7,7 @@ reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
open_weights = false
|
||||
open_weights = true
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
@@ -6,7 +6,6 @@ attachment = true
|
||||
reasoning = true
|
||||
temperature = false
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
knowledge = "2026-01-31"
|
||||
open_weights = false
|
||||
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
structured_output = true
|
||||
|
||||
[extends]
|
||||
from = "anthropic/claude-sonnet-4-6"
|
||||
@@ -1,4 +1,5 @@
|
||||
name = "Claude Haiku 4.5 (AU)"
|
||||
structured_output = true
|
||||
|
||||
[extends]
|
||||
from = "anthropic/claude-haiku-4-5-20251001"
|
||||
@@ -1,4 +1,5 @@
|
||||
name = "Claude Sonnet 4.5 (AU)"
|
||||
structured_output = true
|
||||
|
||||
[extends]
|
||||
from = "anthropic/claude-sonnet-4-5"
|
||||
@@ -7,6 +7,7 @@ reasoning = true
|
||||
temperature = true
|
||||
knowledge = "2024-07"
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
|
||||
@@ -6,7 +6,6 @@ attachment = true
|
||||
reasoning = true
|
||||
temperature = false
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
knowledge = "2026-01-31"
|
||||
open_weights = false
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
name = "Claude Sonnet 4.6 (EU)"
|
||||
structured_output = true
|
||||
|
||||
[extends]
|
||||
from = "anthropic/claude-sonnet-4-6"
|
||||
@@ -6,7 +6,6 @@ attachment = true
|
||||
reasoning = true
|
||||
temperature = false
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
knowledge = "2026-01-31"
|
||||
open_weights = false
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
name = "Claude Sonnet 4.6 (Global)"
|
||||
structured_output = true
|
||||
|
||||
[extends]
|
||||
from = "anthropic/claude-sonnet-4-6"
|
||||
@@ -2,3 +2,4 @@ name = "Claude Opus 4.7 (JP)"
|
||||
|
||||
[extends]
|
||||
from = "anthropic/claude-opus-4-7"
|
||||
omit = ["experimental.modes.fast"]
|
||||
@@ -1,4 +1,5 @@
|
||||
name = "Claude Sonnet 4.5 (JP)"
|
||||
structured_output = true
|
||||
|
||||
[extends]
|
||||
from = "anthropic/claude-sonnet-4-5"
|
||||
@@ -1,4 +1,5 @@
|
||||
name = "Claude Sonnet 4.6 (JP)"
|
||||
structured_output = true
|
||||
|
||||
[extends]
|
||||
from = "anthropic/claude-sonnet-4-6"
|
||||
@@ -6,6 +6,7 @@ attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# See https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-moonshot-ai-kimi-k2-thinking.html
|
||||
name = "Kimi K2 Thinking"
|
||||
release_date = "2025-12-02"
|
||||
family = "kimi-thinking"
|
||||
@@ -15,8 +16,8 @@ input = 0.6
|
||||
output = 2.5
|
||||
|
||||
[limit]
|
||||
context = 256_000
|
||||
output = 256_000
|
||||
context = 262_143
|
||||
output = 16_000
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# See https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-moonshot-ai-kimi-k2-5.html
|
||||
name = "Kimi K2.5"
|
||||
family = "kimi"
|
||||
release_date = "2026-02-06"
|
||||
@@ -6,6 +7,7 @@ attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
interleaved = true
|
||||
open_weights = true
|
||||
|
||||
@@ -14,8 +16,8 @@ input = 0.6
|
||||
output = 3
|
||||
|
||||
[limit]
|
||||
context = 256_000
|
||||
output = 256_000
|
||||
context = 262_143
|
||||
output = 16_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
|
||||
@@ -6,6 +6,7 @@ attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
|
||||
@@ -6,6 +6,7 @@ attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name = "gpt-oss-120b"
|
||||
family = "gpt-oss"
|
||||
release_date = "2024-12-01"
|
||||
last_updated = "2024-12-01"
|
||||
release_date = "2025-08-05"
|
||||
last_updated = "2025-08-05"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
@@ -15,7 +15,7 @@ output = 0.60
|
||||
|
||||
[limit]
|
||||
context = 128_000
|
||||
output = 4_096
|
||||
output = 16_384
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name = "gpt-oss-20b"
|
||||
family = "gpt-oss"
|
||||
release_date = "2024-12-01"
|
||||
last_updated = "2024-12-01"
|
||||
release_date = "2025-08-05"
|
||||
last_updated = "2025-08-05"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
@@ -15,7 +15,7 @@ output = 0.30
|
||||
|
||||
[limit]
|
||||
context = 128_000
|
||||
output = 4_096
|
||||
output = 16_384
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name = "GPT OSS Safeguard 120B"
|
||||
family = "gpt-oss"
|
||||
release_date = "2024-12-01"
|
||||
last_updated = "2024-12-01"
|
||||
release_date = "2025-10-29"
|
||||
last_updated = "2025-10-29"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
@@ -15,7 +15,7 @@ output = 0.60
|
||||
|
||||
[limit]
|
||||
context = 128_000
|
||||
output = 4_096
|
||||
output = 16_384
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name = "GPT OSS Safeguard 20B"
|
||||
family = "gpt-oss"
|
||||
release_date = "2024-12-01"
|
||||
last_updated = "2024-12-01"
|
||||
release_date = "2025-10-29"
|
||||
last_updated = "2025-10-29"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
@@ -15,7 +15,7 @@ output = 0.20
|
||||
|
||||
[limit]
|
||||
context = 128_000
|
||||
output = 4_096
|
||||
output = 16_384
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -6,7 +6,6 @@ attachment = true
|
||||
reasoning = true
|
||||
temperature = false
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
knowledge = "2026-01-31"
|
||||
open_weights = false
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
name = "Claude Sonnet 4.6 (US)"
|
||||
structured_output = true
|
||||
|
||||
[extends]
|
||||
from = "anthropic/claude-sonnet-4-6"
|
||||
@@ -6,6 +6,7 @@ attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
knowledge = "2025-04"
|
||||
open_weights = true
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
knowledge = "2025-04"
|
||||
open_weights = true
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ attachment = false
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
open_weights = true
|
||||
|
||||
[interleaved]
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 1000 1000" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M500.01 0C776.15 0.00263886 1000.01 223.859 1000.01 500C1000.01 776.141 776.15 999.997 500.01 1000C223.867 1000 0 776.142 0 500C0 223.858 223.867 0 500.01 0ZM190.771 782.893C170.685 777.656 152.021 801.54 166.309 816.597C250.128 904.919 368.634 960 500.01 960C500.524 960 500.849 959.44 500.596 958.992C490.764 941.533 481.028 918.657 471.653 891.233C469.044 883.602 462.221 878.199 454.214 877.237C383.634 868.761 319.014 840.946 265.793 799.231C262.77 796.862 259.158 795.355 255.345 794.901C232.627 792.191 211.025 788.173 190.771 782.893ZM960.01 500C960.01 495.973 954.492 494.69 952.503 498.192C933.27 532.036 905.527 565.622 870.666 597.443C867.83 600.032 865.767 603.365 864.687 607.051C828.929 729.066 733.621 825.603 612.353 863.082C604.651 865.463 598.906 871.994 597.701 879.964C595.509 894.447 593.019 907.803 590.244 919.914C586.822 934.845 599.592 949.436 614.432 945.637C813.123 894.772 960.01 714.547 960.01 500ZM553.762 899.277C556.082 887.599 546.063 877.421 534.204 878.477C522.332 879.535 513.976 891.359 518.346 902.448C524.735 918.657 531.009 931.911 536.992 942.09C538.314 944.338 541.591 944.04 542.49 941.592C546.56 930.512 550.368 916.358 553.762 899.277ZM566.584 789.667C567.397 775.94 554.224 765.756 540.949 769.347C528.253 772.781 515.61 775.909 503.044 778.735C492.036 781.212 484.976 792.123 487.699 803.073C490.686 815.089 493.737 826.604 496.849 837.576C497.251 838.991 498.539 840 500.01 840C516.412 840 532.539 838.823 548.32 836.571C557.109 835.316 563.722 828.063 564.471 819.217C565.278 809.695 565.981 799.838 566.584 789.667ZM447.841 808.514C445.348 798.371 435.449 791.236 425.091 792.583C421.457 793.055 417.835 793.502 414.223 793.922C393.774 796.301 388.862 822.072 408.698 827.583C414.303 829.14 419.966 830.557 425.683 831.83C439.603 834.931 451.245 822.364 447.841 808.514ZM764.59 713.509C777.54 697.482 758.556 679.341 740.521 689.306C703.847 709.567 663.911 727.903 621.345 743.65C613.599 746.516 608.308 753.754 607.988 762.007C607.568 772.856 607.041 783.43 606.41 793.707C605.536 807.972 619.234 818.797 632.396 813.227C684.321 791.255 729.649 756.754 764.59 713.509ZM390.872 323.423C390.734 309.436 376.781 299.718 363.841 305.029C289.127 335.698 224.668 374.393 174.327 416.362C171.079 419.07 168.807 422.768 167.901 426.898C162.74 450.446 160.01 474.904 160.01 500C160.01 600.268 203.41 690.396 272.452 752.626C275.592 755.455 279.588 757.14 283.803 757.452C324.044 760.437 367.915 759.304 414.039 753.669C425.415 752.28 432.998 741.403 430.842 730.147C418.148 663.877 407.589 588.785 400.41 508.965C394.534 443.628 391.438 381.003 390.872 323.423ZM120.01 500C120.01 489.625 107.049 484.436 100.904 492.796C60.2452 548.11 48.8815 599.625 61.9922 640.498C73.2357 675.547 103.673 706.485 153.262 728.044C170.955 735.736 185.411 714.054 175.364 697.583C140.246 640.012 120.01 572.372 120.01 500ZM529.523 275.559C527.44 264.748 516.914 257.756 506.172 260.167C485.914 264.714 465.396 270.093 444.72 276.332C436.48 278.819 430.87 286.404 430.827 295.01C430.507 358.702 433.468 430.045 440.244 505.381C447.396 584.899 457.923 659.285 470.468 724.411C472.551 735.222 483.076 742.215 493.818 739.804C514.079 735.257 534.6 729.878 555.28 723.638C563.519 721.152 569.129 713.567 569.173 704.96C569.492 641.279 566.54 569.948 559.766 494.629C552.612 415.093 542.073 340.695 529.523 275.559ZM727.518 247.344C724.379 244.515 720.383 242.831 716.169 242.519C675.932 239.537 632.068 240.668 585.952 246.301C574.576 247.691 566.992 258.568 569.149 269.824C581.849 336.105 592.419 411.216 599.6 491.055C605.474 556.374 608.562 618.982 609.128 676.548C609.266 690.535 623.219 700.253 636.159 694.942C710.88 664.269 775.339 625.565 825.682 583.59C828.931 580.881 831.203 577.183 832.108 573.052C837.266 549.519 840.01 525.08 840.01 500C840.01 399.715 796.583 309.575 727.518 247.344ZM846.724 271.924C829.03 264.233 814.576 285.917 824.625 302.386C859.759 359.964 880.01 427.615 880.01 500C880.01 510.361 892.93 515.541 899.067 507.194C939.744 451.874 951.129 400.361 938.018 359.482C926.773 324.428 896.326 293.485 846.724 271.924ZM409.759 80.0815C413.177 65.1488 400.404 50.5555 385.564 54.3551C186.88 105.225 40.0098 285.458 40.0098 500C40.0098 504.014 45.4911 505.293 47.4741 501.803C66.7109 467.945 94.4674 434.341 129.344 402.508C132.18 399.919 134.243 396.586 135.323 392.901C171.092 270.906 266.402 174.383 387.657 136.908C395.359 134.528 401.104 127.997 402.309 120.027C404.499 105.546 406.987 92.1917 409.759 80.0815ZM393.589 206.285C394.464 192.02 380.765 181.194 367.603 186.764C315.696 208.731 270.381 243.219 235.445 286.446C222.492 302.472 241.475 320.614 259.511 310.65C296.176 290.395 336.102 272.064 378.655 256.32C386.401 253.455 391.692 246.217 392.012 237.964C392.432 227.122 392.959 216.555 393.589 206.285ZM500.01 40C499.482 40 499.15 40.5643 499.408 41.024C509.238 58.4774 518.974 81.3443 528.347 108.757C530.956 116.388 537.779 121.791 545.786 122.753C616.353 131.227 680.961 159.039 734.1Line truncated
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.1 KiB |
@@ -0,0 +1,16 @@
|
||||
[extends]
|
||||
from = "moonshotai/kimi-k2.6"
|
||||
|
||||
[cost]
|
||||
input = 0.95
|
||||
output = 4
|
||||
cache_read = 0.2
|
||||
cache_write = 0
|
||||
|
||||
[limit]
|
||||
context = 262144
|
||||
output = 262144
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
output = ["text"]
|
||||
@@ -0,0 +1,16 @@
|
||||
[extends]
|
||||
from = "zai/glm-5.1"
|
||||
|
||||
[cost]
|
||||
input = 1.4
|
||||
output = 4.4
|
||||
cache_read = 0
|
||||
cache_write = 0
|
||||
|
||||
[limit]
|
||||
context = 202752
|
||||
output = 131072
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
output = ["text"]
|
||||
@@ -0,0 +1,5 @@
|
||||
name = "Ambient"
|
||||
env = ["AMBIENT_API_KEY"]
|
||||
npm = "@ai-sdk/openai-compatible"
|
||||
api = "https://api.ambient.xyz/v1"
|
||||
doc = "https://ambient.xyz"
|
||||
@@ -22,3 +22,7 @@ output = 128_000
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf"]
|
||||
output = ["text"]
|
||||
|
||||
[experimental.modes.fast]
|
||||
cost = { input = 30.00, output = 150.00, cache_read = 3.00, cache_write = 37.50 }
|
||||
provider = { body = { speed = "fast" }, headers = { anthropic-beta = "fast-mode-2026-02-01" } }
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 200 200" width="200" height="200"><image width="200" height="200" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAQAElEQVR4AexdCXAV1bbduYlMRXgg8rSkwCCCYhUgggyxABEF6zuAv1SQ+X1LKKYoDoAITxTEIEYg8LUAJ0AtiKCg8hU1jBoB4SNQBSqKFhSW84TMGd5eze2QcO9Nbg+n+3TfnTo7p4dz9tlnnbVuz90R0vyvrKysZXFx8W0nTpwYd+rUqbknT558k/NP2PafPn36J85PspWylYmd0gkDjMnJ6Bjt57H5JDp2czGWGFOMreb0I60EwoClHzt2rAuDmcP2CttOBviL0tLS1ZFI5FkGMyctLe12zrPZLuPyjTivwZbGJkkvBDAmNaJjdBmHlp12ZuxyMJYYU4wtxpgNY52Dsefy6VxWm+S7QAAI/6L05l+Xp/hXZWNGRkYRozOXbSjbVWwAmjNJIUQAY4sxxljPxdiDA+ACOAFu+N1n3wTCnW/NQExgQD7kX5T3+ddlIi+71m9ApH1/EQAHwAVwAtwAR3hZa7+i8lwgx48f78Gb1HzevK5hIHK58z386ry0qzcC4AY4Aq6AM+CO1xErFEjlrnDnenInF6Snp7/Ja8ayNWGTJAgkgwC4MhbcAYfApWQquVFGuUC4Q1exPcudW8YBD2erzyZJELCDALgzHFwCp9hw/GLHT9J1lAnk119/rccduJ8jWcw2ju0CNkmCgBsIgEvg1GJwDFxzw2k8H0oEwpvAHpmZmQu5wdlsbdgkCQIqEAC3ZoNr4JyKBlwVCB9UpbOix/Am8H852H5skgQBLxDoB86Be+Cgmw26JhBWcBafbcDFvHkcYCs2dUk8CwKxCIBz88BBcDF2tb0lrgiEg7qWL/JAHDn2wpBagoBrCOSAi+CkGx4dC4SveN7Cm7WZbLgFxI2YxIcg4AgBcJFtJrjpyBFXdiQQvsrZn694zmA/cgWcQZCkFQLXgpvgqJOobAuEGx7ADT/B5tttANy2JEGgKgTAzSeiXK2qXMJ1tgTCDfZnj1PT0tJacB6qJJ0JFwJRjk6NctZy5ywLBPt13OgkNhGHZbilgh8IgKtsk8Bdq+1bEgjODPB+3URuBJsuziQJAoFBoDW4Cw5biThpgUTPLT/IzuWAnEGQFEgEwN0Ho1xOqgNJCYRPmfGFyvRxnMup3KRglUK6IgAOM5nB5aSeXExKILxZGskdlouADIKDJFX1QSAnyulqI6pWILw5wgNNo6r1JAVsI8AHj/Tzzz/Tt99+aximscy2Q6mYDAKjotyusmyVAsFtxLw5GsEecJ8LZ5LcQmDXrl20aNEiGjNmDPXt25euv/56uu222wzDNJZhHcqgrFvtip9yBFqB2+B4+ZI4E1UKJDMz83+4jtyVyyC4lQoLC2nixIl0zz33UH5+Pm3cuJEOHz4c4x7LsA5lUBZ1UDemoCxwgkC/KMcT+kgokFOnTuFprX8lrCkrLCGA3aennnqKHnjgAVqzZg3xhauk66Ms6qAufMBX0pWlYHUI/CvK9bjlEgqESw9hwwMpnElygsDmzZtpxowZ9Prrr1NpaaltV6gLH/AFn2cdyZQDBMBxcD2ui7gC4YOXnlx6MJskhwhs2rSJ5s2bR1u2bHHo6Wx1+IJP+D67VKYcIDA4yvkYF3EFwgcvd3FJPPfLmSS7CGzfvp0WLFhA+/bts+siYT34hG+0kbCQrEgWgQuinI8pHyMQVhJO60IgMYVlQfII/P3337Rs2TLavXt38pUsloRvtIG2LFaV4rEI3BXlfqU1MQJhJeFqOV6vUqmgzFhDYMWKFbR27VprlWyURhtoy0ZVqVIZgfpR7ldaWkkgfBkeNyH2rVRCZiwj8N1339GqVass17NbAW2hTbv1q6yXWiv7RjVQ3utKAuHTXf/Fa/AWO84k2UVgw4YN9M0339itbrke2kKblitKhXMRaBLVQPnycoGwctIjkUjv8jUyYRuBoiK8oN52dVsV/WjTVqCaV4IGoAUzzHKB8MWoG3gFDtDNdZLbQOCLL76gnTt32qjprAraRNvOvEhtaABaMJEoF0haWtp15kLJ7SOA3R0/bjREm2jbfuRS00SgohYMgbBqsHvV1SwguX0EDh48aL+yw5p+tm0ndF3r8G5WV2gC8RkC4fO/HXkBnrbCMjEHCPzyyy8Oajur6mfbziLXqza0AE0gKkMgGRkZ12BGzDkCvP/q3IlND362bTNkbauZmjAEwlFezSZJEBAEziJgaMIUSNuzy2VKEKgaARzr4DaXjz/+mGA4g3bgwAFHdypX3aIvaw1NRHh/qyU3b8xwHtiE+5EwWK+88gpNmzaNcnJyaOTIkfTwww/T008/TQUFBbRnzx4qKSkJbB/9Chy7bnh4Czj269eP+vTpQwMHDjTwBcZDhgwxluEpyMcff5zee+89+u233/wKF+26YW2hjQgT5gr2lsYWyPTZZ5/RM888Q4MGDTIGLC8vzxDD+vXrjV+3999/n5YuXWqIZsCAATRixAh66aWXaP/+/YHsr5dB49Tx6tWrjYe88PgvcNy7dy8VFxfHDQMPcuG+sPHjxxt1XnvtNeNZ+7iF9V+YBm1EuLPN9Y81NkJs0mfNmmVsKRYvXpz0rR1bt26l2bNnG4+9LlmyhP76669Y57LEuEX/ySefpMmTJ5Od50527NhBubm5NH36dPr0008DiSi0wad8I1lBix5bhalTpxIIjl0rO/F/9dVXBIHhEVbsetnxEdY6ePYdTy3iJkinfVy3bp3xNOWbb77p1JXn9VkcWTgGaeJ5yw4axCYcu1E4MHTgprzqu+++awglqL9y5R1xaeLDDz80noD8/PPPXfJIhDuN586dSxg715x64IiPQZpE+LL6hR605UoTK1euNAbvhx9+cMWf6QRie/755wO7K2D2w2kOcTz33HNJ765aaQ8H7XgCElt/K/X8LAttRDiAf7KdTZpO4RceZ6gAtIoQU10kpji+/vprFfAaPvHDhpdO4PjRWKD/v39iC/IP3ePEmwbxaCk21SpjTVWReCEOc9yAMfYEzHmdc96C/APHINoL5IMPPiAc7HkBJgYwlXa3vBSHOX44YMfpeXNe15yPQf6BXazzdA0QcWGXCoOIaa8sVUQCXHHMoXK3Kt6Y4czjxo0b463Sbdl5EIjWFwlx3QLn1L1GLuwi8Usc5jjirgcIxZzXNE+DQDyLzU5D27Zts1PNlTphFYnf4sDg4OEuN08lw6cK01ogeNWmH1uPikCHTSQ6iMPE1+tdO7NdK7nWAsFZK9zfY6VDKsqGRSQ6iQPjdOjQIWRam9YC+fPPP7UBL+gi0U0cGFicvkeus2ktkKNHj2qFXVBFoqM4MLCnT59GprVpLRALyHlWNGgi0VUcGLC6desi09q0Fki9evW0BC8oItFZHBjYRo0aIdPatBZI/fr1KSMjQ0sAdReJ7uLAoGZlZSHT2rQWSNOmTallSzwRrCeGuookCOLAiLZqpf+3YbUWCEBs3749Mm1NN5EERRydOnWiK6+8UttxNQPTXiAA0gzWn7z6VnURyffff09+3FtVPUKxJbKzsyk9PT12hWZLtBdI586dqVu3bprBFhuOKRI/z+1/+eWXFISr09ht7to1GG+61V4gNWvWpF69esUyUsMlEImfb1gPygso8NqgFi1aaDiCsSFpLxCE3Lt3b8I7lzCtu+H2fN1j9DO+W265JTBjCZwCIZBatWoR3ml11VVXIWaxgCLQrl07Yxx1vb4VD9ZACASB45TgsGHDqHnzQL7GC12ItRRaAnHgLYytW7cOVK8DIxCg2rNnTxo9ejRddtllmBULCAKmOLp06RKQiM+GGSiBIOwbb7yRRo0aJSIBGAGwIIsD8AZOIAhaRAIU9LegiwMIB1IgCFxEAhT0tTCIA+gGViAIXkQCFOKbn0vDIg5gGGiBoAMiEqCgj4VJHEA18AJBJ0QkQMF/C5s4gGgoBIKOiEiAgn8WRnEAzdAIBJ0RkQAF7y2s4gCSoRIIOiQiAQpKrZLzMIsDHQ2dQNApEQlQUG9hFwcQDKVA0DERCVBQZ6kgDqAXWoGgcyISoOC+pYo4gFyoBYIOikiAgnuWSuIAaqEXCDopIgEKzk29OJzH6LaHlBAIQBORAAX7loriAFopIxB0VkQCFKxbqooDSGkhELzoYM2aNYRvA06bNo0mT56szPDprwYNGlCQHvvEQPll559/PtWuXZswPirHBb4x9uAA2gIn/OpzxXZ9Ewi+/YHPOg8fPpwGDx5MEydONN7pVFBQQKtXr1Zq+IBkUN4AUnGw/JjGSyiKioqUjoc53hh7vNcLXAAnwA1wBFzxo+9o03OB4Lt06PT9999PeXl5hO+fnzhxArGICQLlCIAT4AY4Aq6AM+BOeQGrEzbLeyqQ7du309SpUw1h4Bt1NmOWaimGALgCoYA74JCX3fdMIJs2baLZs2fT2rVrveyftBUiBMAdcAhc8qpbnghk8+bNNH/+fNq9e7dX/ZJ2QooAOAQugVNedFG5QPARziVLltC+ffu86I+0kQIIgEvgFLilurvKBbJs2TLasmWL6n6I/xRDAJwCt1R3OxmB2I6hsLCQvOiE7QClYqARALfAMZWdUCoQfMyltLRUZfziO4URALfAMZUQKBPIrl276KOPPlIZu/gWBAyOgWuqoFAmkG3bttHJkydVxS1+BQEDAXAMXDNmFPxTJhCVqlaAg7gMMAIquaZEILhNILlPgQV4VCR0bRAA18A5FQEpEciRI0fo8OHDKuIVn4JADALgGjgXs8KFBUoE4sdNZS5gIS4CjIAqzikRSIBxltAFgUoIKBFLine truncated
|
||||
|
After Width: | Height: | Size: 9.4 KiB |
@@ -0,0 +1,21 @@
|
||||
name = "Meta Llama 3.1 8B Instruct (GGUF)"
|
||||
family = "llama"
|
||||
release_date = "2024-07-23"
|
||||
last_updated = "2024-07-23"
|
||||
attachment = false
|
||||
reasoning = false
|
||||
temperature = true
|
||||
tool_call = true
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
input = 0
|
||||
output = 0
|
||||
|
||||
[limit]
|
||||
context = 131_072
|
||||
output = 4_096
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
output = ["text"]
|
||||
+5
-6
@@ -1,12 +1,11 @@
|
||||
name = "Gemma 3 4B"
|
||||
family = "gemma"
|
||||
release_date = "2025-03-13"
|
||||
last_updated = "2025-03-13"
|
||||
name = "Qwen 3.5 9B (MLX 4-bit)"
|
||||
family = "qwen"
|
||||
release_date = "2026-03-05"
|
||||
last_updated = "2026-04-04"
|
||||
attachment = true
|
||||
reasoning = false
|
||||
temperature = true
|
||||
knowledge = "2024-10"
|
||||
tool_call = false
|
||||
tool_call = true
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
+5
-6
@@ -1,12 +1,11 @@
|
||||
name = "Gemma 3 4B (free)"
|
||||
family = "gemma"
|
||||
release_date = "2025-03-13"
|
||||
last_updated = "2025-03-13"
|
||||
name = "Qwen 3.5 9B (Q4_K_M)"
|
||||
family = "qwen"
|
||||
release_date = "2026-03-05"
|
||||
last_updated = "2026-04-04"
|
||||
attachment = true
|
||||
reasoning = false
|
||||
temperature = true
|
||||
knowledge = "2024-10"
|
||||
tool_call = false
|
||||
tool_call = true
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
Loaded 100 of 842 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user