Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/sync-models.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tanstack/ai-openrouter': patch
---

Update model metadata from OpenRouter API
80 changes: 13 additions & 67 deletions packages/typescript/ai-openrouter/src/model-meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -410,41 +410,6 @@ const ALFREDPROS_CODELLAMA_7B_INSTRUCT_SOLIDITY = {
image: 0,
},
} as const
const ALIBABA_TONGYI_DEEPRESEARCH_30B_A3B = {
id: 'alibaba/tongyi-deepresearch-30b-a3b',
name: 'Tongyi DeepResearch 30B A3B',
supports: {
input: ['text'],
output: ['text'],
supports: [
'frequencyPenalty',
'logitBias',
'maxCompletionTokens',
'presencePenalty',
'reasoning',
'responseFormat',
'seed',
'stop',
'temperature',
'toolChoice',
'topP',
],
},
context_window: 131072,
max_output_tokens: 131072,
pricing: {
text: {
input: {
normal: 0.09,
cached: 0.09,
},
output: {
normal: 0.45,
},
},
image: 0,
},
} as const
const ALLENAI_OLMO_3_32B_THINK = {
id: 'allenai/olmo-3-32b-think',
name: 'AllenAI: Olmo 3 32B Think',
Expand Down Expand Up @@ -2222,14 +2187,15 @@ const DEEPSEEK_DEEPSEEK_V4_FLASH = {
],
},
context_window: 1048576,
max_output_tokens: 16384,
pricing: {
text: {
input: {
normal: 0.112,
cached: 0.022,
normal: 0.1,
cached: 0.02,
},
output: {
normal: 0.224,
normal: 0.2,
},
},
image: 0,
Expand Down Expand Up @@ -9804,12 +9770,12 @@ const QWEN_QWEN3_6_35B_A3B = {
],
},
context_window: 262144,
max_output_tokens: 262144,
max_output_tokens: 262140,
pricing: {
text: {
input: {
normal: 0.15,
cached: 0.05,
cached: 0,
},
output: {
normal: 1,
Expand Down Expand Up @@ -9840,11 +9806,11 @@ const QWEN_QWEN3_6_FLASH = {
pricing: {
text: {
input: {
normal: 0.12375,
cached: 0.1545,
normal: 0.1875,
cached: 0.234375,
},
output: {
normal: 0.7425,
normal: 1.125,
},
},
image: 0,
Expand Down Expand Up @@ -9906,11 +9872,11 @@ const QWEN_QWEN3_6_PLUS = {
pricing: {
text: {
input: {
normal: 0.1794,
cached: 0.2236,
normal: 0.325,
cached: 0.40625,
},
output: {
normal: 1.07315,
normal: 1.95,
},
},
image: 0,
Expand Down Expand Up @@ -11442,21 +11408,6 @@ export type OpenRouterModelOptionsByName = {
| 'temperature'
| 'topP'
>
[ALIBABA_TONGYI_DEEPRESEARCH_30B_A3B.id]: OpenRouterCommonOptions &
Pick<
OpenRouterBaseOptions,
| 'frequencyPenalty'
| 'logitBias'
| 'maxCompletionTokens'
| 'presencePenalty'
| 'reasoning'
| 'responseFormat'
| 'seed'
| 'stop'
| 'temperature'
| 'toolChoice'
| 'topP'
>
[ALLENAI_OLMO_3_32B_THINK.id]: OpenRouterCommonOptions &
Pick<
OpenRouterBaseOptions,
Expand Down Expand Up @@ -15625,7 +15576,6 @@ export type OpenRouterModelInputModalitiesByName = {
[AION_LABS_AION_2_0.id]: ReadonlyArray<'text'>
[AION_LABS_AION_RP_LLAMA_3_1_8B.id]: ReadonlyArray<'text'>
[ALFREDPROS_CODELLAMA_7B_INSTRUCT_SOLIDITY.id]: ReadonlyArray<'text'>
[ALIBABA_TONGYI_DEEPRESEARCH_30B_A3B.id]: ReadonlyArray<'text'>
[ALLENAI_OLMO_3_32B_THINK.id]: ReadonlyArray<'text'>
[AMAZON_NOVA_2_LITE_V1.id]: ReadonlyArray<
'text' | 'image' | 'video' | 'document'
Expand Down Expand Up @@ -16037,7 +15987,6 @@ export const OPENROUTER_CHAT_MODELS = [
AION_LABS_AION_2_0.id,
AION_LABS_AION_RP_LLAMA_3_1_8B.id,
ALFREDPROS_CODELLAMA_7B_INSTRUCT_SOLIDITY.id,
ALIBABA_TONGYI_DEEPRESEARCH_30B_A3B.id,
ALLENAI_OLMO_3_32B_THINK.id,
AMAZON_NOVA_2_LITE_V1.id,
AMAZON_NOVA_LITE_V1.id,
Expand Down Expand Up @@ -16379,10 +16328,7 @@ export const OPENROUTER_CHAT_MODELS = [
] as const

export type OpenRouterChatModelToolCapabilitiesByName = {
[K in (typeof OPENROUTER_CHAT_MODELS)[number]]: readonly [
'web_search',
'web_fetch',
]
[K in (typeof OPENROUTER_CHAT_MODELS)[number]]: readonly ['web_search']
}

export const OPENROUTER_IMAGE_MODELS = [
Expand Down
2 changes: 1 addition & 1 deletion scripts/.sync-models-last-run
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1779439521
1779702179
86 changes: 14 additions & 72 deletions scripts/openrouter.models.json
Original file line number Diff line number Diff line change
Expand Up @@ -701,63 +701,6 @@
"details": "/api/v1/models/alfredpros/codellama-7b-instruct-solidity/endpoints"
}
},
{
"id": "alibaba/tongyi-deepresearch-30b-a3b",
"canonical_slug": "alibaba/tongyi-deepresearch-30b-a3b",
"hugging_face_id": "Alibaba-NLP/Tongyi-DeepResearch-30B-A3B",
"name": "Tongyi DeepResearch 30B A3B",
"created": 1758210804,
"description": "Tongyi DeepResearch is an agentic large language model developed by Tongyi Lab, with 30 billion total parameters activating only 3 billion per token. It's optimized for long-horizon, deep information-seeking tasks...",
"context_length": 131072,
"architecture": {
"modality": "text->text",
"input_modalities": ["text"],
"output_modalities": ["text"],
"tokenizer": "Other",
"instruct_type": null
},
"pricing": {
"prompt": "0.00000009",
"completion": "0.00000045",
"input_cache_read": "0.00000009"
},
"top_provider": {
"context_length": 131072,
"max_completion_tokens": 131072,
"is_moderated": false
},
"per_request_limits": null,
"supported_parameters": [
"frequency_penalty",
"include_reasoning",
"logit_bias",
"max_tokens",
"min_p",
"presence_penalty",
"reasoning",
"repetition_penalty",
"response_format",
"seed",
"stop",
"structured_outputs",
"temperature",
"tool_choice",
"tools",
"top_k",
"top_p"
],
"default_parameters": {
"temperature": null,
"top_p": null,
"frequency_penalty": null
},
"supported_voices": null,
"knowledge_cutoff": "2025-03-31",
"expiration_date": null,
"links": {
"details": "/api/v1/models/alibaba/tongyi-deepresearch-30b-a3b/endpoints"
}
},
{
"id": "allenai/olmo-3-32b-think",
"canonical_slug": "allenai/olmo-3-32b-think-20251121",
Expand Down Expand Up @@ -3596,13 +3539,13 @@
"instruct_type": null
},
"pricing": {
"prompt": "0.000000112",
"completion": "0.000000224",
"input_cache_read": "0.000000022"
"prompt": "0.0000001",
"completion": "0.0000002",
"input_cache_read": "0.00000002"
},
"top_provider": {
"context_length": 1048575,
"max_completion_tokens": null,
"context_length": 1048576,
"max_completion_tokens": 16384,
"is_moderated": false
},
"per_request_limits": null,
Expand Down Expand Up @@ -15631,12 +15574,11 @@
},
"pricing": {
"prompt": "0.00000015",
"completion": "0.000001",
"input_cache_read": "0.00000005"
"completion": "0.000001"
},
"top_provider": {
"context_length": 262144,
"max_completion_tokens": 262144,
"context_length": 262140,
"max_completion_tokens": 262140,
"is_moderated": false
},
"per_request_limits": null,
Expand Down Expand Up @@ -15689,9 +15631,9 @@
"instruct_type": null
},
"pricing": {
"prompt": "0.00000012375",
"completion": "0.0000007425",
"input_cache_write": "0.0000001545"
"prompt": "0.0000001875",
"completion": "0.000001125",
"input_cache_write": "0.000000234375"
},
"top_provider": {
"context_length": 1000000,
Expand Down Expand Up @@ -15785,9 +15727,9 @@
"instruct_type": null
},
"pricing": {
"prompt": "0.0000001794",
"completion": "0.00000107315",
"input_cache_write": "0.0000002236"
"prompt": "0.000000325",
"completion": "0.00000195",
"input_cache_write": "0.00000040625"
},
"top_provider": {
"context_length": 1000000,
Expand Down