@@ -12,19 +12,21 @@ export type LlmsAlibabaModelId = typeof _knownAlibabaChatModels[number]['idPrefi
1212// - Pricing: https://www.alibabacloud.com/help/en/model-studio/model-pricing (International/Singapore, USD per 1M tokens)
1313// - Per-model pages carry the authoritative caps + cache-hit price, e.g. https://www.alibabacloud.com/help/en/model-studio/qwen3-8-max
1414// - Cache: https://www.alibabacloud.com/help/en/model-studio/context-cache (implicit hit = 20% of input; explicit create 125% / hit 10%; deepseek-v4-pro excepted)
15+ // 2026-08-14 triage: deny list added (retired 2025-era lines dropped from the list entirely) + short-form curation for every
16+ // other live chat id: qwen3.8-2.4t-a95b (open-weights flagship) and qwen3-coder-next visible; the qwen3.5/3.6 generations,
17+ // qwen3-max/-vl-flash/-coder-flash, and glm-5.1 hidden. Zero uncurated ('[?]') ids remain against the live list.
1518// 2026-08-14 pass (DeepSeek only): deepseek-v4-pro-0813 curated + made visible by exception (see below); deepseek-v4-flash-0731
1619// curated but hidden; DeepSeek-V4 output cap 64K -> 128K house cap (both model pages state 393216). Qwen rows re-checked, unchanged.
1720// 2026-08-06 pass: qwen3.7-flash repriced to its real 3-tier rates - the 0.25/1.50 was qwen3.6-flash's, the model is still absent from the
1821// Intl pricing page (tiers on its model page + Alibaba's own OpenRouter endpoint agree); qwen3.7-max output cap 64K -> 128K; DeepSeek-V4
19- // context 1,048,576 -> 1,000,000 (what Alibaba serves); arena ELOs refreshed; qwen3.8-max caps/price re-confirmed on its model page;
20- // still uncurated by policy: qwen3.5-122b-a10b (open 122B MoE, $0.4/$3.2), qwen3.6-27b, qwen3.6-plus, qwen3.5-plus, qwen3.5-flash,
21- // qwen3-vl-flash, qwen3-coder-next/-flash, glm-5.1 (fallback-hidden).
22+ // context 1,048,576 -> 1,000,000 (what Alibaba serves); arena ELOs refreshed; qwen3.8-max caps/price re-confirmed on its model page.
2223// NOTES:
2324// - The live API returns only id/created/owned_by (no pricing/caps/context), so EVERYTHING here is editorial.
2425// - Alibaba uses tiered pricing keyed on the request's INPUT token count (both input and output prices step up).
2526// - Policy: curate the current best-per-tier lineup only; all uncatalogued models, dated snapshots
2627// (-YYYY-MM-DD / -2507), and -preview/-latest aliases are hidden, UNLESS curated verbatim below - an exact
2728// entry is an explicit editorial pick and carries its own `hidden` (see alibabaModelToModelDescription).
29+ // Retired lines are denied outright in alibabaModelFilter (_ALIBABA_DENY_LIST) and never listed.
2830// - Thinking control: thinking-capable models expose a 'Thinking' toggle (Off/On; unset = vendor default, usually on)
2931// via _PS_Thinking, mapped to Qwen's `enable_thinking` in the 'alibaba' dialect (openai.chatCompletions.ts).
3032// Verified live on qwen3.x + DashScope-hosted DeepSeek-V4 / GLM-5.2. Kimi K2.7 Code is always-on (reasoning flag, no toggle).
@@ -58,6 +60,19 @@ const _knownAlibabaChatModels = llmsDefineManualMappings([
5860 chatPrice : { input : 2.00 , output : 6.00 , cache : { cType : 'oai-ac' , read : 0.25 } } , // cache-hit input per the model page (not the 20% rule)
5961 benchmark : { cbaElo : 1497 } , // lmarena: qwen3.8-max
6062 } ,
63+ {
64+ // Open-weights release of the Qwen3.8 flagship (live 2026-08-13). Not on the Intl price page yet:
65+ // price/caps from Alibaba's own OpenRouter endpoint ($2/$6, cache-hit 0.25, 1M in / 128K out, text-only).
66+ idPrefix : 'qwen3.8-2.4t-a95b' ,
67+ label : 'Qwen3.8 2.4T-A95B' ,
68+ parameterSpecs : _PS_Thinking ,
69+ pubDate : '20260812' ,
70+ description : 'Open-weights release of the Qwen3.8 flagship: 2.4T sparse MoE, ~95B active. Text-only serving with 1M context and thinking.' ,
71+ contextWindow : 1000000 , // 1M
72+ interfaces : [ LLM_IF_OAI_Chat , LLM_IF_OAI_Fn , LLM_IF_OAI_Reasoning ] ,
73+ maxCompletionTokens : 131072 , // 128K
74+ chatPrice : { input : 2.00 , output : 6.00 , cache : { cType : 'oai-ac' , read : 0.25 } } ,
75+ } ,
6176 {
6277 idPrefix : 'qwen3.7-max' ,
6378 label : 'Qwen3.7 Max' ,
@@ -127,6 +142,19 @@ const _knownAlibabaChatModels = llmsDefineManualMappings([
127142 output : [ { upTo : 32000 , price : 5.00 } , { upTo : 128000 , price : 9.00 } , { upTo : 256000 , price : 15.00 } , { upTo : null , price : 60.00 } ] ,
128143 } ,
129144 } ,
145+ {
146+ idPrefix : 'qwen3-coder-next' ,
147+ label : 'Qwen3 Coder Next' ,
148+ pubDate : '20260204' ,
149+ description : 'Budget agentic coder on the Qwen3-Next architecture. 256K context, non-thinking, tiered pricing.' ,
150+ contextWindow : 262144 , // 256K
151+ interfaces : [ LLM_IF_OAI_Chat , LLM_IF_OAI_Fn ] ,
152+ maxCompletionTokens : 65536 ,
153+ chatPrice : {
154+ input : [ { upTo : 32000 , price : 0.30 } , { upTo : 128000 , price : 0.50 } , { upTo : null , price : 0.80 } ] ,
155+ output : [ { upTo : 32000 , price : 1.50 } , { upTo : 128000 , price : 2.50 } , { upTo : null , price : 4.00 } ] ,
156+ } ,
157+ } ,
130158 {
131159 idPrefix : 'qwen3-vl-plus' ,
132160 label : 'Qwen3 VL Plus' ,
@@ -142,6 +170,112 @@ const _knownAlibabaChatModels = llmsDefineManualMappings([
142170 } ,
143171 } ,
144172
173+ // --- Superseded generations, short-form curation (2026-08-14 triage; all hidden) ---
174+ // Prices = Intl/Singapore list; contexts/output caps from OpenRouter's Alibaba endpoints (out = 64K unless noted).
175+ {
176+ idPrefix : 'qwen3.6-plus' , label : 'Qwen3.6 Plus' , pubDate : '20260402' , hidden : true ,
177+ description : 'Previous Plus tier, superseded by Qwen3.7 Plus. 1M context, thinking, vision.' ,
178+ parameterSpecs : _PS_Thinking ,
179+ contextWindow : 1000000 , maxCompletionTokens : 65536 ,
180+ interfaces : [ LLM_IF_OAI_Chat , LLM_IF_OAI_Fn , LLM_IF_OAI_Vision , LLM_IF_OAI_Reasoning ] ,
181+ chatPrice : { input : [ { upTo : 256000 , price : 0.50 } , { upTo : null , price : 2.00 } ] , output : [ { upTo : 256000 , price : 3.00 } , { upTo : null , price : 6.00 } ] } ,
182+ } ,
183+ {
184+ idPrefix : 'qwen3.6-max-preview' , label : 'Qwen3.6 Max Preview' , pubDate : '20260427' , hidden : true ,
185+ description : 'Qwen3.6 Max preview (never GA; superseded by Qwen3.7 Max). 256K context, thinking, text-only.' ,
186+ parameterSpecs : _PS_Thinking ,
187+ contextWindow : 262144 , maxCompletionTokens : 65536 ,
188+ interfaces : [ LLM_IF_OAI_Chat , LLM_IF_OAI_Fn , LLM_IF_OAI_Reasoning ] ,
189+ chatPrice : { input : [ { upTo : 128000 , price : 1.30 } , { upTo : null , price : 2.00 } ] , output : [ { upTo : 128000 , price : 7.80 } , { upTo : null , price : 12.00 } ] } ,
190+ } ,
191+ {
192+ idPrefix : 'qwen3.6-35b-a3b' , label : 'Qwen3.6 35B-A3B' , pubDate : '20260427' , hidden : true ,
193+ description : 'Open 35B-A3B MoE multimodal with thinking. 256K context.' ,
194+ parameterSpecs : _PS_Thinking ,
195+ contextWindow : 262144 , maxCompletionTokens : 65536 ,
196+ interfaces : [ LLM_IF_OAI_Chat , LLM_IF_OAI_Fn , LLM_IF_OAI_Vision , LLM_IF_OAI_Reasoning ] ,
197+ chatPrice : { input : 0.375 , output : 2.25 } ,
198+ } ,
199+ {
200+ idPrefix : 'qwen3.6-27b' , label : 'Qwen3.6 27B' , pubDate : '20260427' , hidden : true ,
201+ description : 'Open 27B dense multimodal with thinking. 256K context.' ,
202+ parameterSpecs : _PS_Thinking ,
203+ contextWindow : 262144 , maxCompletionTokens : 65536 ,
204+ interfaces : [ LLM_IF_OAI_Chat , LLM_IF_OAI_Fn , LLM_IF_OAI_Vision , LLM_IF_OAI_Reasoning ] ,
205+ chatPrice : { input : 0.60 , output : 3.60 } ,
206+ } ,
207+ {
208+ idPrefix : 'qwen3.5-plus' , label : 'Qwen3.5 Plus' , pubDate : '20260215' , hidden : true ,
209+ description : 'Former Plus tier, superseded by Qwen3.6/3.7 Plus. 1M context, thinking, vision.' ,
210+ parameterSpecs : _PS_Thinking ,
211+ contextWindow : 1000000 , maxCompletionTokens : 65536 ,
212+ interfaces : [ LLM_IF_OAI_Chat , LLM_IF_OAI_Fn , LLM_IF_OAI_Vision , LLM_IF_OAI_Reasoning ] ,
213+ chatPrice : { input : [ { upTo : 256000 , price : 0.40 } , { upTo : null , price : 0.50 } ] , output : [ { upTo : 256000 , price : 2.40 } , { upTo : null , price : 3.00 } ] } ,
214+ } ,
215+ {
216+ idPrefix : 'qwen3.5-flash' , label : 'Qwen3.5 Flash' , pubDate : '20260223' , hidden : true ,
217+ description : 'Former Flash tier, superseded by Qwen3.6/3.7 Flash. 1M context, thinking, vision.' ,
218+ parameterSpecs : _PS_Thinking ,
219+ contextWindow : 1000000 , maxCompletionTokens : 65536 ,
220+ interfaces : [ LLM_IF_OAI_Chat , LLM_IF_OAI_Fn , LLM_IF_OAI_Vision , LLM_IF_OAI_Reasoning ] ,
221+ chatPrice : { input : 0.10 , output : 0.40 , cache : { cType : 'oai-ac' , read : 0.02 } } , // 20% implicit-hit rule
222+ } ,
223+ {
224+ idPrefix : 'qwen3.5-397b-a17b' , label : 'Qwen3.5 397B-A17B' , pubDate : '20260216' , hidden : true ,
225+ description : 'Open 397B-A17B MoE multimodal with thinking. 256K context.' ,
226+ parameterSpecs : _PS_Thinking ,
227+ contextWindow : 262144 , maxCompletionTokens : 65536 ,
228+ interfaces : [ LLM_IF_OAI_Chat , LLM_IF_OAI_Fn , LLM_IF_OAI_Vision , LLM_IF_OAI_Reasoning ] ,
229+ chatPrice : { input : 0.60 , output : 3.60 } ,
230+ } ,
231+ {
232+ idPrefix : 'qwen3.5-122b-a10b' , label : 'Qwen3.5 122B-A10B' , pubDate : '20260225' , hidden : true ,
233+ description : 'Open 122B-A10B MoE multimodal with thinking. 256K context.' ,
234+ parameterSpecs : _PS_Thinking ,
235+ contextWindow : 262144 , maxCompletionTokens : 65536 ,
236+ interfaces : [ LLM_IF_OAI_Chat , LLM_IF_OAI_Fn , LLM_IF_OAI_Vision , LLM_IF_OAI_Reasoning ] ,
237+ chatPrice : { input : 0.40 , output : 3.20 } ,
238+ } ,
239+ {
240+ idPrefix : 'qwen3.5-35b-a3b' , label : 'Qwen3.5 35B-A3B' , pubDate : '20260225' , hidden : true ,
241+ description : 'Open 35B-A3B MoE multimodal with thinking. 256K context.' ,
242+ parameterSpecs : _PS_Thinking ,
243+ contextWindow : 262144 , maxCompletionTokens : 65536 ,
244+ interfaces : [ LLM_IF_OAI_Chat , LLM_IF_OAI_Fn , LLM_IF_OAI_Vision , LLM_IF_OAI_Reasoning ] ,
245+ chatPrice : { input : 0.25 , output : 2.00 } ,
246+ } ,
247+ {
248+ idPrefix : 'qwen3.5-27b' , label : 'Qwen3.5 27B' , pubDate : '20260225' , hidden : true ,
249+ description : 'Open 27B dense multimodal with thinking. 256K context.' ,
250+ parameterSpecs : _PS_Thinking ,
251+ contextWindow : 262144 , maxCompletionTokens : 65536 ,
252+ interfaces : [ LLM_IF_OAI_Chat , LLM_IF_OAI_Fn , LLM_IF_OAI_Vision , LLM_IF_OAI_Reasoning ] ,
253+ chatPrice : { input : 0.30 , output : 2.40 } ,
254+ } ,
255+ {
256+ idPrefix : 'qwen3-max' , label : 'Qwen3 Max' , pubDate : '20250923' , hidden : true ,
257+ description : 'Retired 2025 flagship, superseded by Qwen3.6+ Max. 256K context; the base id now serves the thinking-capable 2026-01-23 snapshot.' ,
258+ parameterSpecs : _PS_Thinking ,
259+ contextWindow : 262144 , maxCompletionTokens : 65536 ,
260+ interfaces : [ LLM_IF_OAI_Chat , LLM_IF_OAI_Fn , LLM_IF_OAI_Reasoning ] ,
261+ chatPrice : { input : [ { upTo : 32000 , price : 1.20 } , { upTo : 128000 , price : 2.40 } , { upTo : null , price : 3.00 } ] , output : [ { upTo : 32000 , price : 6.00 } , { upTo : 128000 , price : 12.00 } , { upTo : null , price : 15.00 } ] } ,
262+ } ,
263+ {
264+ idPrefix : 'qwen3-vl-flash' , label : 'Qwen3 VL Flash' , pubDate : '20251015' , hidden : true ,
265+ description : 'Budget VL tier below Qwen3 VL Plus. 256K context, thinking, vision.' ,
266+ parameterSpecs : _PS_Thinking ,
267+ contextWindow : 262144 , maxCompletionTokens : 32768 , // out assumed = qwen3-vl-plus
268+ interfaces : [ LLM_IF_OAI_Chat , LLM_IF_OAI_Fn , LLM_IF_OAI_Vision , LLM_IF_OAI_Reasoning ] ,
269+ chatPrice : { input : [ { upTo : 32000 , price : 0.05 } , { upTo : 128000 , price : 0.075 } , { upTo : null , price : 0.12 } ] , output : [ { upTo : 32000 , price : 0.40 } , { upTo : 128000 , price : 0.60 } , { upTo : null , price : 0.96 } ] } ,
270+ } ,
271+ {
272+ idPrefix : 'qwen3-coder-flash' , label : 'Qwen3 Coder Flash' , pubDate : '20250728' , hidden : true ,
273+ description : 'Former budget coder, superseded by Qwen3 Coder Next (which lacks its 1M context). Non-thinking.' ,
274+ contextWindow : 1000000 , maxCompletionTokens : 65536 ,
275+ interfaces : [ LLM_IF_OAI_Chat , LLM_IF_OAI_Fn ] ,
276+ chatPrice : { input : [ { upTo : 32000 , price : 0.30 } , { upTo : 128000 , price : 0.50 } , { upTo : 256000 , price : 0.80 } , { upTo : null , price : 1.60 } ] , output : [ { upTo : 32000 , price : 1.50 } , { upTo : 128000 , price : 2.50 } , { upTo : 256000 , price : 4.00 } , { upTo : null , price : 9.60 } ] } ,
277+ } ,
278+
145279 // --- Qwen stable commercial aliases (legacy naming; auto-point to the latest snapshot) ---
146280 // Hidden by default: superseded by the qwen3.x line above and no longer on Alibaba's "recommended" list. Still selectable from the admin list.
147281 {
@@ -277,6 +411,14 @@ const _knownAlibabaChatModels = llmsDefineManualMappings([
277411 chatPrice : { input : 2.80 , output : 8.80 , cache : { cType : 'oai-ac' , read : 0.70 } } , // cache = the 25% GLM implicit-hit rate (no model page of its own)
278412 hidden : true , // preview-only for now (live id: glm-5.2-fast-preview); un-hide when GA
279413 } ,
414+ {
415+ idPrefix : 'glm-5.1' , label : 'GLM-5.1 (Alibaba)' , pubDate : '20260407' , hidden : true ,
416+ description : 'Zhipu GLM-5.1 served via Alibaba Model Studio, superseded by GLM-5.2. 200K context, thinking.' ,
417+ parameterSpecs : _PS_Thinking ,
418+ contextWindow : 204800 , maxCompletionTokens : 131072 , // 200K in / 128K out
419+ interfaces : [ LLM_IF_OAI_Chat , LLM_IF_OAI_Fn , LLM_IF_OAI_Reasoning ] ,
420+ chatPrice : { input : 1.40 , output : 4.40 } ,
421+ } ,
280422 {
281423 idPrefix : 'kimi-k2.7-code' ,
282424 label : 'Kimi K2.7 Code (Alibaba)' ,
@@ -308,7 +450,22 @@ const _knownAlibabaChatModels = llmsDefineManualMappings([
308450const _ALIBABA_DATED_SNAPSHOT = / (?: - \d { 4 } - \d { 2 } - \d { 2 } | - \d { 4 } ) $ / ;
309451const _ALIBABA_PREVIEW_ALIAS = / - (?: p r e v i e w | l a t e s t ) $ / ;
310452
453+ // Editorial deny list: retired 2025-era chat lines dropped from the list entirely (matched by exact id or 'id-' prefix)
454+ const _ALIBABA_DENY_LIST = [
455+ 'qwq-plus' , 'qvq-max' , // QwQ/QVQ reasoning-era lines
456+ 'qwen-coder-plus' , // pre-qwen3 commercial coder (no Intl price row left)
457+ 'qwen-vl-max' , 'qwen-vl-plus' , // qwen2.5-era VL line (qwen3-vl-* replaces)
458+ 'qwen3-8b' , 'qwen3-14b' , 'qwen3-32b' , // 2025 open dense models
459+ 'qwen3-30b-a3b' , 'qwen3-235b-a22b' , // 2025 open MoE (+ their -instruct/-thinking-2507 snapshots)
460+ 'qwen3-coder-480b-a35b-instruct' , // 2025 open coder (qwen3-coder-next replaces)
461+ 'qwen3-next-80b-a3b' , // 2025 Next-arch preview pair
462+ 'qwen3-vl-235b-a22b' , // 2025 open VL pair
463+ ] ;
464+
311465export function alibabaModelFilter ( modelId : string ) : boolean {
466+ // drop denied ids outright
467+ if ( _ALIBABA_DENY_LIST . some ( deny => modelId === deny || modelId . startsWith ( deny + '-' ) ) )
468+ return false ;
312469 // Keep only chat/text-generation models; exclude image/audio/video/translation/embedding/agent services.
313470 const excludePatterns = [
314471 'text-embedding' , // embeddings
0 commit comments