@psnext/slingcli 2.5.20260615-2 → 2.5.20260617-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/node_modules/@aws-sdk/core/dist-cjs/index.js +45 -50
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/account-id-endpoint/index.js +2 -4
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.browser.js +21 -22
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +51 -51
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.native.js +21 -22
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +19 -21
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +107 -109
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +2 -4
- package/node_modules/@aws-sdk/core/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +4 -6
- package/node_modules/@aws-sdk/credential-provider-env/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js +3 -7
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.browser.js +12 -16
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js +16 -21
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js +14 -18
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js +1 -5
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.browser.js +2 -5
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js +2 -7
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-cjs/index.js +11 -13
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-http/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +47 -41
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js +8 -4
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js +14 -10
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +13 -13
- package/node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js +31 -33
- package/node_modules/@aws-sdk/credential-provider-login/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +16 -18
- package/node_modules/@aws-sdk/credential-provider-node/package.json +11 -11
- package/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +11 -13
- package/node_modules/@aws-sdk/credential-provider-process/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +22 -24
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BGYXHf8s.js +3 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +26 -28
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js +10 -14
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js +2 -6
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +3 -27
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +7 -7
- package/node_modules/@aws-sdk/eventstream-handler-node/dist-cjs/index.js +7 -9
- package/node_modules/@aws-sdk/eventstream-handler-node/package.json +5 -5
- package/node_modules/@aws-sdk/middleware-eventstream/dist-cjs/index.js +3 -5
- package/node_modules/@aws-sdk/middleware-eventstream/package.json +5 -5
- package/node_modules/@aws-sdk/middleware-websocket/dist-cjs/index.js +16 -18
- package/node_modules/@aws-sdk/middleware-websocket/package.json +6 -6
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/index.js +0 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +82 -84
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +158 -119
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +80 -82
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +80 -82
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +99 -101
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/commands/CreateOAuth2TokenCommand.js +4 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/bdd.js +70 -35
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/endpointResolver.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/enums.js +3 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/endpoint/EndpointParameters.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/enums.d.ts +12 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/endpoint/EndpointParameters.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/enums.d.ts +3 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-cjs/index.js +11 -13
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/package.json +7 -7
- package/node_modules/@aws-sdk/nested-clients/package.json +9 -8
- package/node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js +4 -6
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +5 -5
- package/node_modules/@aws-sdk/types/dist-cjs/index.js +7 -8
- package/node_modules/@aws-sdk/types/package.json +4 -4
- package/node_modules/@aws-sdk/util-locate-window/dist-cjs/index.js +0 -2
- package/node_modules/@aws-sdk/util-locate-window/package.json +4 -4
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +2 -4
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-external/nodable_entities.js +4 -7
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.browser.js +2 -5
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js +7 -10
- package/node_modules/@aws-sdk/xml-builder/package.json +4 -4
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +162 -21
- package/node_modules/@smithy/core/dist-cjs/index.js +13 -15
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +29 -31
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.browser.js +2 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.js +7 -9
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.native.js +3 -5
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +22 -23
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +10 -11
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +38 -39
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +10 -11
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +14 -17
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +20 -23
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +9 -11
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +11 -13
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +59 -60
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +23 -24
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +25 -26
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +5 -7
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +4 -6
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +23 -25
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +4 -6
- package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +2 -4
- package/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/httpSigningMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/endpointMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +1 -1
- package/node_modules/@smithy/core/package.json +7 -6
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +23 -24
- package/node_modules/@smithy/credential-provider-imds/package.json +6 -6
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +6 -8
- package/node_modules/@smithy/fetch-http-handler/package.json +7 -7
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +27 -29
- package/node_modules/@smithy/signature-v4/package.json +6 -6
- package/node_modules/@smithy/types/dist-cjs/index.js +23 -18
- package/node_modules/@smithy/types/package.json +4 -4
- package/node_modules/undici/docs/docs/api/Client.md +3 -0
- package/node_modules/undici/docs/docs/api/Cookies.md +27 -0
- package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +1 -0
- package/node_modules/undici/lib/core/socks5-client.js +14 -4
- package/node_modules/undici/lib/core/socks5-utils.js +18 -4
- package/node_modules/undici/lib/dispatcher/agent.js +1 -1
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +1 -1
- package/node_modules/undici/lib/dispatcher/client-h1.js +69 -1
- package/node_modules/undici/lib/dispatcher/client.js +3 -2
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +19 -0
- package/node_modules/undici/lib/dispatcher/pool.js +1 -1
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +2 -1
- package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +45 -34
- package/node_modules/undici/lib/util/cache.js +8 -2
- package/node_modules/undici/lib/web/cookies/parse.js +17 -25
- package/node_modules/undici/lib/web/websocket/permessage-deflate.js +13 -31
- package/node_modules/undici/lib/web/websocket/receiver.js +80 -23
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -1
- package/node_modules/undici/lib/web/websocket/websocket.js +8 -1
- package/node_modules/undici/package.json +1 -1
- package/node_modules/undici/types/client.d.ts +16 -0
- package/package.json +2 -2
- package/slingshot/index.js +31 -31
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BKDNrsal.js +0 -8
|
@@ -3810,6 +3810,24 @@ export const MODELS = {
|
|
|
3810
3810
|
contextWindow: 131072,
|
|
3811
3811
|
maxTokens: 131072,
|
|
3812
3812
|
},
|
|
3813
|
+
"@cf/zai-org/glm-5.2": {
|
|
3814
|
+
id: "@cf/zai-org/glm-5.2",
|
|
3815
|
+
name: "Glm 5.2",
|
|
3816
|
+
api: "openai-completions",
|
|
3817
|
+
provider: "cloudflare-workers-ai",
|
|
3818
|
+
baseUrl: "https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",
|
|
3819
|
+
compat: { "sendSessionAffinityHeaders": true },
|
|
3820
|
+
reasoning: true,
|
|
3821
|
+
input: ["text"],
|
|
3822
|
+
cost: {
|
|
3823
|
+
input: 1.4,
|
|
3824
|
+
output: 4.4,
|
|
3825
|
+
cacheRead: 0.26,
|
|
3826
|
+
cacheWrite: 0,
|
|
3827
|
+
},
|
|
3828
|
+
contextWindow: 262144,
|
|
3829
|
+
maxTokens: 262144,
|
|
3830
|
+
},
|
|
3813
3831
|
},
|
|
3814
3832
|
"deepseek": {
|
|
3815
3833
|
"deepseek-v4-flash": {
|
|
@@ -3864,7 +3882,7 @@ export const MODELS = {
|
|
|
3864
3882
|
cost: {
|
|
3865
3883
|
input: 0.14,
|
|
3866
3884
|
output: 0.28,
|
|
3867
|
-
cacheRead: 0.
|
|
3885
|
+
cacheRead: 0.028,
|
|
3868
3886
|
cacheWrite: 0,
|
|
3869
3887
|
},
|
|
3870
3888
|
contextWindow: 1000000,
|
|
@@ -3906,6 +3924,24 @@ export const MODELS = {
|
|
|
3906
3924
|
contextWindow: 202800,
|
|
3907
3925
|
maxTokens: 131072,
|
|
3908
3926
|
},
|
|
3927
|
+
"accounts/fireworks/models/glm-5p2": {
|
|
3928
|
+
id: "accounts/fireworks/models/glm-5p2",
|
|
3929
|
+
name: "GLM 5.2",
|
|
3930
|
+
api: "anthropic-messages",
|
|
3931
|
+
provider: "fireworks",
|
|
3932
|
+
baseUrl: "https://api.fireworks.ai/inference",
|
|
3933
|
+
compat: { "sendSessionAffinityHeaders": true, "supportsEagerToolInputStreaming": false, "supportsCacheControlOnTools": false, "supportsLongCacheRetention": false },
|
|
3934
|
+
reasoning: true,
|
|
3935
|
+
input: ["text"],
|
|
3936
|
+
cost: {
|
|
3937
|
+
input: 1.4,
|
|
3938
|
+
output: 4.4,
|
|
3939
|
+
cacheRead: 0.26,
|
|
3940
|
+
cacheWrite: 0,
|
|
3941
|
+
},
|
|
3942
|
+
contextWindow: 1048576,
|
|
3943
|
+
maxTokens: 131072,
|
|
3944
|
+
},
|
|
3909
3945
|
"accounts/fireworks/models/gpt-oss-120b": {
|
|
3910
3946
|
id: "accounts/fireworks/models/gpt-oss-120b",
|
|
3911
3947
|
name: "GPT OSS 120B",
|
|
@@ -4096,7 +4132,7 @@ export const MODELS = {
|
|
|
4096
4132
|
reasoning: true,
|
|
4097
4133
|
input: ["text", "image"],
|
|
4098
4134
|
cost: {
|
|
4099
|
-
input:
|
|
4135
|
+
input: 1.9,
|
|
4100
4136
|
output: 8,
|
|
4101
4137
|
cacheRead: 0.38,
|
|
4102
4138
|
cacheWrite: 0,
|
|
@@ -6431,6 +6467,24 @@ export const MODELS = {
|
|
|
6431
6467
|
contextWindow: 262144,
|
|
6432
6468
|
maxTokens: 262144,
|
|
6433
6469
|
},
|
|
6470
|
+
"kimi-k2.7-code-highspeed": {
|
|
6471
|
+
id: "kimi-k2.7-code-highspeed",
|
|
6472
|
+
name: "Kimi K2.7 Code HighSpeed",
|
|
6473
|
+
api: "openai-completions",
|
|
6474
|
+
provider: "moonshotai",
|
|
6475
|
+
baseUrl: "https://api.moonshot.ai/v1",
|
|
6476
|
+
compat: { "supportsStore": false, "supportsDeveloperRole": false, "supportsReasoningEffort": false, "maxTokensField": "max_tokens", "supportsStrictMode": false, "thinkingFormat": "deepseek" },
|
|
6477
|
+
reasoning: true,
|
|
6478
|
+
input: ["text", "image"],
|
|
6479
|
+
cost: {
|
|
6480
|
+
input: 1.9,
|
|
6481
|
+
output: 8,
|
|
6482
|
+
cacheRead: 0.38,
|
|
6483
|
+
cacheWrite: 0,
|
|
6484
|
+
},
|
|
6485
|
+
contextWindow: 262144,
|
|
6486
|
+
maxTokens: 262144,
|
|
6487
|
+
},
|
|
6434
6488
|
},
|
|
6435
6489
|
"moonshotai-cn": {
|
|
6436
6490
|
"kimi-k2-0711-preview": {
|
|
@@ -6559,6 +6613,42 @@ export const MODELS = {
|
|
|
6559
6613
|
contextWindow: 262144,
|
|
6560
6614
|
maxTokens: 262144,
|
|
6561
6615
|
},
|
|
6616
|
+
"kimi-k2.7-code": {
|
|
6617
|
+
id: "kimi-k2.7-code",
|
|
6618
|
+
name: "Kimi K2.7 Code",
|
|
6619
|
+
api: "openai-completions",
|
|
6620
|
+
provider: "moonshotai-cn",
|
|
6621
|
+
baseUrl: "https://api.moonshot.cn/v1",
|
|
6622
|
+
compat: { "supportsStore": false, "supportsDeveloperRole": false, "supportsReasoningEffort": false, "maxTokensField": "max_tokens", "supportsStrictMode": false, "thinkingFormat": "deepseek" },
|
|
6623
|
+
reasoning: true,
|
|
6624
|
+
input: ["text", "image"],
|
|
6625
|
+
cost: {
|
|
6626
|
+
input: 0.95,
|
|
6627
|
+
output: 4,
|
|
6628
|
+
cacheRead: 0.19,
|
|
6629
|
+
cacheWrite: 0,
|
|
6630
|
+
},
|
|
6631
|
+
contextWindow: 262144,
|
|
6632
|
+
maxTokens: 262144,
|
|
6633
|
+
},
|
|
6634
|
+
"kimi-k2.7-code-highspeed": {
|
|
6635
|
+
id: "kimi-k2.7-code-highspeed",
|
|
6636
|
+
name: "Kimi K2.7 Code HighSpeed",
|
|
6637
|
+
api: "openai-completions",
|
|
6638
|
+
provider: "moonshotai-cn",
|
|
6639
|
+
baseUrl: "https://api.moonshot.cn/v1",
|
|
6640
|
+
compat: { "supportsStore": false, "supportsDeveloperRole": false, "supportsReasoningEffort": false, "maxTokensField": "max_tokens", "supportsStrictMode": false, "thinkingFormat": "deepseek" },
|
|
6641
|
+
reasoning: true,
|
|
6642
|
+
input: ["text", "image"],
|
|
6643
|
+
cost: {
|
|
6644
|
+
input: 1.9,
|
|
6645
|
+
output: 8,
|
|
6646
|
+
cacheRead: 0.38,
|
|
6647
|
+
cacheWrite: 0,
|
|
6648
|
+
},
|
|
6649
|
+
contextWindow: 262144,
|
|
6650
|
+
maxTokens: 262144,
|
|
6651
|
+
},
|
|
6562
6652
|
},
|
|
6563
6653
|
"nvidia": {
|
|
6564
6654
|
"meta/llama-3.1-70b-instruct": {
|
|
@@ -10506,13 +10596,13 @@ export const MODELS = {
|
|
|
10506
10596
|
reasoning: true,
|
|
10507
10597
|
input: ["text", "image"],
|
|
10508
10598
|
cost: {
|
|
10509
|
-
input: 0.
|
|
10599
|
+
input: 0.74,
|
|
10510
10600
|
output: 3.5,
|
|
10511
|
-
cacheRead: 0.
|
|
10601
|
+
cacheRead: 0.15,
|
|
10512
10602
|
cacheWrite: 0,
|
|
10513
10603
|
},
|
|
10514
10604
|
contextWindow: 262144,
|
|
10515
|
-
maxTokens:
|
|
10605
|
+
maxTokens: 16384,
|
|
10516
10606
|
},
|
|
10517
10607
|
"nex-agi/nex-n2-pro:free": {
|
|
10518
10608
|
id: "nex-agi/nex-n2-pro:free",
|
|
@@ -10643,8 +10733,8 @@ export const MODELS = {
|
|
|
10643
10733
|
input: ["text"],
|
|
10644
10734
|
cost: {
|
|
10645
10735
|
input: 0.5,
|
|
10646
|
-
output: 2.
|
|
10647
|
-
cacheRead: 0.
|
|
10736
|
+
output: 2.2,
|
|
10737
|
+
cacheRead: 0.1,
|
|
10648
10738
|
cacheWrite: 0,
|
|
10649
10739
|
},
|
|
10650
10740
|
contextWindow: 1000000,
|
|
@@ -12309,7 +12399,7 @@ export const MODELS = {
|
|
|
12309
12399
|
cacheWrite: 0,
|
|
12310
12400
|
},
|
|
12311
12401
|
contextWindow: 262144,
|
|
12312
|
-
maxTokens:
|
|
12402
|
+
maxTokens: 81920,
|
|
12313
12403
|
},
|
|
12314
12404
|
"qwen/qwen3.5-397b-a17b": {
|
|
12315
12405
|
id: "qwen/qwen3.5-397b-a17b",
|
|
@@ -12320,13 +12410,13 @@ export const MODELS = {
|
|
|
12320
12410
|
reasoning: true,
|
|
12321
12411
|
input: ["text", "image"],
|
|
12322
12412
|
cost: {
|
|
12323
|
-
input: 0.
|
|
12324
|
-
output: 2.
|
|
12413
|
+
input: 0.385,
|
|
12414
|
+
output: 2.45,
|
|
12325
12415
|
cacheRead: 0,
|
|
12326
12416
|
cacheWrite: 0,
|
|
12327
12417
|
},
|
|
12328
|
-
contextWindow:
|
|
12329
|
-
maxTokens:
|
|
12418
|
+
contextWindow: 256000,
|
|
12419
|
+
maxTokens: 4096,
|
|
12330
12420
|
},
|
|
12331
12421
|
"qwen/qwen3.5-9b": {
|
|
12332
12422
|
id: "qwen/qwen3.5-9b",
|
|
@@ -12609,13 +12699,13 @@ export const MODELS = {
|
|
|
12609
12699
|
reasoning: true,
|
|
12610
12700
|
input: ["text"],
|
|
12611
12701
|
cost: {
|
|
12612
|
-
input: 0.
|
|
12613
|
-
output: 0.
|
|
12614
|
-
cacheRead: 0.
|
|
12702
|
+
input: 0.066,
|
|
12703
|
+
output: 0.26,
|
|
12704
|
+
cacheRead: 0.029,
|
|
12615
12705
|
cacheWrite: 0,
|
|
12616
12706
|
},
|
|
12617
12707
|
contextWindow: 262144,
|
|
12618
|
-
maxTokens:
|
|
12708
|
+
maxTokens: 262144,
|
|
12619
12709
|
},
|
|
12620
12710
|
"thedrummer/rocinante-12b": {
|
|
12621
12711
|
id: "thedrummer/rocinante-12b",
|
|
@@ -12796,13 +12886,13 @@ export const MODELS = {
|
|
|
12796
12886
|
reasoning: true,
|
|
12797
12887
|
input: ["text"],
|
|
12798
12888
|
cost: {
|
|
12799
|
-
input: 0.
|
|
12889
|
+
input: 0.13,
|
|
12800
12890
|
output: 0.85,
|
|
12801
|
-
cacheRead: 0.
|
|
12891
|
+
cacheRead: 0.025,
|
|
12802
12892
|
cacheWrite: 0,
|
|
12803
12893
|
},
|
|
12804
12894
|
contextWindow: 131072,
|
|
12805
|
-
maxTokens:
|
|
12895
|
+
maxTokens: 98304,
|
|
12806
12896
|
},
|
|
12807
12897
|
"z-ai/glm-4.5v": {
|
|
12808
12898
|
id: "z-ai/glm-4.5v",
|
|
@@ -12940,6 +13030,23 @@ export const MODELS = {
|
|
|
12940
13030
|
contextWindow: 202752,
|
|
12941
13031
|
maxTokens: 4096,
|
|
12942
13032
|
},
|
|
13033
|
+
"z-ai/glm-5.2": {
|
|
13034
|
+
id: "z-ai/glm-5.2",
|
|
13035
|
+
name: "Z.ai: GLM 5.2",
|
|
13036
|
+
api: "openai-completions",
|
|
13037
|
+
provider: "openrouter",
|
|
13038
|
+
baseUrl: "https://openrouter.ai/api/v1",
|
|
13039
|
+
reasoning: true,
|
|
13040
|
+
input: ["text"],
|
|
13041
|
+
cost: {
|
|
13042
|
+
input: 1.4,
|
|
13043
|
+
output: 4.4,
|
|
13044
|
+
cacheRead: 0.26,
|
|
13045
|
+
cacheWrite: 0,
|
|
13046
|
+
},
|
|
13047
|
+
contextWindow: 1048576,
|
|
13048
|
+
maxTokens: 262144,
|
|
13049
|
+
},
|
|
12943
13050
|
"~anthropic/claude-fable-latest": {
|
|
12944
13051
|
id: "~anthropic/claude-fable-latest",
|
|
12945
13052
|
name: "Anthropic: Claude Fable Latest",
|
|
@@ -13236,8 +13343,8 @@ export const MODELS = {
|
|
|
13236
13343
|
reasoning: false,
|
|
13237
13344
|
input: ["text"],
|
|
13238
13345
|
cost: {
|
|
13239
|
-
input:
|
|
13240
|
-
output:
|
|
13346
|
+
input: 1.25,
|
|
13347
|
+
output: 3.75,
|
|
13241
13348
|
cacheRead: 0,
|
|
13242
13349
|
cacheWrite: 0,
|
|
13243
13350
|
},
|
|
@@ -15041,6 +15148,23 @@ export const MODELS = {
|
|
|
15041
15148
|
contextWindow: 256000,
|
|
15042
15149
|
maxTokens: 32768,
|
|
15043
15150
|
},
|
|
15151
|
+
"moonshotai/kimi-k2.7-code-highspeed": {
|
|
15152
|
+
id: "moonshotai/kimi-k2.7-code-highspeed",
|
|
15153
|
+
name: "Kimi K2.7 Code High Speed",
|
|
15154
|
+
api: "anthropic-messages",
|
|
15155
|
+
provider: "vercel-ai-gateway",
|
|
15156
|
+
baseUrl: "https://ai-gateway.vercel.sh",
|
|
15157
|
+
reasoning: true,
|
|
15158
|
+
input: ["text", "image"],
|
|
15159
|
+
cost: {
|
|
15160
|
+
input: 1.9,
|
|
15161
|
+
output: 8,
|
|
15162
|
+
cacheRead: 0.38,
|
|
15163
|
+
cacheWrite: 0,
|
|
15164
|
+
},
|
|
15165
|
+
contextWindow: 262144,
|
|
15166
|
+
maxTokens: 262144,
|
|
15167
|
+
},
|
|
15044
15168
|
"nvidia/nemotron-3-super-120b-a12b": {
|
|
15045
15169
|
id: "nvidia/nemotron-3-super-120b-a12b",
|
|
15046
15170
|
name: "NVIDIA Nemotron 3 Super 120B A12B",
|
|
@@ -16277,6 +16401,23 @@ export const MODELS = {
|
|
|
16277
16401
|
contextWindow: 202800,
|
|
16278
16402
|
maxTokens: 64000,
|
|
16279
16403
|
},
|
|
16404
|
+
"zai/glm-5.2": {
|
|
16405
|
+
id: "zai/glm-5.2",
|
|
16406
|
+
name: "GLM 5.2",
|
|
16407
|
+
api: "anthropic-messages",
|
|
16408
|
+
provider: "vercel-ai-gateway",
|
|
16409
|
+
baseUrl: "https://ai-gateway.vercel.sh",
|
|
16410
|
+
reasoning: true,
|
|
16411
|
+
input: ["text"],
|
|
16412
|
+
cost: {
|
|
16413
|
+
input: 1.4,
|
|
16414
|
+
output: 4.4,
|
|
16415
|
+
cacheRead: 0.26,
|
|
16416
|
+
cacheWrite: 0,
|
|
16417
|
+
},
|
|
16418
|
+
contextWindow: 1000000,
|
|
16419
|
+
maxTokens: 128000,
|
|
16420
|
+
},
|
|
16280
16421
|
"zai/glm-5v-turbo": {
|
|
16281
16422
|
id: "zai/glm-5v-turbo",
|
|
16282
16423
|
name: "GLM 5V Turbo",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
const { getSmithyContext } = require("@smithy/core/transport");
|
|
2
|
+
exports.getSmithyContext = getSmithyContext;
|
|
3
|
+
const { HttpRequest } = require("@smithy/core/protocols");
|
|
4
|
+
const { requestBuilder } = require("@smithy/core/protocols");
|
|
5
|
+
exports.requestBuilder = requestBuilder;
|
|
6
|
+
const { HttpApiKeyAuthLocation } = require("@smithy/types");
|
|
7
7
|
|
|
8
8
|
const resolveAuthOptions = (candidateAuthOptions, authSchemePreference) => {
|
|
9
9
|
if (!authSchemePreference || authSchemePreference.length === 0) {
|
|
@@ -38,7 +38,7 @@ const httpAuthSchemeMiddleware = (config, mwOptions) => (next, context) => async
|
|
|
38
38
|
const authSchemePreference = config.authSchemePreference ? await config.authSchemePreference() : [];
|
|
39
39
|
const resolvedOptions = resolveAuthOptions(options, authSchemePreference);
|
|
40
40
|
const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes);
|
|
41
|
-
const smithyContext =
|
|
41
|
+
const smithyContext = getSmithyContext(context);
|
|
42
42
|
const failureReasons = [];
|
|
43
43
|
for (const option of resolvedOptions) {
|
|
44
44
|
const scheme = authSchemes.get(option.schemeId);
|
|
@@ -106,10 +106,10 @@ const defaultErrorHandler = (signingProperties) => (error) => {
|
|
|
106
106
|
};
|
|
107
107
|
const defaultSuccessHandler = (httpResponse, signingProperties) => { };
|
|
108
108
|
const httpSigningMiddleware = (config) => (next, context) => async (args) => {
|
|
109
|
-
if (!
|
|
109
|
+
if (!HttpRequest.isInstance(args.request)) {
|
|
110
110
|
return next(args);
|
|
111
111
|
}
|
|
112
|
-
const smithyContext =
|
|
112
|
+
const smithyContext = getSmithyContext(context);
|
|
113
113
|
const scheme = smithyContext.selectedHttpAuthScheme;
|
|
114
114
|
if (!scheme) {
|
|
115
115
|
throw new Error(`No HttpAuthScheme was selected: unable to sign request`);
|
|
@@ -228,11 +228,11 @@ class HttpApiKeyAuthSigner {
|
|
|
228
228
|
if (!identity.apiKey) {
|
|
229
229
|
throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");
|
|
230
230
|
}
|
|
231
|
-
const clonedRequest =
|
|
232
|
-
if (signingProperties.in ===
|
|
231
|
+
const clonedRequest = HttpRequest.clone(httpRequest);
|
|
232
|
+
if (signingProperties.in === HttpApiKeyAuthLocation.QUERY) {
|
|
233
233
|
clonedRequest.query[signingProperties.name] = identity.apiKey;
|
|
234
234
|
}
|
|
235
|
-
else if (signingProperties.in ===
|
|
235
|
+
else if (signingProperties.in === HttpApiKeyAuthLocation.HEADER) {
|
|
236
236
|
clonedRequest.headers[signingProperties.name] = signingProperties.scheme
|
|
237
237
|
? `${signingProperties.scheme} ${identity.apiKey}`
|
|
238
238
|
: identity.apiKey;
|
|
@@ -249,7 +249,7 @@ class HttpApiKeyAuthSigner {
|
|
|
249
249
|
|
|
250
250
|
class HttpBearerAuthSigner {
|
|
251
251
|
async sign(httpRequest, identity, signingProperties) {
|
|
252
|
-
const clonedRequest =
|
|
252
|
+
const clonedRequest = HttpRequest.clone(httpRequest);
|
|
253
253
|
if (!identity.token) {
|
|
254
254
|
throw new Error("request could not be signed with `token` since the `token` is not defined");
|
|
255
255
|
}
|
|
@@ -320,8 +320,6 @@ const memoizeIdentityProvider = (provider, isExpired, requiresRefresh) => {
|
|
|
320
320
|
};
|
|
321
321
|
};
|
|
322
322
|
|
|
323
|
-
exports.getSmithyContext = transport.getSmithyContext;
|
|
324
|
-
exports.requestBuilder = protocols.requestBuilder;
|
|
325
323
|
exports.DefaultIdentityProviderConfig = DefaultIdentityProviderConfig;
|
|
326
324
|
exports.EXPIRATION_MS = EXPIRATION_MS;
|
|
327
325
|
exports.HttpApiKeyAuthSigner = HttpApiKeyAuthSigner;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var client = require('@smithy/core/client');
|
|
6
|
-
var schema = require('@smithy/core/schema');
|
|
1
|
+
const { nv, toUtf8, fromUtf8, NumericValue, calculateBodyLength, _parseEpochTimestamp, fromBase64, generateIdempotencyToken } = require("@smithy/core/serde");
|
|
2
|
+
const { HttpRequest, collectBody, SerdeContext, RpcProtocol } = require("@smithy/core/protocols");
|
|
3
|
+
const { NormalizedSchema, deref, TypeRegistry } = require("@smithy/core/schema");
|
|
4
|
+
const { getSmithyContext } = require("@smithy/core/transport");
|
|
7
5
|
|
|
8
6
|
const majorUint64 = 0;
|
|
9
7
|
const majorNegativeInt64 = 1;
|
|
@@ -133,7 +131,7 @@ function decode(at, to) {
|
|
|
133
131
|
}
|
|
134
132
|
numericString = sign + numericString;
|
|
135
133
|
_offset = offset + _offset;
|
|
136
|
-
return
|
|
134
|
+
return nv(numericString);
|
|
137
135
|
}
|
|
138
136
|
else {
|
|
139
137
|
const value = decode(at + offset, to);
|
|
@@ -181,7 +179,7 @@ function bytesToUtf8(bytes, at, to) {
|
|
|
181
179
|
if (textDecoder) {
|
|
182
180
|
return textDecoder.decode(bytes.subarray(at, to));
|
|
183
181
|
}
|
|
184
|
-
return
|
|
182
|
+
return toUtf8(bytes.subarray(at, to));
|
|
185
183
|
}
|
|
186
184
|
function demote(bigInteger) {
|
|
187
185
|
const num = Number(bigInteger);
|
|
@@ -525,7 +523,7 @@ function encode(_input) {
|
|
|
525
523
|
cursor += data.write(input, cursor);
|
|
526
524
|
}
|
|
527
525
|
else {
|
|
528
|
-
const bytes =
|
|
526
|
+
const bytes = fromUtf8(input);
|
|
529
527
|
encodeHeader(majorUtf8String, bytes.byteLength);
|
|
530
528
|
data.set(bytes, cursor);
|
|
531
529
|
cursor += bytes.byteLength;
|
|
@@ -641,7 +639,7 @@ function encode(_input) {
|
|
|
641
639
|
continue;
|
|
642
640
|
}
|
|
643
641
|
else if (typeof input === "object") {
|
|
644
|
-
if (input instanceof
|
|
642
|
+
if (input instanceof NumericValue) {
|
|
645
643
|
const decimalIndex = input.string.indexOf(".");
|
|
646
644
|
const exponent = decimalIndex === -1 ? 0 : decimalIndex - input.string.length + 1;
|
|
647
645
|
const mantissa = BigInt(input.string.replace(".", ""));
|
|
@@ -695,7 +693,7 @@ const cbor = {
|
|
|
695
693
|
};
|
|
696
694
|
|
|
697
695
|
const parseCborBody = (streamBody, context) => {
|
|
698
|
-
return
|
|
696
|
+
return collectBody(streamBody, context).then(async (bytes) => {
|
|
699
697
|
if (bytes.length) {
|
|
700
698
|
try {
|
|
701
699
|
return cbor.deserialize(bytes);
|
|
@@ -781,14 +779,14 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
|
|
|
781
779
|
if (body !== undefined) {
|
|
782
780
|
contents.body = body;
|
|
783
781
|
try {
|
|
784
|
-
contents.headers["content-length"] = String(
|
|
782
|
+
contents.headers["content-length"] = String(calculateBodyLength(body));
|
|
785
783
|
}
|
|
786
784
|
catch (e) { }
|
|
787
785
|
}
|
|
788
|
-
return new
|
|
786
|
+
return new HttpRequest(contents);
|
|
789
787
|
};
|
|
790
788
|
|
|
791
|
-
class CborCodec extends
|
|
789
|
+
class CborCodec extends SerdeContext {
|
|
792
790
|
createSerializer() {
|
|
793
791
|
const serializer = new CborShapeSerializer();
|
|
794
792
|
serializer.setSerdeContext(this.serdeContext);
|
|
@@ -800,22 +798,22 @@ class CborCodec extends protocols.SerdeContext {
|
|
|
800
798
|
return deserializer;
|
|
801
799
|
}
|
|
802
800
|
}
|
|
803
|
-
class CborShapeSerializer extends
|
|
801
|
+
class CborShapeSerializer extends SerdeContext {
|
|
804
802
|
value;
|
|
805
803
|
write(schema, value) {
|
|
806
804
|
this.value = this.serialize(schema, value);
|
|
807
805
|
}
|
|
808
|
-
serialize(schema
|
|
809
|
-
const ns =
|
|
806
|
+
serialize(schema, source) {
|
|
807
|
+
const ns = NormalizedSchema.of(schema);
|
|
810
808
|
if (source == null) {
|
|
811
809
|
if (ns.isIdempotencyToken()) {
|
|
812
|
-
return
|
|
810
|
+
return generateIdempotencyToken();
|
|
813
811
|
}
|
|
814
812
|
return source;
|
|
815
813
|
}
|
|
816
814
|
if (ns.isBlobSchema()) {
|
|
817
815
|
if (typeof source === "string") {
|
|
818
|
-
return (this.serdeContext?.base64Decoder ??
|
|
816
|
+
return (this.serdeContext?.base64Decoder ?? fromBase64)(source);
|
|
819
817
|
}
|
|
820
818
|
return source;
|
|
821
819
|
}
|
|
@@ -890,26 +888,26 @@ class CborShapeSerializer extends protocols.SerdeContext {
|
|
|
890
888
|
return buffer;
|
|
891
889
|
}
|
|
892
890
|
}
|
|
893
|
-
class CborShapeDeserializer extends
|
|
891
|
+
class CborShapeDeserializer extends SerdeContext {
|
|
894
892
|
read(schema, bytes) {
|
|
895
893
|
const data = cbor.deserialize(bytes);
|
|
896
894
|
return this.readValue(schema, data);
|
|
897
895
|
}
|
|
898
896
|
readValue(_schema, value) {
|
|
899
|
-
const ns =
|
|
897
|
+
const ns = NormalizedSchema.of(_schema);
|
|
900
898
|
if (ns.isTimestampSchema()) {
|
|
901
899
|
if (typeof value === "number") {
|
|
902
|
-
return
|
|
900
|
+
return _parseEpochTimestamp(value);
|
|
903
901
|
}
|
|
904
902
|
if (typeof value === "object") {
|
|
905
903
|
if (value.tag === 1 && "value" in value) {
|
|
906
|
-
return
|
|
904
|
+
return _parseEpochTimestamp(value.value);
|
|
907
905
|
}
|
|
908
906
|
}
|
|
909
907
|
}
|
|
910
908
|
if (ns.isBlobSchema()) {
|
|
911
909
|
if (typeof value === "string") {
|
|
912
|
-
return (this.serdeContext?.base64Decoder ??
|
|
910
|
+
return (this.serdeContext?.base64Decoder ?? fromBase64)(value);
|
|
913
911
|
}
|
|
914
912
|
return value;
|
|
915
913
|
}
|
|
@@ -989,7 +987,7 @@ class CborShapeDeserializer extends protocols.SerdeContext {
|
|
|
989
987
|
}
|
|
990
988
|
}
|
|
991
989
|
}
|
|
992
|
-
else if (value instanceof
|
|
990
|
+
else if (value instanceof NumericValue) {
|
|
993
991
|
return value;
|
|
994
992
|
}
|
|
995
993
|
return newObject;
|
|
@@ -1000,7 +998,7 @@ class CborShapeDeserializer extends protocols.SerdeContext {
|
|
|
1000
998
|
}
|
|
1001
999
|
}
|
|
1002
1000
|
|
|
1003
|
-
class SmithyRpcV2CborProtocol extends
|
|
1001
|
+
class SmithyRpcV2CborProtocol extends RpcProtocol {
|
|
1004
1002
|
codec = new CborCodec();
|
|
1005
1003
|
serializer = this.codec.createSerializer();
|
|
1006
1004
|
deserializer = this.codec.createDeserializer();
|
|
@@ -1020,7 +1018,7 @@ class SmithyRpcV2CborProtocol extends protocols.RpcProtocol {
|
|
|
1020
1018
|
"smithy-protocol": "rpc-v2-cbor",
|
|
1021
1019
|
accept: this.getDefaultContentType(),
|
|
1022
1020
|
});
|
|
1023
|
-
if (
|
|
1021
|
+
if (deref(operationSchema.input) === "unit") {
|
|
1024
1022
|
delete request.body;
|
|
1025
1023
|
delete request.headers["content-type"];
|
|
1026
1024
|
}
|
|
@@ -1034,7 +1032,7 @@ class SmithyRpcV2CborProtocol extends protocols.RpcProtocol {
|
|
|
1034
1032
|
}
|
|
1035
1033
|
catch (e) { }
|
|
1036
1034
|
}
|
|
1037
|
-
const { service, operation } =
|
|
1035
|
+
const { service, operation } = getSmithyContext(context);
|
|
1038
1036
|
const path = `/service/${service}/operation/${operation}`;
|
|
1039
1037
|
if (request.path.endsWith("/")) {
|
|
1040
1038
|
request.path += path.slice(1);
|
|
@@ -1058,7 +1056,7 @@ class SmithyRpcV2CborProtocol extends protocols.RpcProtocol {
|
|
|
1058
1056
|
[namespace] = errorName.split("#");
|
|
1059
1057
|
}
|
|
1060
1058
|
const registry = this.compositeErrorRegistry;
|
|
1061
|
-
const nsRegistry =
|
|
1059
|
+
const nsRegistry = TypeRegistry.for(namespace);
|
|
1062
1060
|
registry.copyFrom(nsRegistry);
|
|
1063
1061
|
let errorSchema;
|
|
1064
1062
|
try {
|
|
@@ -1068,7 +1066,7 @@ class SmithyRpcV2CborProtocol extends protocols.RpcProtocol {
|
|
|
1068
1066
|
if (dataObject.Message) {
|
|
1069
1067
|
dataObject.message = dataObject.Message;
|
|
1070
1068
|
}
|
|
1071
|
-
const syntheticRegistry =
|
|
1069
|
+
const syntheticRegistry = TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace);
|
|
1072
1070
|
registry.copyFrom(syntheticRegistry);
|
|
1073
1071
|
const baseExceptionSchema = registry.getBaseException();
|
|
1074
1072
|
if (baseExceptionSchema) {
|
|
@@ -1077,7 +1075,7 @@ class SmithyRpcV2CborProtocol extends protocols.RpcProtocol {
|
|
|
1077
1075
|
}
|
|
1078
1076
|
throw Object.assign(new Error(errorName), errorMetadata, dataObject);
|
|
1079
1077
|
}
|
|
1080
|
-
const ns =
|
|
1078
|
+
const ns = NormalizedSchema.of(errorSchema);
|
|
1081
1079
|
const ErrorCtor = registry.getErrorCtor(errorSchema);
|
|
1082
1080
|
const message = dataObject.message ?? dataObject.Message ?? "Unknown";
|
|
1083
1081
|
const exception = new ErrorCtor({});
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var serde = require('@smithy/core/serde');
|
|
1
|
+
const { fromUtf8 } = require("@smithy/core/serde");
|
|
4
2
|
|
|
5
3
|
async function blobReader(blob, onChunk, chunkSize = 1024 * 1024) {
|
|
6
4
|
const size = blob.size;
|
|
@@ -183,7 +181,7 @@ function isEmptyData(data) {
|
|
|
183
181
|
}
|
|
184
182
|
function convertToBuffer(data) {
|
|
185
183
|
if (typeof data === "string") {
|
|
186
|
-
return
|
|
184
|
+
return fromUtf8(data);
|
|
187
185
|
}
|
|
188
186
|
if (ArrayBuffer.isView(data)) {
|
|
189
187
|
return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var node_stream = require('node:stream');
|
|
5
|
-
var serde = require('@smithy/core/serde');
|
|
1
|
+
const { createReadStream } = require("node:fs");
|
|
2
|
+
const { Writable } = require("node:stream");
|
|
3
|
+
const { toUint8Array, fromUtf8 } = require("@smithy/core/serde");
|
|
6
4
|
|
|
7
5
|
async function blobReader(blob, onChunk, chunkSize = 1024 * 1024) {
|
|
8
6
|
const size = blob.size;
|
|
@@ -22,7 +20,7 @@ const blobHasher = async function blobHasher(hashCtor, blob) {
|
|
|
22
20
|
return hash.digest();
|
|
23
21
|
};
|
|
24
22
|
|
|
25
|
-
class HashCalculator extends
|
|
23
|
+
class HashCalculator extends Writable {
|
|
26
24
|
hash;
|
|
27
25
|
constructor(hash, options) {
|
|
28
26
|
super(options);
|
|
@@ -30,7 +28,7 @@ class HashCalculator extends node_stream.Writable {
|
|
|
30
28
|
}
|
|
31
29
|
_write(chunk, encoding, callback) {
|
|
32
30
|
try {
|
|
33
|
-
this.hash.update(
|
|
31
|
+
this.hash.update(toUint8Array(chunk));
|
|
34
32
|
}
|
|
35
33
|
catch (err) {
|
|
36
34
|
return callback(err);
|
|
@@ -44,7 +42,7 @@ const fileStreamHasher = (hashCtor, fileStream) => new Promise((resolve, reject)
|
|
|
44
42
|
reject(new Error("Unable to calculate hash for non-file streams."));
|
|
45
43
|
return;
|
|
46
44
|
}
|
|
47
|
-
const fileStreamTee =
|
|
45
|
+
const fileStreamTee = createReadStream(fileStream.path, {
|
|
48
46
|
start: fileStream.start,
|
|
49
47
|
end: fileStream.end,
|
|
50
48
|
});
|
|
@@ -244,7 +242,7 @@ function isEmptyData(data) {
|
|
|
244
242
|
}
|
|
245
243
|
function convertToBuffer(data) {
|
|
246
244
|
if (typeof data === "string") {
|
|
247
|
-
return
|
|
245
|
+
return fromUtf8(data);
|
|
248
246
|
}
|
|
249
247
|
if (ArrayBuffer.isView(data)) {
|
|
250
248
|
return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var serde = require('@smithy/core/serde');
|
|
1
|
+
const { fromUtf8, fromBase64 } = require("@smithy/core/serde");
|
|
4
2
|
|
|
5
3
|
async function blobReader$1(blob, onChunk, chunkSize = 1024 * 1024) {
|
|
6
4
|
const size = blob.size;
|
|
@@ -183,7 +181,7 @@ function isEmptyData(data) {
|
|
|
183
181
|
}
|
|
184
182
|
function convertToBuffer(data) {
|
|
185
183
|
if (typeof data === "string") {
|
|
186
|
-
return
|
|
184
|
+
return fromUtf8(data);
|
|
187
185
|
}
|
|
188
186
|
if (ArrayBuffer.isView(data)) {
|
|
189
187
|
return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);
|
|
@@ -209,7 +207,7 @@ function blobReader(blob, onChunk, chunkSize = 1024 * 1024) {
|
|
|
209
207
|
const result = event.target.result;
|
|
210
208
|
const dataOffset = result.indexOf(",") + 1;
|
|
211
209
|
const data = result.substring(dataOffset);
|
|
212
|
-
const decoded =
|
|
210
|
+
const decoded = fromBase64(data);
|
|
213
211
|
onChunk(decoded);
|
|
214
212
|
totalBytesRead += decoded.byteLength;
|
|
215
213
|
read();
|