From 3efc1339640332711e154fe3452283c87a8ca55a Mon Sep 17 00:00:00 2001 From: joshrad-dev <62785552+joshrad-dev@users.noreply.github.com> Date: Wed, 1 Oct 2025 09:13:19 -0500 Subject: [PATCH 1/3] Add a usage based cost render for Github Copilot --- packages/web/src/render.tsx | 1010 ++++++++++++++++++----------------- 1 file changed, 507 insertions(+), 503 deletions(-) diff --git a/packages/web/src/render.tsx b/packages/web/src/render.tsx index 27740dde..5f1c337d 100644 --- a/packages/web/src/render.tsx +++ b/packages/web/src/render.tsx @@ -8,43 +8,43 @@ import { existsSync } from "fs"; import path from "path"; export const Providers = await generate( - path.join(import.meta.dir, "..", "..", "..", "providers") + path.join(import.meta.dir, "..", "..", "..", "providers") ); // Function to load SVG content const loadProviderSvg = async (providerId: string): Promise => { - const providerLogoPath = path.join( - import.meta.dir, - "..", "..", "..", - "providers", - providerId, - "logo.svg" - ); + const providerLogoPath = path.join( + import.meta.dir, + "..", "..", "..", + "providers", + providerId, + "logo.svg" + ); - const defaultLogoPath = path.join( - import.meta.dir, - "..", "..", "..", - "providers", - "logo.svg" - ); + const defaultLogoPath = path.join( + import.meta.dir, + "..", "..", "..", + "providers", + "logo.svg" + ); - try { - // Try provider-specific logo first - if (existsSync(providerLogoPath)) { - const file = Bun.file(providerLogoPath); - return await file.text(); + try { + // Try provider-specific logo first + if (existsSync(providerLogoPath)) { + const file = Bun.file(providerLogoPath); + return await file.text(); + } + // + // Fall back to default logo + if (existsSync(defaultLogoPath)) { + const file = Bun.file(defaultLogoPath); + return await file.text(); + } + return null; + } catch (error) { + console.warn(`Failed to load logo for provider ${providerId}:`, error); + return null; } - // - // Fall back to default logo - if (existsSync(defaultLogoPath)) { - const file = Bun.file(defaultLogoPath); - return await file.text(); - } - return null; - } catch (error) { - console.warn(`Failed to load logo for provider ${providerId}:`, error); - return null; - } }; // Create a cache of loaded SVGs at build time @@ -52,495 +52,499 @@ const providerLogos = new Map(); // Pre-load all provider logos for (const [providerId] of Object.entries(Providers)) { - const svgContent = await loadProviderSvg(providerId); - if (svgContent) { - providerLogos.set(providerId, svgContent); - } + const svgContent = await loadProviderSvg(providerId); + if (svgContent) { + providerLogos.set(providerId, svgContent); + } } function renderProviderLogo(providerId: string) { - const svgContent = providerLogos.get(providerId) || ""; + const svgContent = providerLogos.get(providerId) || ""; - return ; + return ; } const getModalityIcon = (modality: string) => { - switch (modality) { - case "text": - return ( - - - - - - - - ); - case "image": - return ( - - - - - - - - ); - case "audio": - return ( - - - - - - - ); - case "video": - return ( - - - - - - - ); - case "pdf": - return ( - - - - - - - - - - ); - default: - return null; - } + switch (modality) { + case "text": + return ( + + + + + + + + ); + case "image": + return ( + + + + + + + + ); + case "audio": + return ( + + + + + + + ); + case "video": + return ( + + + + + + + ); + case "pdf": + return ( + + + + + + + + + + ); + default: + return null; + } }; const renderCost = (cost?: number) => { - return cost === undefined ? "-" : `$${cost.toFixed(2)}`; + return cost === undefined ? "-" : `$${cost.toFixed(2)}`; }; +const renderUsageBasedCost = (cost?: number) => { + return cost === undefined ? "-" : `${cost.toFixed(2)}x`; +}; + export const Rendered = renderToString( - -
-
-

