Skip to content

Commit 8e12bdb

Browse files
WEN-JY执无
andauthored
Add support for qwen vl models (RooCodeInc#1776)
* feat: add support for qwen vl models * feat: add support for qwen vl models * feat: updated the price of the Qianwen model following the BaiLian platform documentation --------- Co-authored-by: 执无 <[email protected]>
1 parent 283d7d6 commit 8e12bdb

File tree

2 files changed

+77
-32
lines changed

2 files changed

+77
-32
lines changed

.changeset/five-flies-breathe.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"claude-dev": patch
3+
---
4+
5+
Add support for qwen vl models

src/shared/api.ts

Lines changed: 72 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -456,80 +456,80 @@ export const qwenModels = {
456456
contextWindow: 131_072,
457457
supportsImages: false,
458458
supportsPromptCache: false,
459-
inputPrice: 0.0035,
460-
outputPrice: 0.007,
461-
cacheWritesPrice: 0.0035,
462-
cacheReadsPrice: 0.007,
459+
inputPrice: 3.5,
460+
outputPrice: 7,
461+
cacheWritesPrice: 3.5,
462+
cacheReadsPrice: 7,
463463
},
464464
"qwen-plus-latest": {
465465
maxTokens: 129_024,
466466
contextWindow: 131_072,
467467
supportsImages: false,
468468
supportsPromptCache: false,
469-
inputPrice: 0.0008,
470-
outputPrice: 0.002,
471-
cacheWritesPrice: 0.0004,
472-
cacheReadsPrice: 0.001,
469+
inputPrice: 0.8,
470+
outputPrice: 2,
471+
cacheWritesPrice: 0.8,
472+
cacheReadsPrice: 0.2,
473473
},
474474
"qwen-turbo-latest": {
475475
maxTokens: 1_000_000,
476476
contextWindow: 1_000_000,
477477
supportsImages: false,
478478
supportsPromptCache: false,
479-
inputPrice: 0.0003,
480-
outputPrice: 0.0006,
481-
cacheWritesPrice: 0.00015,
482-
cacheReadsPrice: 0.0003,
479+
inputPrice: 0.8,
480+
outputPrice: 2,
481+
cacheWritesPrice: 0.8,
482+
cacheReadsPrice: 2,
483483
},
484484
"qwen-max-latest": {
485485
maxTokens: 30_720,
486486
contextWindow: 32_768,
487487
supportsImages: false,
488488
supportsPromptCache: false,
489-
inputPrice: 0.0112,
490-
outputPrice: 0.0448,
491-
cacheWritesPrice: 0.0056,
492-
cacheReadsPrice: 0.0224,
489+
inputPrice: 2.4,
490+
outputPrice: 9.6,
491+
cacheWritesPrice: 2.4,
492+
cacheReadsPrice: 9.6,
493493
},
494494
"qwen-coder-plus": {
495495
maxTokens: 129_024,
496496
contextWindow: 131_072,
497497
supportsImages: false,
498498
supportsPromptCache: false,
499-
inputPrice: 0.0035,
500-
outputPrice: 0.007,
501-
cacheWritesPrice: 0.0035,
502-
cacheReadsPrice: 0.007,
499+
inputPrice: 3.5,
500+
outputPrice: 7,
501+
cacheWritesPrice: 3.5,
502+
cacheReadsPrice: 7,
503503
},
504504
"qwen-plus": {
505505
maxTokens: 129_024,
506506
contextWindow: 131_072,
507507
supportsImages: false,
508508
supportsPromptCache: false,
509-
inputPrice: 0.0008,
510-
outputPrice: 0.002,
511-
cacheWritesPrice: 0.0004,
512-
cacheReadsPrice: 0.001,
509+
inputPrice: 0.8,
510+
outputPrice: 2,
511+
cacheWritesPrice: 0.8,
512+
cacheReadsPrice: 0.2,
513513
},
514514
"qwen-turbo": {
515515
maxTokens: 1_000_000,
516516
contextWindow: 1_000_000,
517517
supportsImages: false,
518518
supportsPromptCache: false,
519-
inputPrice: 0.0003,
520-
outputPrice: 0.0006,
521-
cacheWritesPrice: 0.00015,
522-
cacheReadsPrice: 0.0003,
519+
inputPrice: 0.3,
520+
outputPrice: 0.6,
521+
cacheWritesPrice: 0.3,
522+
cacheReadsPrice: 0.6,
523523
},
524524
"qwen-max": {
525525
maxTokens: 30_720,
526526
contextWindow: 32_768,
527527
supportsImages: false,
528528
supportsPromptCache: false,
529-
inputPrice: 0.0112,
530-
outputPrice: 0.0448,
531-
cacheWritesPrice: 0.0056,
532-
cacheReadsPrice: 0.0224,
529+
inputPrice: 2.4,
530+
outputPrice: 9.6,
531+
cacheWritesPrice: 2.4,
532+
cacheReadsPrice: 9.6,
533533
},
534534
"deepseek-v3": {
535535
maxTokens: 8_000,
@@ -551,6 +551,46 @@ export const qwenModels = {
551551
cacheWritesPrice: 0.55,
552552
cacheReadsPrice: 0.14,
553553
},
554+
"qwen-vl-max": {
555+
maxTokens: 30_720,
556+
contextWindow: 32_768,
557+
supportsImages: true,
558+
supportsPromptCache: false,
559+
inputPrice: 3,
560+
outputPrice: 9,
561+
cacheWritesPrice: 3,
562+
cacheReadsPrice: 9,
563+
},
564+
"qwen-vl-max-latest": {
565+
maxTokens: 129_024,
566+
contextWindow: 131_072,
567+
supportsImages: true,
568+
supportsPromptCache: false,
569+
inputPrice: 3,
570+
outputPrice: 9,
571+
cacheWritesPrice: 3,
572+
cacheReadsPrice: 9,
573+
},
574+
"qwen-vl-plus": {
575+
maxTokens: 6_000,
576+
contextWindow: 8_000,
577+
supportsImages: true,
578+
supportsPromptCache: false,
579+
inputPrice: 1.5,
580+
outputPrice: 4.5,
581+
cacheWritesPrice: 1.5,
582+
cacheReadsPrice: 4.5,
583+
},
584+
"qwen-vl-plus-latest": {
585+
maxTokens: 129_024,
586+
contextWindow: 131_072,
587+
supportsImages: true,
588+
supportsPromptCache: false,
589+
inputPrice: 1.5,
590+
outputPrice: 4.5,
591+
cacheWritesPrice: 1.5,
592+
cacheReadsPrice: 4.5,
593+
},
554594
} as const satisfies Record<string, ModelInfo>
555595

556596
// Mistral

0 commit comments

Comments
 (0)