@agi-cli/sdk 0.1.142 → 0.1.144
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/package.json
CHANGED
|
@@ -6350,7 +6350,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
|
|
|
6350
6350
|
id: 'kimi-k2.5',
|
|
6351
6351
|
label: 'Kimi K2.5',
|
|
6352
6352
|
modalities: {
|
|
6353
|
-
input: ['text'],
|
|
6353
|
+
input: ['text', 'image', 'video'],
|
|
6354
6354
|
output: ['text'],
|
|
6355
6355
|
},
|
|
6356
6356
|
toolCall: true,
|
|
@@ -6985,6 +6985,32 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
|
|
|
6985
6985
|
output: 262144,
|
|
6986
6986
|
},
|
|
6987
6987
|
},
|
|
6988
|
+
{
|
|
6989
|
+
id: 'kimi-k2.5',
|
|
6990
|
+
label: 'Kimi K2.5',
|
|
6991
|
+
modalities: {
|
|
6992
|
+
input: ['text', 'image', 'video'],
|
|
6993
|
+
output: ['text'],
|
|
6994
|
+
},
|
|
6995
|
+
toolCall: true,
|
|
6996
|
+
reasoningText: true,
|
|
6997
|
+
attachment: false,
|
|
6998
|
+
temperature: true,
|
|
6999
|
+
knowledge: '2025-01',
|
|
7000
|
+
releaseDate: '2026-01',
|
|
7001
|
+
lastUpdated: '2026-01',
|
|
7002
|
+
openWeights: true,
|
|
7003
|
+
cost: {
|
|
7004
|
+
input: 0,
|
|
7005
|
+
output: 0,
|
|
7006
|
+
cacheRead: 0,
|
|
7007
|
+
cacheWrite: 0,
|
|
7008
|
+
},
|
|
7009
|
+
limit: {
|
|
7010
|
+
context: 262144,
|
|
7011
|
+
output: 262144,
|
|
7012
|
+
},
|
|
7013
|
+
},
|
|
6988
7014
|
],
|
|
6989
7015
|
label: 'Moonshot AI',
|
|
6990
7016
|
env: ['MOONSHOT_API_KEY'],
|
|
@@ -7,6 +7,7 @@ import { svm } from 'x402/shared';
|
|
|
7
7
|
import nacl from 'tweetnacl';
|
|
8
8
|
import { createOpenAI } from '@ai-sdk/openai';
|
|
9
9
|
import { createAnthropic } from '@ai-sdk/anthropic';
|
|
10
|
+
import { createOpenAICompatible } from '@ai-sdk/openai-compatible';
|
|
10
11
|
import { addAnthropicCacheControl } from './anthropic-caching.ts';
|
|
11
12
|
|
|
12
13
|
function simplifyPaymentError(errMsg: string): string {
|
|
@@ -245,6 +246,7 @@ export function createSetuFetch(
|
|
|
245
246
|
* Uses native AI SDK providers:
|
|
246
247
|
* - OpenAI models → /v1/responses (via @ai-sdk/openai)
|
|
247
248
|
* - Anthropic models → /v1/messages (via @ai-sdk/anthropic)
|
|
249
|
+
* - Moonshot models → /v1/chat/completions (via @ai-sdk/openai-compatible)
|
|
248
250
|
*
|
|
249
251
|
* Provider is determined by options.providerNpm from catalog.
|
|
250
252
|
*/
|
|
@@ -268,6 +270,18 @@ export function createSetuModel(
|
|
|
268
270
|
return anthropic(model);
|
|
269
271
|
}
|
|
270
272
|
|
|
273
|
+
if (providerNpm === '@ai-sdk/openai-compatible') {
|
|
274
|
+
const compatible = createOpenAICompatible({
|
|
275
|
+
name: 'setu-moonshot',
|
|
276
|
+
baseURL,
|
|
277
|
+
headers: {
|
|
278
|
+
Authorization: 'Bearer setu-wallet-auth',
|
|
279
|
+
},
|
|
280
|
+
fetch: customFetch,
|
|
281
|
+
});
|
|
282
|
+
return compatible(model);
|
|
283
|
+
}
|
|
284
|
+
|
|
271
285
|
// Default to OpenAI
|
|
272
286
|
const openai = createOpenAI({
|
|
273
287
|
baseURL,
|