Models.dev

- -

An open-source database of AI models

-
-
- - - - - -
- - ⌘K -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - {Object.entries(Providers) - .sort(([, providerA], [, providerB]) => - providerA.name.localeCompare(providerB.name) - ) - .flatMap(([providerId, provider]) => - Object.entries(provider.models) - .filter(([, model]) => !model.experimental) - .sort(([, modelA], [, modelB]) => - modelA.name.localeCompare(modelB.name) - ) - .map(([modelId, model]) => ( - - - - - - - - - - - - - - - - - - - - - - - - - )) - )} - -
- Provider - - Model - - Provider ID - - Model ID - - Tool Call - - Reasoning - - Input - - Output - -
- - Input Cost -
- per 1M tokens -
- + +
+
+

Models.dev

+ +

An open-source database of AI models

-
-
- - Output Cost -
- per 1M tokens -
- +
+ + + + + +
+ + ⌘K +
+
-
-
- - Reasoning Cost -
- per 1M tokens -
- -
-
-
- - Cache Read Cost -
- per 1M tokens -
- -
-
-
- - Cache Write Cost -
- per 1M tokens -
- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {Object.entries(Providers) + .sort(([, providerA], [, providerB]) => + providerA.name.localeCompare(providerB.name) + ) + .flatMap(([providerId, provider]) => + Object.entries(provider.models) + .filter(([, model]) => !model.experimental) + .sort(([, modelA], [, modelB]) => + modelA.name.localeCompare(modelB.name) + ) + .map(([modelId, model]) => ( + + + + + + + + + + + + + + + + + + + + + + + + + )) + )} + +
+ Provider + + Model + + Provider ID + + Model ID + + Tool Call + + Reasoning + + Input + + Output + +
+ + Input Cost +
+ per 1M tokens +
+ +
+
+
+ + Output Cost +
+ per 1M tokens +
+ +
+
+
+ + Reasoning Cost +
+ per 1M tokens +
+ +
+
+
+ + Cache Read Cost +
+ per 1M tokens +
+ +
+
+
+ + Cache Write Cost +
+ per 1M tokens +
+ +
+
+
+ + Audio Input Cost +
+ per 1M tokens +
+ +
+
+
+ + Audio Output Cost +
+ per 1M tokens +
+ +
+
+ Context Limit + + Output Limit + + Temperature + + Weights + + Knowledge + + Release Date + + Last Updated +
+
+ {renderProviderLogo(providerId)} + {provider.name} +
+
{model.name}{providerId} +
+ {modelId} + +
+
{model.tool_call ? "Yes" : "No"}{model.reasoning ? "Yes" : "No"} +
+ {model.modalities.input.map((modality) => + getModalityIcon(modality) + )} +
+
+
+ {model.modalities.output.map((modality) => + getModalityIcon(modality) + )} +
+
{providerId == "github-copilot" ? renderUsageBasedCost(model.cost?.input) : renderCost(model.cost?.input)}{providerId == "github-copilot" ? renderUsageBasedCost(model.cost?.output) : renderCost(model.cost?.output)}{renderCost(model.cost?.reasoning)}{renderCost(model.cost?.cache_read)}{renderCost(model.cost?.cache_write)}{renderCost(model.cost?.input_audio)}{renderCost(model.cost?.output_audio)}{model.limit.context.toLocaleString()}{model.limit.output.toLocaleString()}{model.temperature ? "Yes" : "No"}{model.open_weights ? "Open" : "Closed"} + {model.knowledge ? model.knowledge.substring(0, 7) : "-"} + {model.release_date}{model.last_updated}
+ +
+

How to use

+
-
-
- - Audio Input Cost -
- per 1M tokens -
- +
+

+ Models.dev is a comprehensive open-source database of + AI model specifications, pricing, and features. +

+

+ There's no single database with information about all the + available AI models. We started Models.dev as a community-contributed + project to address this. We also use it internally in{" "} + + opencode + + . +

