mirror of
https://github.com/HeyPuter/puter.git
synced 2026-09-12 00:05:38 +00:00
feat(ai): backfill provider catalogs from live /models listings
A live audit of every keyed provider's /models endpoint against the hardcoded catalogs found no stale entries but large gaps. This backfills them under four rules: nothing vendor-deprecated, nothing without a price confirmed on the vendor's official pricing page (each entry's source was recorded during review), nothing absent from the live /models listing, and nothing that fails a live routing probe. Added: 46 Alibaba entries (qwen3/3.5/3.7/3.8 families, VL/omni/MT lines, and Model Studio's hosted GLM/DeepSeek/Kimi third-party models) plus 9 dated aliases; OpenAI chat-latest and gpt-4o-2024-11-20 plus 16 snapshot aliases; Gemini gemma-4-31b-it and gemma-4-26b-a4b-it (vendor-documented free tier) plus rolling -latest aliases; Mistral-hosted zai-glm-5-2 and a mistral-medium-3.5 alias; deepseek-v4-flash-vision-exp; glm-5.3-flash. Culled by the rules: 15 vendor-deprecated OpenAI entries (the 3.5/4/4-turbo legacy line, gpt-4o-2024-05-13, o1-pro, four chat-latest predecessors, the 5.x codex line — deprecations page, most shut down 2026-10-23) and dated aliases onto the deprecated o1/o3-mini/o4-mini; qwen3-vl-flash-2025-10-15 (live routing probe returned upstream 400 twice). Tiered Alibaba prices are encoded at the base tier and busy-hour rates where time-of-day priced, noted in comments. Every surviving addition was verified end-to-end through a local deployment: 58/58 answered a live prompt, including all 46 Alibaba entries and every spot-checked alias. Not changed, flagged for maintainers: pre-existing o1, o3-mini and o4-mini entries are now vendor-deprecated (shutdown 2026-10-23); the pre-existing deepseek-v4-flash/-pro prices no longer match DeepSeek's current pricing page; gemma-4 emits its own <thought> markup inline in content. Co-Authored-By: Claude Fable 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
4199a2506d
commit
7e1cdefd98
File diff suppressed because it is too large
Load Diff
@@ -50,6 +50,31 @@ export const DEEPSEEK_MODELS: IChatModel[] = [
|
||||
},
|
||||
max_tokens: 384_000,
|
||||
},
|
||||
{
|
||||
// Priced identically to deepseek-v4-flash per DeepSeek's launch note
|
||||
// (https://api-docs.deepseek.com/news/news260821/) and the pricing
|
||||
// page, which lists the same rates for both models; images are
|
||||
// tokenized (up to 384 tokens each) and billed as input tokens.
|
||||
puterId: 'deepseek:deepseek/deepseek-v4-flash-vision-exp',
|
||||
id: 'deepseek-v4-flash-vision-exp',
|
||||
modalities: { input: ['text', 'image'], output: ['text'] },
|
||||
open_weights: false,
|
||||
tool_call: true,
|
||||
release_date: '2026-08-21',
|
||||
name: 'DeepSeek V4 Flash Vision (Experimental)',
|
||||
aliases: ['deepseek/deepseek-v4-flash-vision-exp'],
|
||||
context: 1_000_000,
|
||||
costs_currency: 'usd-cents',
|
||||
input_cost_key: 'prompt_tokens',
|
||||
output_cost_key: 'completion_tokens',
|
||||
costs: {
|
||||
tokens: 1_000_000,
|
||||
prompt_tokens: 14,
|
||||
completion_tokens: 28,
|
||||
cached_tokens: 0.28,
|
||||
},
|
||||
max_tokens: 384_000,
|
||||
},
|
||||
{
|
||||
puterId: 'deepseek:deepseek/deepseek-v4-pro',
|
||||
id: 'deepseek-v4-pro',
|
||||
|
||||
@@ -33,7 +33,14 @@ export const GEMINI_MODELS: IChatModel[] = [
|
||||
knowledge: '2025-01',
|
||||
release_date: '2026-05-19',
|
||||
name: 'Gemini 3.5 Flash',
|
||||
aliases: ['google/gemini-3.5-flash'],
|
||||
aliases: [
|
||||
'google/gemini-3.5-flash',
|
||||
// Rolling alias; Gemini API changelog (2026-05-19): gemini-3.5-flash
|
||||
// "Now backs `gemini-flash-latest`". Hot-swapped by Google on new
|
||||
// releases; no later switch documented as of 2026-08-28.
|
||||
'gemini-flash-latest',
|
||||
'google/gemini-flash-latest',
|
||||
],
|
||||
context: 1_048_576,
|
||||
max_tokens: 65_536,
|
||||
costs_currency: 'usd-cents',
|
||||
@@ -61,7 +68,13 @@ export const GEMINI_MODELS: IChatModel[] = [
|
||||
knowledge: '2025-01',
|
||||
release_date: '2026-07-21',
|
||||
name: 'Gemini 3.5 Flash-Lite',
|
||||
aliases: ['google/gemini-3.5-flash-lite'],
|
||||
aliases: [
|
||||
'google/gemini-3.5-flash-lite',
|
||||
// Rolling alias that floats across Flash-Lite releases; pinned here
|
||||
// to the newest Flash-Lite in this catalog (GA 2026-07-21).
|
||||
'gemini-flash-lite-latest',
|
||||
'google/gemini-flash-lite-latest',
|
||||
],
|
||||
context: 1_048_576,
|
||||
max_tokens: 65_536,
|
||||
costs_currency: 'usd-cents',
|
||||
@@ -228,7 +241,14 @@ export const GEMINI_MODELS: IChatModel[] = [
|
||||
knowledge: '2025-01',
|
||||
release_date: '2026-02-19',
|
||||
name: 'Gemini 3.1 Pro Preview',
|
||||
aliases: ['google/gemini-3.1-pro-preview'],
|
||||
aliases: [
|
||||
'google/gemini-3.1-pro-preview',
|
||||
// Rolling alias that floats across Pro releases; pinned here to the
|
||||
// newest Pro in this catalog (Google last documented it switching to
|
||||
// gemini-3-pro-preview on 2026-01-21, superseded by 3.1 on 2026-02-19).
|
||||
'gemini-pro-latest',
|
||||
'google/gemini-pro-latest',
|
||||
],
|
||||
context: 1_048_576,
|
||||
costs_currency: 'usd-cents',
|
||||
input_cost_key: 'prompt_tokens',
|
||||
@@ -301,4 +321,60 @@ export const GEMINI_MODELS: IChatModel[] = [
|
||||
},
|
||||
max_tokens: 65536,
|
||||
},
|
||||
{
|
||||
puterId: 'google:google/gemma-4-31b-it',
|
||||
id: 'gemma-4-31b-it',
|
||||
modalities: {
|
||||
input: ['text', 'image'],
|
||||
output: ['text'],
|
||||
},
|
||||
open_weights: true,
|
||||
tool_call: true,
|
||||
knowledge: '2025-01',
|
||||
release_date: '2026-04-02',
|
||||
name: 'Gemma 4 31B',
|
||||
aliases: ['google/gemma-4-31b-it'],
|
||||
context: 262_144,
|
||||
costs_currency: 'usd-cents',
|
||||
input_cost_key: 'prompt_tokens',
|
||||
output_cost_key: 'completion_tokens',
|
||||
// Gemma 4 on the Gemini API is free of charge (free tier only; the
|
||||
// official pricing page lists no paid tier for Gemma models).
|
||||
costs: {
|
||||
tokens: 1_000_000,
|
||||
prompt_tokens: 0,
|
||||
completion_tokens: 0,
|
||||
thinking_tokens: 0,
|
||||
cached_tokens: 0,
|
||||
},
|
||||
max_tokens: 8_192,
|
||||
},
|
||||
{
|
||||
puterId: 'google:google/gemma-4-26b-a4b-it',
|
||||
id: 'gemma-4-26b-a4b-it',
|
||||
modalities: {
|
||||
input: ['text', 'image'],
|
||||
output: ['text'],
|
||||
},
|
||||
open_weights: true,
|
||||
tool_call: true,
|
||||
knowledge: '2025-01',
|
||||
release_date: '2026-04-02',
|
||||
name: 'Gemma 4 26B A4B',
|
||||
aliases: ['google/gemma-4-26b-a4b-it'],
|
||||
context: 262_144,
|
||||
costs_currency: 'usd-cents',
|
||||
input_cost_key: 'prompt_tokens',
|
||||
output_cost_key: 'completion_tokens',
|
||||
// Gemma 4 on the Gemini API is free of charge (free tier only; the
|
||||
// official pricing page lists no paid tier for Gemma models).
|
||||
costs: {
|
||||
tokens: 1_000_000,
|
||||
prompt_tokens: 0,
|
||||
completion_tokens: 0,
|
||||
thinking_tokens: 0,
|
||||
cached_tokens: 0,
|
||||
},
|
||||
max_tokens: 8_192,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -32,6 +32,7 @@ export const MISTRAL_MODELS: IChatModel[] = [
|
||||
name: 'Mistral Medium 3.5',
|
||||
aliases: [
|
||||
'mistral-medium-3-5',
|
||||
'mistral-medium-3.5',
|
||||
'mistral-medium-3',
|
||||
'mistral-medium-latest',
|
||||
'mistral-medium',
|
||||
@@ -110,6 +111,29 @@ export const MISTRAL_MODELS: IChatModel[] = [
|
||||
completion_tokens: 60,
|
||||
},
|
||||
},
|
||||
{
|
||||
puterId: 'mistralai:mistralai/zai-glm-5-2',
|
||||
id: 'zai-glm-5-2',
|
||||
modalities: { input: ['text'], output: ['text'] },
|
||||
open_weights: true,
|
||||
tool_call: true,
|
||||
release_date: '2026-08-06',
|
||||
name: 'Z.ai GLM 5.2',
|
||||
aliases: ['glm-5-2'],
|
||||
context: 1_000_000,
|
||||
max_tokens: 128_000,
|
||||
description:
|
||||
'Third-party open-source model from Z.ai, hosted by Mistral for long-context coding and agentic workflows.',
|
||||
provider: 'mistral',
|
||||
costs_currency: 'usd-cents',
|
||||
input_cost_key: 'prompt_tokens',
|
||||
output_cost_key: 'completion_tokens',
|
||||
costs: {
|
||||
tokens: 1_000_000,
|
||||
prompt_tokens: 140,
|
||||
completion_tokens: 440,
|
||||
},
|
||||
},
|
||||
{
|
||||
puterId: 'mistralai:mistralai/codestral-2508',
|
||||
id: 'codestral-2508',
|
||||
|
||||
@@ -158,7 +158,7 @@ export const OPEN_AI_MODELS: IChatModel[] = [
|
||||
tool_call: true,
|
||||
knowledge: '2025-08-31',
|
||||
release_date: '2026-03-05',
|
||||
aliases: ['openai/gpt-5.4-pro'],
|
||||
aliases: ['gpt-5.4-pro-2026-03-05', 'openai/gpt-5.4-pro'],
|
||||
costs_currency: 'usd-cents',
|
||||
input_cost_key: 'prompt_tokens',
|
||||
output_cost_key: 'completion_tokens',
|
||||
@@ -178,7 +178,7 @@ export const OPEN_AI_MODELS: IChatModel[] = [
|
||||
open_weights: false,
|
||||
tool_call: true,
|
||||
knowledge: '2025-08-31',
|
||||
aliases: ['openai/gpt-5.4-mini'],
|
||||
aliases: ['gpt-5.4-mini-2026-03-17', 'openai/gpt-5.4-mini'],
|
||||
costs_currency: 'usd-cents',
|
||||
input_cost_key: 'prompt_tokens',
|
||||
output_cost_key: 'completion_tokens',
|
||||
@@ -200,7 +200,7 @@ export const OPEN_AI_MODELS: IChatModel[] = [
|
||||
tool_call: true,
|
||||
knowledge: '2025-08-31',
|
||||
release_date: '2026-03-19',
|
||||
aliases: ['openai/gpt-5.4-nano'],
|
||||
aliases: ['gpt-5.4-nano-2026-03-17', 'openai/gpt-5.4-nano'],
|
||||
costs_currency: 'usd-cents',
|
||||
input_cost_key: 'prompt_tokens',
|
||||
output_cost_key: 'completion_tokens',
|
||||
@@ -221,7 +221,7 @@ export const OPEN_AI_MODELS: IChatModel[] = [
|
||||
tool_call: true,
|
||||
knowledge: '2025-10',
|
||||
release_date: '2025-10-06',
|
||||
aliases: ['openai/gpt-5-pro'],
|
||||
aliases: ['gpt-5-pro-2025-10-06', 'openai/gpt-5-pro'],
|
||||
costs_currency: 'usd-cents',
|
||||
input_cost_key: 'prompt_tokens',
|
||||
output_cost_key: 'completion_tokens',
|
||||
@@ -306,7 +306,7 @@ export const OPEN_AI_MODELS: IChatModel[] = [
|
||||
tool_call: true,
|
||||
knowledge: '2024-09-30',
|
||||
release_date: '2025-11-13',
|
||||
aliases: ['openai/gpt-5.1'],
|
||||
aliases: ['gpt-5.1-2025-11-13', 'openai/gpt-5.1'],
|
||||
costs_currency: 'usd-cents',
|
||||
input_cost_key: 'prompt_tokens',
|
||||
output_cost_key: 'completion_tokens',
|
||||
@@ -390,7 +390,7 @@ export const OPEN_AI_MODELS: IChatModel[] = [
|
||||
tool_call: true,
|
||||
knowledge: '2023-09',
|
||||
release_date: '2024-05-13',
|
||||
aliases: ['openai/gpt-4o'],
|
||||
aliases: ['gpt-4o-2024-08-06', 'openai/gpt-4o'],
|
||||
costs_currency: 'usd-cents',
|
||||
input_cost_key: 'prompt_tokens',
|
||||
output_cost_key: 'completion_tokens',
|
||||
@@ -411,7 +411,7 @@ export const OPEN_AI_MODELS: IChatModel[] = [
|
||||
tool_call: true,
|
||||
knowledge: '2023-09',
|
||||
release_date: '2024-07-18',
|
||||
aliases: ['openai/gpt-4o-mini'],
|
||||
aliases: ['gpt-4o-mini-2024-07-18', 'openai/gpt-4o-mini'],
|
||||
context: 128_000,
|
||||
max_tokens: 16384,
|
||||
costs_currency: 'usd-cents',
|
||||
@@ -453,7 +453,7 @@ export const OPEN_AI_MODELS: IChatModel[] = [
|
||||
tool_call: true,
|
||||
knowledge: '2024-05',
|
||||
release_date: '2025-04-16',
|
||||
aliases: ['openai/o3'],
|
||||
aliases: ['o3-2025-04-16', 'openai/o3'],
|
||||
costs_currency: 'usd-cents',
|
||||
input_cost_key: 'prompt_tokens',
|
||||
output_cost_key: 'completion_tokens',
|
||||
@@ -474,7 +474,7 @@ export const OPEN_AI_MODELS: IChatModel[] = [
|
||||
tool_call: true,
|
||||
knowledge: '2024-05',
|
||||
release_date: '2025-06-10',
|
||||
aliases: ['openai/o3-pro'],
|
||||
aliases: ['o3-pro-2025-06-10', 'openai/o3-pro'],
|
||||
costs_currency: 'usd-cents',
|
||||
input_cost_key: 'prompt_tokens',
|
||||
output_cost_key: 'completion_tokens',
|
||||
@@ -537,7 +537,7 @@ export const OPEN_AI_MODELS: IChatModel[] = [
|
||||
tool_call: true,
|
||||
knowledge: '2024-04',
|
||||
release_date: '2025-04-14',
|
||||
aliases: ['openai/gpt-4.1'],
|
||||
aliases: ['gpt-4.1-2025-04-14', 'openai/gpt-4.1'],
|
||||
costs_currency: 'usd-cents',
|
||||
input_cost_key: 'prompt_tokens',
|
||||
output_cost_key: 'completion_tokens',
|
||||
@@ -558,7 +558,7 @@ export const OPEN_AI_MODELS: IChatModel[] = [
|
||||
tool_call: true,
|
||||
knowledge: '2024-04',
|
||||
release_date: '2025-04-14',
|
||||
aliases: ['openai/gpt-4.1-mini'],
|
||||
aliases: ['gpt-4.1-mini-2025-04-14', 'openai/gpt-4.1-mini'],
|
||||
costs_currency: 'usd-cents',
|
||||
input_cost_key: 'prompt_tokens',
|
||||
output_cost_key: 'completion_tokens',
|
||||
@@ -579,7 +579,7 @@ export const OPEN_AI_MODELS: IChatModel[] = [
|
||||
tool_call: true,
|
||||
knowledge: '2024-04',
|
||||
release_date: '2025-04-14',
|
||||
aliases: ['openai/gpt-4.1-nano'],
|
||||
aliases: ['gpt-4.1-nano-2025-04-14', 'openai/gpt-4.1-nano'],
|
||||
costs_currency: 'usd-cents',
|
||||
input_cost_key: 'prompt_tokens',
|
||||
output_cost_key: 'completion_tokens',
|
||||
@@ -592,4 +592,45 @@ export const OPEN_AI_MODELS: IChatModel[] = [
|
||||
context: 1_047_576,
|
||||
max_tokens: 32768,
|
||||
},
|
||||
{
|
||||
puterId: 'openai:openai/chat-latest',
|
||||
id: 'chat-latest',
|
||||
modalities: { input: ['text', 'image'], output: ['text'] },
|
||||
open_weights: false,
|
||||
tool_call: true,
|
||||
knowledge: '2025-08-31',
|
||||
aliases: ['openai/chat-latest'],
|
||||
costs_currency: 'usd-cents',
|
||||
input_cost_key: 'prompt_tokens',
|
||||
output_cost_key: 'completion_tokens',
|
||||
costs: {
|
||||
tokens: 1_000_000,
|
||||
prompt_tokens: 500,
|
||||
cached_tokens: 50,
|
||||
completion_tokens: 3000,
|
||||
},
|
||||
context: 400_000,
|
||||
max_tokens: 128_000,
|
||||
},
|
||||
{
|
||||
puterId: 'openai:openai/gpt-4o-2024-11-20',
|
||||
id: 'gpt-4o-2024-11-20',
|
||||
modalities: { input: ['text', 'image'], output: ['text'] },
|
||||
open_weights: false,
|
||||
tool_call: true,
|
||||
knowledge: '2023-09',
|
||||
release_date: '2024-11-20',
|
||||
aliases: ['openai/gpt-4o-2024-11-20'],
|
||||
costs_currency: 'usd-cents',
|
||||
input_cost_key: 'prompt_tokens',
|
||||
output_cost_key: 'completion_tokens',
|
||||
costs: {
|
||||
tokens: 1_000_000,
|
||||
prompt_tokens: 250,
|
||||
cached_tokens: 125,
|
||||
completion_tokens: 1000,
|
||||
},
|
||||
context: 128_000,
|
||||
max_tokens: 16_384,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -53,6 +53,16 @@ export const ZAI_MODELS: IChatModel[] = [
|
||||
128 * K,
|
||||
usdPerMToken(1.4, 4.4, 0.26),
|
||||
),
|
||||
// List price from https://docs.z.ai/guides/overview/pricing ($0.15 in /
|
||||
// $0.50 out / $0.03 cached per MTok); the page currently shows a 50%
|
||||
// promotional discount, which we deliberately do not encode.
|
||||
textModel(
|
||||
'glm-5.3-flash',
|
||||
'GLM-5.3-Flash',
|
||||
1_000 * K,
|
||||
128 * K,
|
||||
usdPerMToken(0.15, 0.5, 0.03),
|
||||
),
|
||||
textModel(
|
||||
'glm-5.2',
|
||||
'GLM-5.2',
|
||||
|
||||
Reference in New Issue
Block a user