@tanstack/ai-vercel-gateway 0.2.18 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/adapters/responses-text.d.ts +2 -2
- package/dist/esm/adapters/responses-text.js +1 -1
- package/dist/esm/adapters/responses-text.js.map +1 -1
- package/dist/esm/adapters/text.d.ts +2 -2
- package/dist/esm/adapters/text.js +1 -1
- package/dist/esm/adapters/text.js.map +1 -1
- package/dist/esm/model-meta.d.ts +23 -5
- package/dist/esm/model-meta.js +12 -1
- package/dist/esm/model-meta.js.map +1 -1
- package/package.json +4 -3
- package/src/adapters/responses-text.ts +4 -1
- package/src/adapters/text.ts +4 -1
- package/src/model-meta.ts +112 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/ai-vercel-gateway",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Vercel AI Gateway adapter for TanStack AI chat, embeddings, and image generation.",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -56,12 +56,12 @@
|
|
|
56
56
|
"vite": "^8.2.1"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@tanstack/ai": "^0.
|
|
59
|
+
"@tanstack/ai": "^0.63.0"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"openai": "^6.41.0",
|
|
63
63
|
"@tanstack/ai-utils": "^0.4.1",
|
|
64
|
-
"@tanstack/openai-base": "^0.
|
|
64
|
+
"@tanstack/openai-base": "^0.12.1"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
67
|
"build": "vite build",
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
"lint:fix": "oxlint src --type-aware --fix",
|
|
70
70
|
"test:build": "publint --strict",
|
|
71
71
|
"test:oxlint": "oxlint src --type-aware",
|
|
72
|
+
"test:coverage": "vitest run --coverage --coverage.include='src/**' --coverage.reporter=text-summary --coverage.reporter=json-summary",
|
|
72
73
|
"test:lib": "vitest run",
|
|
73
74
|
"test:lib:dev": "pnpm test:lib --watch",
|
|
74
75
|
"test:types": "tsc"
|
|
@@ -16,8 +16,10 @@ import type {
|
|
|
16
16
|
import type { VercelGatewayMessageMetadataByModality } from '../message-types'
|
|
17
17
|
import type { ExternalResponsesProviderOptions } from '../text/responses-provider-options'
|
|
18
18
|
import type { VercelGatewayClientConfig } from '../utils/client'
|
|
19
|
+
import type { OpenAIBaseTextAdapterOptions } from '@tanstack/openai-base'
|
|
19
20
|
|
|
20
|
-
export interface VercelGatewayResponsesTextConfig
|
|
21
|
+
export interface VercelGatewayResponsesTextConfig
|
|
22
|
+
extends VercelGatewayClientConfig, OpenAIBaseTextAdapterOptions {}
|
|
21
23
|
|
|
22
24
|
export type VercelGatewayResponsesTextProviderOptions =
|
|
23
25
|
ExternalResponsesProviderOptions
|
|
@@ -55,6 +57,7 @@ export class VercelGatewayResponsesTextAdapter<
|
|
|
55
57
|
model,
|
|
56
58
|
'vercel-gateway',
|
|
57
59
|
new OpenAI(withVercelGatewayDefaults(config)),
|
|
60
|
+
config,
|
|
58
61
|
)
|
|
59
62
|
}
|
|
60
63
|
|
package/src/adapters/text.ts
CHANGED
|
@@ -11,13 +11,15 @@ import type {
|
|
|
11
11
|
} from '../model-meta'
|
|
12
12
|
import type { VercelGatewayMessageMetadataByModality } from '../message-types'
|
|
13
13
|
import type { VercelGatewayClientConfig } from '../utils/client'
|
|
14
|
+
import type { OpenAIBaseTextAdapterOptions } from '@tanstack/openai-base'
|
|
14
15
|
|
|
15
16
|
type ResolveToolCapabilities<TModel extends string> =
|
|
16
17
|
TModel extends keyof VercelGatewayChatModelToolCapabilitiesByName
|
|
17
18
|
? NonNullable<VercelGatewayChatModelToolCapabilitiesByName[TModel]>
|
|
18
19
|
: readonly []
|
|
19
20
|
|
|
20
|
-
export interface VercelGatewayTextConfig
|
|
21
|
+
export interface VercelGatewayTextConfig
|
|
22
|
+
extends VercelGatewayClientConfig, OpenAIBaseTextAdapterOptions {}
|
|
21
23
|
|
|
22
24
|
export type { ExternalTextProviderOptions as VercelGatewayTextProviderOptions } from '../text/text-provider-options'
|
|
23
25
|
|
|
@@ -49,6 +51,7 @@ export class VercelGatewayTextAdapter<
|
|
|
49
51
|
model,
|
|
50
52
|
'vercel-gateway',
|
|
51
53
|
new OpenAI(withVercelGatewayDefaults(config)),
|
|
54
|
+
config,
|
|
52
55
|
)
|
|
53
56
|
}
|
|
54
57
|
|
package/src/model-meta.ts
CHANGED
|
@@ -44,6 +44,7 @@ export const VERCEL_GATEWAY_CHAT_MODELS = [
|
|
|
44
44
|
'alibaba/qwen3.8-flash',
|
|
45
45
|
'alibaba/qwen3.8-max',
|
|
46
46
|
'alibaba/qwen3.8-max-0902',
|
|
47
|
+
'alibaba/qwen3.8-max-prime',
|
|
47
48
|
'alibaba/qwen3.8-omni-flash',
|
|
48
49
|
'amazon/nova-2-lite',
|
|
49
50
|
'amazon/nova-lite',
|
|
@@ -61,6 +62,8 @@ export const VERCEL_GATEWAY_CHAT_MODELS = [
|
|
|
61
62
|
'anthropic/claude-opus-4.8-fast',
|
|
62
63
|
'anthropic/claude-opus-5',
|
|
63
64
|
'anthropic/claude-opus-5-fast',
|
|
65
|
+
'anthropic/claude-opus-5.5',
|
|
66
|
+
'anthropic/claude-opus-5.5-fast',
|
|
64
67
|
'anthropic/claude-sonnet-4',
|
|
65
68
|
'anthropic/claude-sonnet-4.5',
|
|
66
69
|
'anthropic/claude-sonnet-4.6',
|
|
@@ -81,6 +84,7 @@ export const VERCEL_GATEWAY_CHAT_MODELS = [
|
|
|
81
84
|
'deepseek/deepseek-v4-pro',
|
|
82
85
|
'deepseek/deepseek-v4-pro-0813',
|
|
83
86
|
'deepseek/deepseek-v4.1-flash',
|
|
87
|
+
'fireworks/ember-1',
|
|
84
88
|
'fish-audio/s1',
|
|
85
89
|
'fish-audio/s2-pro',
|
|
86
90
|
'fish-audio/s2.1-pro',
|
|
@@ -103,6 +107,8 @@ export const VERCEL_GATEWAY_CHAT_MODELS = [
|
|
|
103
107
|
'google/gemini-3.6-flash',
|
|
104
108
|
'google/gemini-3.7-flash',
|
|
105
109
|
'google/gemini-3.8-flash',
|
|
110
|
+
'google/gemini-3.8-flash-lite-tts',
|
|
111
|
+
'google/gemini-3.8-flash-tts',
|
|
106
112
|
'google/gemini-3.8-live',
|
|
107
113
|
'google/gemini-3.8-live-extended-thinking',
|
|
108
114
|
'google/gemini-omni-flash-preview',
|
|
@@ -117,7 +123,6 @@ export const VERCEL_GATEWAY_CHAT_MODELS = [
|
|
|
117
123
|
'inclusionai/ling-3.0-flash-sante',
|
|
118
124
|
'inclusionai/ling-3.0-flash-sante-free',
|
|
119
125
|
'inclusionai/ling-3.0-flash-vl',
|
|
120
|
-
'inclusionai/ling-3.0-flash-vl-free',
|
|
121
126
|
'inference-net/schematron-v2-small',
|
|
122
127
|
'inference-net/schematron-v2-turbo',
|
|
123
128
|
'interfaze/interfaze-beta',
|
|
@@ -214,6 +219,10 @@ export const VERCEL_GATEWAY_CHAT_MODELS = [
|
|
|
214
219
|
'openai/gpt-5.6-terra-fast',
|
|
215
220
|
'openai/gpt-6-astra',
|
|
216
221
|
'openai/gpt-6-astra-fast',
|
|
222
|
+
'openai/gpt-6-luna',
|
|
223
|
+
'openai/gpt-6-luna-fast',
|
|
224
|
+
'openai/gpt-6-sol',
|
|
225
|
+
'openai/gpt-6-sol-fast',
|
|
217
226
|
'openai/gpt-live-1',
|
|
218
227
|
'openai/gpt-oss-120b',
|
|
219
228
|
'openai/gpt-oss-20b',
|
|
@@ -308,6 +317,7 @@ export const VERCEL_GATEWAY_PROVIDERS = [
|
|
|
308
317
|
'bytedance',
|
|
309
318
|
'cohere',
|
|
310
319
|
'deepseek',
|
|
320
|
+
'fireworks',
|
|
311
321
|
'fish-audio',
|
|
312
322
|
'google',
|
|
313
323
|
'inception',
|
|
@@ -423,6 +433,7 @@ export const VERCEL_GATEWAY_IMAGE_MODELS = [
|
|
|
423
433
|
'recraft/recraft-v4',
|
|
424
434
|
'recraft/recraft-v4-pro',
|
|
425
435
|
'recraft/recraft-v4.1',
|
|
436
|
+
'recraft/recraft-v4.1-flash',
|
|
426
437
|
'recraft/recraft-v4.1-pro',
|
|
427
438
|
'recraft/recraft-v4.1-utility',
|
|
428
439
|
'recraft/recraft-v4.1-utility-pro',
|
|
@@ -754,6 +765,18 @@ export type VercelGatewayChatModelProviderOptionsByName = {
|
|
|
754
765
|
| 'response_format'
|
|
755
766
|
| 'structured_outputs'
|
|
756
767
|
>
|
|
768
|
+
'alibaba/qwen3.8-max-prime': VercelGatewayCommonOptions &
|
|
769
|
+
Pick<
|
|
770
|
+
VercelGatewayBaseOptions,
|
|
771
|
+
| 'max_tokens'
|
|
772
|
+
| 'max_output_tokens'
|
|
773
|
+
| 'temperature'
|
|
774
|
+
| 'stop'
|
|
775
|
+
| 'reasoning'
|
|
776
|
+
| 'include_reasoning'
|
|
777
|
+
| 'response_format'
|
|
778
|
+
| 'structured_outputs'
|
|
779
|
+
>
|
|
757
780
|
'alibaba/qwen3.8-omni-flash': VercelGatewayCommonOptions &
|
|
758
781
|
Pick<
|
|
759
782
|
VercelGatewayBaseOptions,
|
|
@@ -945,6 +968,24 @@ export type VercelGatewayChatModelProviderOptionsByName = {
|
|
|
945
968
|
| 'response_format'
|
|
946
969
|
| 'structured_outputs'
|
|
947
970
|
>
|
|
971
|
+
'anthropic/claude-opus-5.5': VercelGatewayCommonOptions &
|
|
972
|
+
Pick<
|
|
973
|
+
VercelGatewayBaseOptions,
|
|
974
|
+
| 'max_tokens'
|
|
975
|
+
| 'max_output_tokens'
|
|
976
|
+
| 'stop'
|
|
977
|
+
| 'reasoning'
|
|
978
|
+
| 'include_reasoning'
|
|
979
|
+
>
|
|
980
|
+
'anthropic/claude-opus-5.5-fast': VercelGatewayCommonOptions &
|
|
981
|
+
Pick<
|
|
982
|
+
VercelGatewayBaseOptions,
|
|
983
|
+
| 'max_tokens'
|
|
984
|
+
| 'max_output_tokens'
|
|
985
|
+
| 'stop'
|
|
986
|
+
| 'reasoning'
|
|
987
|
+
| 'include_reasoning'
|
|
988
|
+
>
|
|
948
989
|
'anthropic/claude-sonnet-4': VercelGatewayCommonOptions &
|
|
949
990
|
Pick<
|
|
950
991
|
VercelGatewayBaseOptions,
|
|
@@ -1170,6 +1211,16 @@ export type VercelGatewayChatModelProviderOptionsByName = {
|
|
|
1170
1211
|
| 'response_format'
|
|
1171
1212
|
| 'structured_outputs'
|
|
1172
1213
|
>
|
|
1214
|
+
'fireworks/ember-1': VercelGatewayCommonOptions &
|
|
1215
|
+
Pick<
|
|
1216
|
+
VercelGatewayBaseOptions,
|
|
1217
|
+
| 'max_tokens'
|
|
1218
|
+
| 'max_output_tokens'
|
|
1219
|
+
| 'temperature'
|
|
1220
|
+
| 'stop'
|
|
1221
|
+
| 'reasoning'
|
|
1222
|
+
| 'include_reasoning'
|
|
1223
|
+
>
|
|
1173
1224
|
'fish-audio/s1': VercelGatewayCommonOptions
|
|
1174
1225
|
'fish-audio/s2-pro': VercelGatewayCommonOptions
|
|
1175
1226
|
'fish-audio/s2.1-pro': VercelGatewayCommonOptions
|
|
@@ -1364,6 +1415,8 @@ export type VercelGatewayChatModelProviderOptionsByName = {
|
|
|
1364
1415
|
| 'response_format'
|
|
1365
1416
|
| 'structured_outputs'
|
|
1366
1417
|
>
|
|
1418
|
+
'google/gemini-3.8-flash-lite-tts': VercelGatewayCommonOptions
|
|
1419
|
+
'google/gemini-3.8-flash-tts': VercelGatewayCommonOptions
|
|
1367
1420
|
'google/gemini-3.8-live': VercelGatewayCommonOptions &
|
|
1368
1421
|
Pick<
|
|
1369
1422
|
VercelGatewayBaseOptions,
|
|
@@ -1516,16 +1569,6 @@ export type VercelGatewayChatModelProviderOptionsByName = {
|
|
|
1516
1569
|
| 'reasoning'
|
|
1517
1570
|
| 'include_reasoning'
|
|
1518
1571
|
>
|
|
1519
|
-
'inclusionai/ling-3.0-flash-vl-free': VercelGatewayCommonOptions &
|
|
1520
|
-
Pick<
|
|
1521
|
-
VercelGatewayBaseOptions,
|
|
1522
|
-
| 'max_tokens'
|
|
1523
|
-
| 'max_output_tokens'
|
|
1524
|
-
| 'temperature'
|
|
1525
|
-
| 'stop'
|
|
1526
|
-
| 'reasoning'
|
|
1527
|
-
| 'include_reasoning'
|
|
1528
|
-
>
|
|
1529
1572
|
'inference-net/schematron-v2-small': VercelGatewayCommonOptions &
|
|
1530
1573
|
Pick<
|
|
1531
1574
|
VercelGatewayBaseOptions,
|
|
@@ -2562,6 +2605,54 @@ export type VercelGatewayChatModelProviderOptionsByName = {
|
|
|
2562
2605
|
| 'response_format'
|
|
2563
2606
|
| 'structured_outputs'
|
|
2564
2607
|
>
|
|
2608
|
+
'openai/gpt-6-luna': VercelGatewayCommonOptions &
|
|
2609
|
+
Pick<
|
|
2610
|
+
VercelGatewayBaseOptions,
|
|
2611
|
+
| 'max_tokens'
|
|
2612
|
+
| 'max_output_tokens'
|
|
2613
|
+
| 'temperature'
|
|
2614
|
+
| 'stop'
|
|
2615
|
+
| 'reasoning'
|
|
2616
|
+
| 'include_reasoning'
|
|
2617
|
+
| 'response_format'
|
|
2618
|
+
| 'structured_outputs'
|
|
2619
|
+
>
|
|
2620
|
+
'openai/gpt-6-luna-fast': VercelGatewayCommonOptions &
|
|
2621
|
+
Pick<
|
|
2622
|
+
VercelGatewayBaseOptions,
|
|
2623
|
+
| 'max_tokens'
|
|
2624
|
+
| 'max_output_tokens'
|
|
2625
|
+
| 'temperature'
|
|
2626
|
+
| 'stop'
|
|
2627
|
+
| 'reasoning'
|
|
2628
|
+
| 'include_reasoning'
|
|
2629
|
+
| 'response_format'
|
|
2630
|
+
| 'structured_outputs'
|
|
2631
|
+
>
|
|
2632
|
+
'openai/gpt-6-sol': VercelGatewayCommonOptions &
|
|
2633
|
+
Pick<
|
|
2634
|
+
VercelGatewayBaseOptions,
|
|
2635
|
+
| 'max_tokens'
|
|
2636
|
+
| 'max_output_tokens'
|
|
2637
|
+
| 'temperature'
|
|
2638
|
+
| 'stop'
|
|
2639
|
+
| 'reasoning'
|
|
2640
|
+
| 'include_reasoning'
|
|
2641
|
+
| 'response_format'
|
|
2642
|
+
| 'structured_outputs'
|
|
2643
|
+
>
|
|
2644
|
+
'openai/gpt-6-sol-fast': VercelGatewayCommonOptions &
|
|
2645
|
+
Pick<
|
|
2646
|
+
VercelGatewayBaseOptions,
|
|
2647
|
+
| 'max_tokens'
|
|
2648
|
+
| 'max_output_tokens'
|
|
2649
|
+
| 'temperature'
|
|
2650
|
+
| 'stop'
|
|
2651
|
+
| 'reasoning'
|
|
2652
|
+
| 'include_reasoning'
|
|
2653
|
+
| 'response_format'
|
|
2654
|
+
| 'structured_outputs'
|
|
2655
|
+
>
|
|
2565
2656
|
'openai/gpt-live-1': VercelGatewayCommonOptions &
|
|
2566
2657
|
Pick<
|
|
2567
2658
|
VercelGatewayBaseOptions,
|
|
@@ -3424,6 +3515,7 @@ export type VercelGatewayModelInputModalitiesByName = {
|
|
|
3424
3515
|
'alibaba/qwen3.8-flash': readonly ['text', 'image', 'document']
|
|
3425
3516
|
'alibaba/qwen3.8-max': readonly ['text', 'image']
|
|
3426
3517
|
'alibaba/qwen3.8-max-0902': readonly ['text', 'image', 'document']
|
|
3518
|
+
'alibaba/qwen3.8-max-prime': readonly ['text', 'image']
|
|
3427
3519
|
'alibaba/qwen3.8-omni-flash': readonly ['text', 'image']
|
|
3428
3520
|
'amazon/nova-2-lite': readonly ['text', 'image', 'document']
|
|
3429
3521
|
'amazon/nova-lite': readonly ['text', 'image', 'document']
|
|
@@ -3441,6 +3533,8 @@ export type VercelGatewayModelInputModalitiesByName = {
|
|
|
3441
3533
|
'anthropic/claude-opus-4.8-fast': readonly ['text', 'image', 'document']
|
|
3442
3534
|
'anthropic/claude-opus-5': readonly ['text', 'image', 'document']
|
|
3443
3535
|
'anthropic/claude-opus-5-fast': readonly ['text', 'image', 'document']
|
|
3536
|
+
'anthropic/claude-opus-5.5': readonly ['text', 'image', 'document']
|
|
3537
|
+
'anthropic/claude-opus-5.5-fast': readonly ['text', 'image', 'document']
|
|
3444
3538
|
'anthropic/claude-sonnet-4': readonly ['text', 'image', 'document']
|
|
3445
3539
|
'anthropic/claude-sonnet-4.5': readonly ['text', 'image', 'document']
|
|
3446
3540
|
'anthropic/claude-sonnet-4.6': readonly ['text', 'image', 'document']
|
|
@@ -3461,6 +3555,7 @@ export type VercelGatewayModelInputModalitiesByName = {
|
|
|
3461
3555
|
'deepseek/deepseek-v4-pro': readonly ['text']
|
|
3462
3556
|
'deepseek/deepseek-v4-pro-0813': readonly ['text']
|
|
3463
3557
|
'deepseek/deepseek-v4.1-flash': readonly ['text', 'image']
|
|
3558
|
+
'fireworks/ember-1': readonly ['text', 'image']
|
|
3464
3559
|
'fish-audio/s1': readonly ['text']
|
|
3465
3560
|
'fish-audio/s2-pro': readonly ['text']
|
|
3466
3561
|
'fish-audio/s2.1-pro': readonly ['text']
|
|
@@ -3488,6 +3583,8 @@ export type VercelGatewayModelInputModalitiesByName = {
|
|
|
3488
3583
|
'google/gemini-3.6-flash': readonly ['text', 'image', 'document', 'video']
|
|
3489
3584
|
'google/gemini-3.7-flash': readonly ['text', 'image', 'document', 'video']
|
|
3490
3585
|
'google/gemini-3.8-flash': readonly ['text', 'image', 'document', 'video']
|
|
3586
|
+
'google/gemini-3.8-flash-lite-tts': readonly ['text']
|
|
3587
|
+
'google/gemini-3.8-flash-tts': readonly ['text']
|
|
3491
3588
|
'google/gemini-3.8-live': readonly ['text', 'audio']
|
|
3492
3589
|
'google/gemini-3.8-live-extended-thinking': readonly ['text', 'audio']
|
|
3493
3590
|
'google/gemini-omni-flash-preview': readonly [
|
|
@@ -3507,7 +3604,6 @@ export type VercelGatewayModelInputModalitiesByName = {
|
|
|
3507
3604
|
'inclusionai/ling-3.0-flash-sante': readonly ['text']
|
|
3508
3605
|
'inclusionai/ling-3.0-flash-sante-free': readonly ['text']
|
|
3509
3606
|
'inclusionai/ling-3.0-flash-vl': readonly ['text', 'image', 'video']
|
|
3510
|
-
'inclusionai/ling-3.0-flash-vl-free': readonly ['text', 'image', 'video']
|
|
3511
3607
|
'inference-net/schematron-v2-small': readonly ['text']
|
|
3512
3608
|
'inference-net/schematron-v2-turbo': readonly ['text']
|
|
3513
3609
|
'interfaze/interfaze-beta': readonly ['text', 'image', 'document']
|
|
@@ -3609,6 +3705,10 @@ export type VercelGatewayModelInputModalitiesByName = {
|
|
|
3609
3705
|
'openai/gpt-5.6-terra-fast': readonly ['text', 'image', 'document']
|
|
3610
3706
|
'openai/gpt-6-astra': readonly ['text', 'image', 'document']
|
|
3611
3707
|
'openai/gpt-6-astra-fast': readonly ['text', 'image', 'document']
|
|
3708
|
+
'openai/gpt-6-luna': readonly ['text', 'image', 'document']
|
|
3709
|
+
'openai/gpt-6-luna-fast': readonly ['text', 'image', 'document']
|
|
3710
|
+
'openai/gpt-6-sol': readonly ['text', 'image', 'document']
|
|
3711
|
+
'openai/gpt-6-sol-fast': readonly ['text', 'image', 'document']
|
|
3612
3712
|
'openai/gpt-live-1': readonly ['text', 'audio']
|
|
3613
3713
|
'openai/gpt-oss-120b': readonly ['text']
|
|
3614
3714
|
'openai/gpt-oss-20b': readonly ['text']
|