+

API

+

You can access this data through an API.

+ +

+ Use the Model ID field to do a lookup on any model; it's + the identifier used by{" "} + + AI SDK + + . +

+

Logos

+

Provider logos are available at /logos/{`{provider}`}.svg where {`{provider}`} is the Provider ID.

+ +

+ If we don't have a provider's logo, a default logo is served instead. +

+

Contribute

+

+ The data is stored in the{" "} + + GitHub repo + {" "} + as TOML files; organized by provider and model. The logo is stored as + an SVG. This is used to generate this page and power the API. +

+

+ We need your help keeping this up to date. Feel free to edit the data + and submit a pull request. Refer to the{" "} + + README + {" "} + for more information. +

-
-
- - Audio Output Cost -
- per 1M tokens -
- + -
- Context Limit - - Output Limit - - Temperature - - Weights - - Knowledge - - Release Date - - Last Updated -
-
- {renderProviderLogo(providerId)} - {provider.name} -
-
{model.name}{providerId} -
- {modelId} - -
-
{model.tool_call ? "Yes" : "No"}{model.reasoning ? "Yes" : "No"} -
- {model.modalities.input.map((modality) => - getModalityIcon(modality) - )} -
-
-
- {model.modalities.output.map((modality) => - getModalityIcon(modality) - )} -
-
{renderCost(model.cost?.input)}{renderCost(model.cost?.output)}{renderCost(model.cost?.reasoning)}{renderCost(model.cost?.cache_read)}{renderCost(model.cost?.cache_write)}{renderCost(model.cost?.input_audio)}{renderCost(model.cost?.output_audio)}{model.limit.context.toLocaleString()}{model.limit.output.toLocaleString()}{model.temperature ? "Yes" : "No"}{model.open_weights ? "Open" : "Closed"} - {model.knowledge ? model.knowledge.substring(0, 7) : "-"} - {model.release_date}{model.last_updated}
- -
-

How to use

- -
-
-

- Models.dev is a comprehensive open-source database of - AI model specifications, pricing, and features. -

-

- There's no single database with information about all the - available AI models. We started Models.dev as a community-contributed - project to address this. We also use it internally in{" "} - - opencode - - . -

-

API

-

You can access this data through an API.

- -

- Use the Model ID field to do a lookup on any model; it's - the identifier used by{" "} - - AI SDK - - . -

-

Logos

-

Provider logos are available at /logos/{`{provider}`}.svg where {`{provider}`} is the Provider ID.

- -

- If we don't have a provider's logo, a default logo is served instead. -

-

Contribute

-

- The data is stored in the{" "} - - GitHub repo - {" "} - as TOML files; organized by provider and model. The logo is stored as - an SVG. This is used to generate this page and power the API. -

-

- We need your help keeping this up to date. Feel free to edit the data - and submit a pull request. Refer to the{" "} - - README - {" "} - for more information. -

-
- -
-
+ + ); From e3e19bd05af74bd0eeb8dd6ffb3b647cb44a3a0d Mon Sep 17 00:00:00 2001 From: joshrad-dev <62785552+joshrad-dev@users.noreply.github.com> Date: Wed, 1 Oct 2025 09:33:30 -0500 Subject: [PATCH 2/3] Add paid costs for all copilot models --- providers/github-copilot/models/claude-3.5-sonnet.toml | 4 ++++ .../github-copilot/models/claude-3.7-sonnet-thought.toml | 4 ++++ providers/github-copilot/models/claude-3.7-sonnet.toml | 4 ++++ providers/github-copilot/models/claude-opus-4.toml | 4 ++++ providers/github-copilot/models/claude-opus-41.toml | 4 ++++ providers/github-copilot/models/claude-sonnet-4.5.toml | 4 ++++ providers/github-copilot/models/claude-sonnet-4.toml | 4 ++++ providers/github-copilot/models/gemini-2.5-pro.toml | 4 ++++ providers/github-copilot/models/gpt-4.1.toml | 4 ++++ providers/github-copilot/models/gpt-4o.toml | 4 ++++ providers/github-copilot/models/gpt-5-codex.toml | 4 ++++ providers/github-copilot/models/gpt-5-mini.toml | 4 ++++ providers/github-copilot/models/gpt-5.toml | 4 ++++ providers/github-copilot/models/grok-code-fast-1.toml | 4 ++++ providers/github-copilot/models/o3-mini.toml | 4 ++++ providers/github-copilot/models/o3.toml | 4 ++++ providers/github-copilot/models/o4-mini.toml | 4 ++++ 17 files changed, 68 insertions(+) diff --git a/providers/github-copilot/models/claude-3.5-sonnet.toml b/providers/github-copilot/models/claude-3.5-sonnet.toml index bee01a26..b3b77c2d 100644 --- a/providers/github-copilot/models/claude-3.5-sonnet.toml +++ b/providers/github-copilot/models/claude-3.5-sonnet.toml @@ -15,3 +15,7 @@ output = 8_192 [modalities] input = ["text", "image"] output = ["text"] + +[cost] +input = 1 +output = 1 diff --git a/providers/github-copilot/models/claude-3.7-sonnet-thought.toml b/providers/github-copilot/models/claude-3.7-sonnet-thought.toml index 8bffc246..ca2c336d 100644 --- a/providers/github-copilot/models/claude-3.7-sonnet-thought.toml +++ b/providers/github-copilot/models/claude-3.7-sonnet-thought.toml @@ -15,3 +15,7 @@ output = 16_384 [modalities] input = ["text", "image"] output = ["text"] + +[cost] +input = 1 +output = 1 diff --git a/providers/github-copilot/models/claude-3.7-sonnet.toml b/providers/github-copilot/models/claude-3.7-sonnet.toml index 0e16a8d8..066ec53d 100644 --- a/providers/github-copilot/models/claude-3.7-sonnet.toml +++ b/providers/github-copilot/models/claude-3.7-sonnet.toml @@ -15,3 +15,7 @@ output = 16_384 [modalities] input = ["text", "image"] output = ["text"] + +[cost] +input = 1 +output = 1 diff --git a/providers/github-copilot/models/claude-opus-4.toml b/providers/github-copilot/models/claude-opus-4.toml index fd385ef6..e7236ff1 100644 --- a/providers/github-copilot/models/claude-opus-4.toml +++ b/providers/github-copilot/models/claude-opus-4.toml @@ -15,3 +15,7 @@ output = 16_000 [modalities] input = ["text", "image"] output = ["text"] + +[cost] +input = 10 +output = 10 diff --git a/providers/github-copilot/models/claude-opus-41.toml b/providers/github-copilot/models/claude-opus-41.toml index 8ee30bf2..7ff7f2bf 100644 --- a/providers/github-copilot/models/claude-opus-41.toml +++ b/providers/github-copilot/models/claude-opus-41.toml @@ -15,3 +15,7 @@ output = 16_000 [modalities] input = ["text", "image"] output = ["text"] + +[cost] +input = 10 +output = 10 diff --git a/providers/github-copilot/models/claude-sonnet-4.5.toml b/providers/github-copilot/models/claude-sonnet-4.5.toml index 962fb694..a298fa91 100644 --- a/providers/github-copilot/models/claude-sonnet-4.5.toml +++ b/providers/github-copilot/models/claude-sonnet-4.5.toml @@ -15,3 +15,7 @@ output = 16_000 [modalities] input = ["text", "image"] output = ["text"] + +[cost] +input = 1 +output = 1 diff --git a/providers/github-copilot/models/claude-sonnet-4.toml b/providers/github-copilot/models/claude-sonnet-4.toml index 3515f243..c8b7030c 100644 --- a/providers/github-copilot/models/claude-sonnet-4.toml +++ b/providers/github-copilot/models/claude-sonnet-4.toml @@ -15,3 +15,7 @@ output = 16_000 [modalities] input = ["text", "image"] output = ["text"] + +[cost] +input = 1 +output = 1 diff --git a/providers/github-copilot/models/gemini-2.5-pro.toml b/providers/github-copilot/models/gemini-2.5-pro.toml index 7282d594..6bed683f 100644 --- a/providers/github-copilot/models/gemini-2.5-pro.toml +++ b/providers/github-copilot/models/gemini-2.5-pro.toml @@ -15,3 +15,7 @@ output = 64_000 [modalities] input = ["text", "image", "audio", "video"] output = ["text"] + +[cost] +input = 1 +output = 1 diff --git a/providers/github-copilot/models/gpt-4.1.toml b/providers/github-copilot/models/gpt-4.1.toml index 72d90f30..996e0f00 100644 --- a/providers/github-copilot/models/gpt-4.1.toml +++ b/providers/github-copilot/models/gpt-4.1.toml @@ -15,3 +15,7 @@ output = 16_384 [modalities] input = ["text", "image"] output = ["text"] + +[cost] +input = 0 +output = 0 diff --git a/providers/github-copilot/models/gpt-4o.toml b/providers/github-copilot/models/gpt-4o.toml index 7398929f..3689ffbc 100644 --- a/providers/github-copilot/models/gpt-4o.toml +++ b/providers/github-copilot/models/gpt-4o.toml @@ -15,3 +15,7 @@ output = 16_384 [modalities] input = ["text", "image"] output = ["text"] + +[cost] +input = 0 +output = 0 diff --git a/providers/github-copilot/models/gpt-5-codex.toml b/providers/github-copilot/models/gpt-5-codex.toml index 0cd0dcb2..38cb3978 100644 --- a/providers/github-copilot/models/gpt-5-codex.toml +++ b/providers/github-copilot/models/gpt-5-codex.toml @@ -15,3 +15,7 @@ output = 64_000 [modalities] input = ["text", "image"] output = ["text"] + +[cost] +input = 1 +output = 1 diff --git a/providers/github-copilot/models/gpt-5-mini.toml b/providers/github-copilot/models/gpt-5-mini.toml index ac648345..29540847 100644 --- a/providers/github-copilot/models/gpt-5-mini.toml +++ b/providers/github-copilot/models/gpt-5-mini.toml @@ -15,3 +15,7 @@ output = 64_000 [modalities] input = ["text", "image"] output = ["text"] + +[cost] +input = 0 +output = 0 diff --git a/providers/github-copilot/models/gpt-5.toml b/providers/github-copilot/models/gpt-5.toml index 94f5ed57..8a480b1b 100644 --- a/providers/github-copilot/models/gpt-5.toml +++ b/providers/github-copilot/models/gpt-5.toml @@ -15,3 +15,7 @@ output = 64_000 [modalities] input = ["text", "image"] output = ["text"] + +[cost] +input = 1 +output = 1 diff --git a/providers/github-copilot/models/grok-code-fast-1.toml b/providers/github-copilot/models/grok-code-fast-1.toml index 8472133a..2a2f66dd 100644 --- a/providers/github-copilot/models/grok-code-fast-1.toml +++ b/providers/github-copilot/models/grok-code-fast-1.toml @@ -15,3 +15,7 @@ output = 10_000 [modalities] input = ["text"] output = ["text"] + +[cost] +input = 0 +output = 0 diff --git a/providers/github-copilot/models/o3-mini.toml b/providers/github-copilot/models/o3-mini.toml index d009ab47..13754dfb 100644 --- a/providers/github-copilot/models/o3-mini.toml +++ b/providers/github-copilot/models/o3-mini.toml @@ -15,3 +15,7 @@ output = 65_536 [modalities] input = ["text"] output = ["text"] + +[cost] +input = 0.33 +output = 0.33 diff --git a/providers/github-copilot/models/o3.toml b/providers/github-copilot/models/o3.toml index 25c421f3..5974066d 100644 --- a/providers/github-copilot/models/o3.toml +++ b/providers/github-copilot/models/o3.toml @@ -15,3 +15,7 @@ output = 16_384 [modalities] input = ["text", "image"] output = ["text"] + +[cost] +input = 1 +output = 1 diff --git a/providers/github-copilot/models/o4-mini.toml b/providers/github-copilot/models/o4-mini.toml index f8cab5a5..b324232c 100644 --- a/providers/github-copilot/models/o4-mini.toml +++ b/providers/github-copilot/models/o4-mini.toml @@ -15,3 +15,7 @@ output = 65_536 [modalities] input = ["text"] output = ["text"] + +[cost] +input = 0.33 +output = 0.33 From be86a58db1c13418117d409b4770894219ff3497 Mon Sep 17 00:00:00 2001 From: joshrad-dev <62785552+joshrad-dev@users.noreply.github.com> Date: Wed, 1 Oct 2025 09:37:47 -0500 Subject: [PATCH 3/3] Undo automatic formatting from vscode --- packages/web/src/render.tsx | 1008 +++++++++++++++++------------------ 1 file changed, 504 insertions(+), 504 deletions(-) diff --git a/packages/web/src/render.tsx b/packages/web/src/render.tsx index 5f1c337d..599cb2e2 100644 --- a/packages/web/src/render.tsx +++ b/packages/web/src/render.tsx @@ -8,43 +8,43 @@ import { existsSync } from "fs"; import path from "path"; export const Providers = await generate( - path.join(import.meta.dir, "..", "..", "..", "providers") + path.join(import.meta.dir, "..", "..", "..", "providers") ); // Function to load SVG content const loadProviderSvg = async (providerId: string): Promise => { - const providerLogoPath = path.join( - import.meta.dir, - "..", "..", "..", - "providers", - providerId, - "logo.svg" - ); + const providerLogoPath = path.join( + import.meta.dir, + "..", "..", "..", + "providers", + providerId, + "logo.svg" + ); - const defaultLogoPath = path.join( - import.meta.dir, - "..", "..", "..", - "providers", - "logo.svg" - ); + const defaultLogoPath = path.join( + import.meta.dir, + "..", "..", "..", + "providers", + "logo.svg" + ); - try { - // Try provider-specific logo first - if (existsSync(providerLogoPath)) { - const file = Bun.file(providerLogoPath); - return await file.text(); - } - // - // Fall back to default logo - if (existsSync(defaultLogoPath)) { - const file = Bun.file(defaultLogoPath); - return await file.text(); - } - return null; - } catch (error) { - console.warn(`Failed to load logo for provider ${providerId}:`, error); - return null; + try { + // Try provider-specific logo first + if (existsSync(providerLogoPath)) { + const file = Bun.file(providerLogoPath); + return await file.text(); } + // + // Fall back to default logo + if (existsSync(defaultLogoPath)) { + const file = Bun.file(defaultLogoPath); + return await file.text(); + } + return null; + } catch (error) { + console.warn(`Failed to load logo for provider ${providerId}:`, error); + return null; + } }; // Create a cache of loaded SVGs at build time @@ -52,499 +52,499 @@ const providerLogos = new Map(); // Pre-load all provider logos for (const [providerId] of Object.entries(Providers)) { - const svgContent = await loadProviderSvg(providerId); - if (svgContent) { - providerLogos.set(providerId, svgContent); - } + const svgContent = await loadProviderSvg(providerId); + if (svgContent) { + providerLogos.set(providerId, svgContent); + } } function renderProviderLogo(providerId: string) { - const svgContent = providerLogos.get(providerId) || ""; + const svgContent = providerLogos.get(providerId) || ""; - return ; + return ; } const getModalityIcon = (modality: string) => { - switch (modality) { - case "text": - return ( - - - - - - - - ); - case "image": - return ( - - - - - - - - ); - case "audio": - return ( - - - - - - - ); - case "video": - return ( - - - - - - - ); - case "pdf": - return ( - - - - - - - - - - ); - default: - return null; - } + switch (modality) { + case "text": + return ( + + + + + + + + ); + case "image": + return ( + + + + + + + + ); + case "audio": + return ( + + + + + + + ); + case "video": + return ( + + + + + + + ); + case "pdf": + return ( + + + + + + + + + + ); + default: + return null; + } }; const renderCost = (cost?: number) => { - return cost === undefined ? "-" : `$${cost.toFixed(2)}`; + return cost === undefined ? "-" : `$${cost.toFixed(2)}`; }; const renderUsageBasedCost = (cost?: number) => { - return cost === undefined ? "-" : `${cost.toFixed(2)}x`; + return cost === undefined ? "-" : `${cost.toFixed(2)}x`; }; export const Rendered = renderToString( - -
-
-

Models.dev

- -

An open-source database of AI models

+ +
+
+

Models.dev

+ +

An open-source database of AI models

+
+
+ + + + + +
+ + ⌘K +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + {Object.entries(Providers) + .sort(([, providerA], [, providerB]) => + providerA.name.localeCompare(providerB.name) + ) + .flatMap(([providerId, provider]) => + Object.entries(provider.models) + .filter(([, model]) => !model.experimental) + .sort(([, modelA], [, modelB]) => + modelA.name.localeCompare(modelB.name) + ) + .map(([modelId, model]) => ( + + + + + + + + + + + + + + + + + + + + + + + + + )) + )} + +
+ Provider + + Model + + Provider ID + + Model ID + + Tool Call + + Reasoning + + Input + + Output + +
+ + Input Cost +
+ per 1M tokens +
+
-
- - - - - -
- - ⌘K -
- +
+
+ + Output Cost +
+ per 1M tokens +
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {Object.entries(Providers) - .sort(([, providerA], [, providerB]) => - providerA.name.localeCompare(providerB.name) - ) - .flatMap(([providerId, provider]) => - Object.entries(provider.models) - .filter(([, model]) => !model.experimental) - .sort(([, modelA], [, modelB]) => - modelA.name.localeCompare(modelB.name) - ) - .map(([modelId, model]) => ( - - - - - - - - - - - - - - - - - - - - - - - - - )) - )} - -
- Provider - - Model - - Provider ID - - Model ID - - Tool Call - - Reasoning - - Input - - Output - -
- - Input Cost -
- per 1M tokens -
- -
-
-
- - Output Cost -
- per 1M tokens -
- -
-
-
- - Reasoning Cost -
- per 1M tokens -
- -
-
-
- - Cache Read Cost -
- per 1M tokens -
- -
-
-
- - Cache Write Cost -
- per 1M tokens -
- -
-
-
- - Audio Input Cost -
- per 1M tokens -
- -
-
-
- - Audio Output Cost -
- per 1M tokens -
- -
-
- Context Limit - - Output Limit - - Temperature - - Weights - - Knowledge - - Release Date - - Last Updated -
-
- {renderProviderLogo(providerId)} - {provider.name} -
-
{model.name}{providerId} -
- {modelId} - -
-
{model.tool_call ? "Yes" : "No"}{model.reasoning ? "Yes" : "No"} -
- {model.modalities.input.map((modality) => - getModalityIcon(modality) - )} -
-
-
- {model.modalities.output.map((modality) => - getModalityIcon(modality) - )} -
-
{providerId == "github-copilot" ? renderUsageBasedCost(model.cost?.input) : renderCost(model.cost?.input)}{providerId == "github-copilot" ? renderUsageBasedCost(model.cost?.output) : renderCost(model.cost?.output)}{renderCost(model.cost?.reasoning)}{renderCost(model.cost?.cache_read)}{renderCost(model.cost?.cache_write)}{renderCost(model.cost?.input_audio)}{renderCost(model.cost?.output_audio)}{model.limit.context.toLocaleString()}{model.limit.output.toLocaleString()}{model.temperature ? "Yes" : "No"}{model.open_weights ? "Open" : "Closed"} - {model.knowledge ? model.knowledge.substring(0, 7) : "-"} - {model.release_date}{model.last_updated}
- -
-

How to use

- +
+
+ + Reasoning Cost +
+ per 1M tokens +
+
-
-

- Models.dev is a comprehensive open-source database of - AI model specifications, pricing, and features. -

-

- There's no single database with information about all the - available AI models. We started Models.dev as a community-contributed - project to address this. We also use it internally in{" "} - - opencode - - . -

-

API

-

You can access this data through an API.

- -

- Use the Model ID field to do a lookup on any model; it's - the identifier used by{" "} - - AI SDK - - . -

-

Logos

-

Provider logos are available at /logos/{`{provider}`}.svg where {`{provider}`} is the Provider ID.

- -

- If we don't have a provider's logo, a default logo is served instead. -

-

Contribute

-

- The data is stored in the{" "} - - GitHub repo - {" "} - as TOML files; organized by provider and model. The logo is stored as - an SVG. This is used to generate this page and power the API. -

-

- We need your help keeping this up to date. Feel free to edit the data - and submit a pull request. Refer to the{" "} - - README - {" "} - for more information. -

+
+
+ + Cache Read Cost +
+ per 1M tokens +
+
-
+
+ + Cache Write Cost +
+ per 1M tokens +
+
- - +
+
+ + Audio Input Cost +
+ per 1M tokens +
+ +
+
+
+ + Audio Output Cost +
+ per 1M tokens +
+ +
+
+ Context Limit + + Output Limit + + Temperature + + Weights + + Knowledge + + Release Date + + Last Updated +
+
+ {renderProviderLogo(providerId)} + {provider.name} +
+
{model.name}{providerId} +
+ {modelId} + +
+
{model.tool_call ? "Yes" : "No"}{model.reasoning ? "Yes" : "No"} +
+ {model.modalities.input.map((modality) => + getModalityIcon(modality) + )} +
+
+
+ {model.modalities.output.map((modality) => + getModalityIcon(modality) + )} +
+
{providerId == "github-copilot" ? renderUsageBasedCost(model.cost?.input) : renderCost(model.cost?.input)}{providerId == "github-copilot" ? renderUsageBasedCost(model.cost?.output) : renderCost(model.cost?.output)}{renderCost(model.cost?.reasoning)}{renderCost(model.cost?.cache_read)}{renderCost(model.cost?.cache_write)}{renderCost(model.cost?.input_audio)}{renderCost(model.cost?.output_audio)}{model.limit.context.toLocaleString()}{model.limit.output.toLocaleString()}{model.temperature ? "Yes" : "No"}{model.open_weights ? "Open" : "Closed"} + {model.knowledge ? model.knowledge.substring(0, 7) : "-"} + {model.release_date}{model.last_updated}
+ +
+

How to use

+ +
+
+

+ Models.dev is a comprehensive open-source database of + AI model specifications, pricing, and features. +

+

+ There's no single database with information about all the + available AI models. We started Models.dev as a community-contributed + project to address this. We also use it internally in{" "} + + opencode + + . +

+

API

+

You can access this data through an API.

+ +

+ Use the Model ID field to do a lookup on any model; it's + the identifier used by{" "} + + AI SDK + + . +

+

Logos

+

Provider logos are available at /logos/{`{provider}`}.svg where {`{provider}`} is the Provider ID.

+ +

+ If we don't have a provider's logo, a default logo is served instead. +

+

Contribute

+

+ The data is stored in the{" "} + + GitHub repo + {" "} + as TOML files; organized by provider and model. The logo is stored as + an SVG. This is used to generate this page and power the API. +

+

+ We need your help keeping this up to date. Feel free to edit the data + and submit a pull request. Refer to the{" "} + + README + {" "} + for more information. +

+
+ +
+
);