@ai-sdk/gmicloud 3.0.29 → 3.0.31
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/CHANGELOG.md +19 -0
- package/dist/index.d.ts +59 -54
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +87 -100
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
- package/src/gmicloud-provider.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @ai-sdk/gmicloud
|
|
2
2
|
|
|
3
|
+
## 3.0.31
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ede5b89: chore: migrate package builds from tsup to tsdown
|
|
8
|
+
- Updated dependencies [ede5b89]
|
|
9
|
+
- @ai-sdk/openai-compatible@3.0.60
|
|
10
|
+
- @ai-sdk/provider@4.0.20
|
|
11
|
+
- @ai-sdk/provider-utils@5.0.52
|
|
12
|
+
|
|
13
|
+
## 3.0.30
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- c2511c1: fix: use standards-compliant User-Agent header
|
|
18
|
+
- Updated dependencies [c2511c1]
|
|
19
|
+
- @ai-sdk/openai-compatible@3.0.59
|
|
20
|
+
- @ai-sdk/provider-utils@5.0.51
|
|
21
|
+
|
|
3
22
|
## 3.0.29
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,62 +1,67 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FetchFunction } from
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { LanguageModelV4, ProviderV4 } from "@ai-sdk/provider";
|
|
2
|
+
import { FetchFunction } from "@ai-sdk/provider-utils";
|
|
3
|
+
import "@ai-sdk/openai-compatible";
|
|
4
|
+
import { z } from "zod/v4";
|
|
5
|
+
//#region src/gmicloud-chat-options.d.ts
|
|
5
6
|
type GmicloudChatModelId = 'deepseek-ai/DeepSeek-V4-Flash-0731' | 'Qwen/Qwen3.8-Max' | 'moonshotai/kimi-k3' | 'zai-org/GLM-5.2-FP8' | 'MiniMaxAI/MiniMax-M3' | (string & {});
|
|
6
|
-
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region src/gmicloud-provider.d.ts
|
|
7
9
|
interface GmicloudProviderSettings {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
10
|
+
/**
|
|
11
|
+
* GMI Cloud API key. Defaults to the `GMI_CLOUD_APIKEY` environment
|
|
12
|
+
* variable (matching GMI's own SDK package).
|
|
13
|
+
*/
|
|
14
|
+
apiKey?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Base URL for the API calls. Defaults to
|
|
17
|
+
* `https://api.gmi-serving.com/v1`.
|
|
18
|
+
*/
|
|
19
|
+
baseURL?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Custom headers to include in the requests.
|
|
22
|
+
*/
|
|
23
|
+
headers?: Record<string, string>;
|
|
24
|
+
/**
|
|
25
|
+
* Custom fetch implementation. You can use it as a middleware to intercept
|
|
26
|
+
* requests, or to provide a custom fetch implementation for e.g. testing.
|
|
27
|
+
*/
|
|
28
|
+
fetch?: FetchFunction;
|
|
27
29
|
}
|
|
28
30
|
interface GmicloudProvider extends ProviderV4 {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
31
|
+
/**
|
|
32
|
+
* Creates a GMI Cloud model for text generation.
|
|
33
|
+
*/
|
|
34
|
+
(modelId: GmicloudChatModelId): LanguageModelV4;
|
|
35
|
+
/**
|
|
36
|
+
* Creates a GMI Cloud model for text generation.
|
|
37
|
+
*/
|
|
38
|
+
languageModel(modelId: GmicloudChatModelId): LanguageModelV4;
|
|
39
|
+
/**
|
|
40
|
+
* Creates a GMI Cloud chat model for text generation.
|
|
41
|
+
*/
|
|
42
|
+
chat(modelId: GmicloudChatModelId): LanguageModelV4;
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated Use `embeddingModel` instead.
|
|
45
|
+
*/
|
|
46
|
+
textEmbeddingModel(modelId: string): never;
|
|
45
47
|
}
|
|
46
|
-
declare function createGmicloud(options?: GmicloudProviderSettings): GmicloudProvider;
|
|
47
|
-
declare const gmicloud: GmicloudProvider;
|
|
48
|
-
|
|
48
|
+
export declare function createGmicloud(options?: GmicloudProviderSettings): GmicloudProvider;
|
|
49
|
+
export declare const gmicloud: GmicloudProvider;
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/gmicloud-error.d.ts
|
|
49
52
|
declare const gmicloudErrorDataSchema: z.ZodObject<{
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
error: z.ZodObject<{
|
|
54
|
+
message: z.ZodString;
|
|
55
|
+
type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
56
|
+
param: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
57
|
+
code: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
58
|
+
details: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
59
|
+
}, z.core.$strip>;
|
|
57
60
|
}, z.core.$strip>;
|
|
58
61
|
type GmicloudErrorData = z.infer<typeof gmicloudErrorDataSchema>;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/version.d.ts
|
|
64
|
+
export declare const VERSION: string;
|
|
65
|
+
//#endregion
|
|
66
|
+
export type { GmicloudErrorData, GmicloudProvider, GmicloudProviderSettings };
|
|
67
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/gmicloud-chat-options.ts","../src/gmicloud-provider.ts","../src/gmicloud-error.ts","../src/version.ts"],"mappings":";;;;;KACY;;;UCeK;;;;;EAKf;;;;;EAKA;;;;EAIA,UAAU;;;;;EAKV,QAAQ;;UAGO,yBAAyB;;;;GAIvC,SAAS,sBAAsB;;;;EAKhC,cAAc,SAAS,sBAAsB;;;;EAK7C,KAAK,SAAS,sBAAsB;;;;EAKpC,mBAAmB;;wBAGL,eACd,UAAS,2BACR;qBA8CU,UAAQ;;;cCxGR,yBAAuB,EAAA;;;;;;;;GAQlC,EAAA,KAAA;KAEU,oBAAoB,EAAE,aAAa;;;qBCZlC"}
|
package/dist/index.js
CHANGED
|
@@ -1,108 +1,95 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
NoSuchModelError
|
|
4
|
-
} from "@ai-sdk/provider";
|
|
5
|
-
import {
|
|
6
|
-
loadApiKey,
|
|
7
|
-
withoutTrailingSlash,
|
|
8
|
-
withUserAgentSuffix
|
|
9
|
-
} from "@ai-sdk/provider-utils";
|
|
10
|
-
|
|
11
|
-
// src/gmicloud-chat-language-model.ts
|
|
1
|
+
import { NoSuchModelError } from "@ai-sdk/provider";
|
|
2
|
+
import { WORKFLOW_DESERIALIZE, WORKFLOW_SERIALIZE, loadApiKey, secureJsonParse, serializeModelOptions, withUserAgentSuffix, withoutTrailingSlash } from "@ai-sdk/provider-utils";
|
|
12
3
|
import { OpenAICompatibleChatLanguageModel } from "@ai-sdk/openai-compatible";
|
|
13
|
-
import {
|
|
14
|
-
serializeModelOptions,
|
|
15
|
-
WORKFLOW_DESERIALIZE,
|
|
16
|
-
WORKFLOW_SERIALIZE
|
|
17
|
-
} from "@ai-sdk/provider-utils";
|
|
18
|
-
var GmicloudChatLanguageModel = class _GmicloudChatLanguageModel extends OpenAICompatibleChatLanguageModel {
|
|
19
|
-
static [WORKFLOW_SERIALIZE](model) {
|
|
20
|
-
return serializeModelOptions({
|
|
21
|
-
modelId: model.modelId,
|
|
22
|
-
config: model.config
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
static [WORKFLOW_DESERIALIZE](options) {
|
|
26
|
-
return new _GmicloudChatLanguageModel(options.modelId, options.config);
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
// src/gmicloud-error.ts
|
|
31
|
-
import { secureJsonParse } from "@ai-sdk/provider-utils";
|
|
32
4
|
import { z } from "zod/v4";
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
5
|
+
//#region src/gmicloud-chat-language-model.ts
|
|
6
|
+
/**
|
|
7
|
+
* GMI Cloud chat completions over the OpenAI-compatible protocol. The only
|
|
8
|
+
* customization is the error structure (see ./gmicloud-error.ts): GMI's edge
|
|
9
|
+
* nests the backend engine's diagnostic in `error.details`, which the default
|
|
10
|
+
* OpenAI-compatible error handling drops.
|
|
11
|
+
*/
|
|
12
|
+
var GmicloudChatLanguageModel = class GmicloudChatLanguageModel extends OpenAICompatibleChatLanguageModel {
|
|
13
|
+
static [WORKFLOW_SERIALIZE](model) {
|
|
14
|
+
return serializeModelOptions({
|
|
15
|
+
modelId: model.modelId,
|
|
16
|
+
config: model.config
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
static [WORKFLOW_DESERIALIZE](options) {
|
|
20
|
+
return new GmicloudChatLanguageModel(options.modelId, options.config);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/gmicloud-error.ts
|
|
25
|
+
const gmicloudErrorDataSchema = z.object({ error: z.object({
|
|
26
|
+
message: z.string(),
|
|
27
|
+
type: z.string().nullish(),
|
|
28
|
+
param: z.any().nullish(),
|
|
29
|
+
code: z.union([z.string(), z.number()]).nullish(),
|
|
30
|
+
details: z.string().nullish()
|
|
31
|
+
}) });
|
|
42
32
|
function unwrapDetailsMessage(details) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const message = parsed?.error?.message;
|
|
53
|
-
return typeof message === "string" && message.trim() !== "" ? message : void 0;
|
|
33
|
+
if (details == null || details === "") return;
|
|
34
|
+
let parsed;
|
|
35
|
+
try {
|
|
36
|
+
parsed = secureJsonParse(details);
|
|
37
|
+
} catch {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const message = parsed?.error?.message;
|
|
41
|
+
return typeof message === "string" && message.trim() !== "" ? message : void 0;
|
|
54
42
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
43
|
+
const gmicloudErrorStructure = {
|
|
44
|
+
errorSchema: gmicloudErrorDataSchema,
|
|
45
|
+
errorToMessage: (data) => unwrapDetailsMessage(data.error.details) ?? data.error.message
|
|
58
46
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region src/version.ts
|
|
49
|
+
const VERSION = "3.0.31";
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/gmicloud-provider.ts
|
|
64
52
|
function createGmicloud(options = {}) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
53
|
+
const baseURL = withoutTrailingSlash(options.baseURL ?? "https://api.gmi-serving.com/v1");
|
|
54
|
+
const getHeaders = () => withUserAgentSuffix({
|
|
55
|
+
Authorization: `Bearer ${loadApiKey({
|
|
56
|
+
apiKey: options.apiKey,
|
|
57
|
+
environmentVariableName: "GMI_CLOUD_APIKEY",
|
|
58
|
+
description: "GMI Cloud API key"
|
|
59
|
+
})}`,
|
|
60
|
+
...options.headers
|
|
61
|
+
}, `ai-sdk-gmicloud/${VERSION}`);
|
|
62
|
+
const createLanguageModel = (modelId) => {
|
|
63
|
+
return new GmicloudChatLanguageModel(modelId, {
|
|
64
|
+
provider: `gmicloud.chat`,
|
|
65
|
+
url: ({ path }) => `${baseURL}${path}`,
|
|
66
|
+
headers: getHeaders,
|
|
67
|
+
fetch: options.fetch,
|
|
68
|
+
errorStructure: gmicloudErrorStructure,
|
|
69
|
+
includeUsage: true
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
const provider = (modelId) => createLanguageModel(modelId);
|
|
73
|
+
provider.specificationVersion = "v4";
|
|
74
|
+
provider.languageModel = createLanguageModel;
|
|
75
|
+
provider.chat = createLanguageModel;
|
|
76
|
+
provider.embeddingModel = (modelId) => {
|
|
77
|
+
throw new NoSuchModelError({
|
|
78
|
+
modelId,
|
|
79
|
+
modelType: "embeddingModel"
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
provider.textEmbeddingModel = provider.embeddingModel;
|
|
83
|
+
provider.imageModel = (modelId) => {
|
|
84
|
+
throw new NoSuchModelError({
|
|
85
|
+
modelId,
|
|
86
|
+
modelType: "imageModel"
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
return provider;
|
|
101
90
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
gmicloud
|
|
107
|
-
};
|
|
91
|
+
const gmicloud = createGmicloud();
|
|
92
|
+
//#endregion
|
|
93
|
+
export { VERSION, createGmicloud, gmicloud };
|
|
94
|
+
|
|
108
95
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/gmicloud-chat-language-model.ts","../src/gmicloud-error.ts","../src/version.ts","../src/gmicloud-provider.ts"],"sourcesContent":["import { OpenAICompatibleChatLanguageModel } from '@ai-sdk/openai-compatible';\nimport type { LanguageModelV4 } from '@ai-sdk/provider';\nimport {\n serializeModelOptions,\n WORKFLOW_DESERIALIZE,\n WORKFLOW_SERIALIZE,\n} from '@ai-sdk/provider-utils';\nimport type { GmicloudChatModelId } from './gmicloud-chat-language-model-options';\n\ntype GmicloudChatConfig = ConstructorParameters<\n typeof OpenAICompatibleChatLanguageModel\n>[1];\n\n/**\n * GMI Cloud chat completions over the OpenAI-compatible protocol. The only\n * customization is the error structure (see ./gmicloud-error.ts): GMI's edge\n * nests the backend engine's diagnostic in `error.details`, which the default\n * OpenAI-compatible error handling drops.\n */\nexport class GmicloudChatLanguageModel\n extends OpenAICompatibleChatLanguageModel\n implements LanguageModelV4\n{\n static [WORKFLOW_SERIALIZE](model: GmicloudChatLanguageModel) {\n return serializeModelOptions({\n modelId: model.modelId,\n config: model.config,\n });\n }\n\n static [WORKFLOW_DESERIALIZE](options: {\n modelId: GmicloudChatModelId;\n config: GmicloudChatConfig;\n }) {\n return new GmicloudChatLanguageModel(options.modelId, options.config);\n }\n}\n","import type { ProviderErrorStructure } from '@ai-sdk/openai-compatible';\nimport { secureJsonParse } from '@ai-sdk/provider-utils';\nimport { z } from 'zod/v4';\n\nexport const gmicloudErrorDataSchema = z.object({\n error: z.object({\n message: z.string(),\n type: z.string().nullish(),\n param: z.any().nullish(),\n code: z.union([z.string(), z.number()]).nullish(),\n details: z.string().nullish(),\n }),\n});\n\nexport type GmicloudErrorData = z.infer<typeof gmicloudErrorDataSchema>;\n\nfunction unwrapDetailsMessage(details: string | null | undefined) {\n if (details == null || details === '') {\n return undefined;\n }\n let parsed: unknown;\n try {\n parsed = secureJsonParse(details);\n } catch {\n return undefined;\n }\n const message = (parsed as { error?: { message?: unknown } })?.error?.message;\n return typeof message === 'string' && message.trim() !== ''\n ? message\n : undefined;\n}\n\nexport const gmicloudErrorStructure: ProviderErrorStructure<GmicloudErrorData> =\n {\n errorSchema: gmicloudErrorDataSchema,\n errorToMessage: data =>\n unwrapDetailsMessage(data.error.details) ?? data.error.message,\n };\n","// Version string of this package injected at build time.\ndeclare const __PACKAGE_VERSION__: string | undefined;\nexport const VERSION: string =\n typeof __PACKAGE_VERSION__ !== 'undefined'\n ? __PACKAGE_VERSION__\n : '0.0.0-test';\n","import {\n NoSuchModelError,\n type LanguageModelV4,\n type ProviderV4,\n} from '@ai-sdk/provider';\nimport {\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix,\n type FetchFunction,\n} from '@ai-sdk/provider-utils';\nimport { GmicloudChatLanguageModel } from './gmicloud-chat-language-model';\nimport type { GmicloudChatModelId } from './gmicloud-chat-options';\nimport { gmicloudErrorStructure } from './gmicloud-error';\nimport { VERSION } from './version';\n\nexport interface GmicloudProviderSettings {\n /**\n * GMI Cloud API key. Defaults to the `GMI_CLOUD_APIKEY` environment\n * variable (matching GMI's own SDK package).\n */\n apiKey?: string;\n /**\n * Base URL for the API calls. Defaults to\n * `https://api.gmi-serving.com/v1`.\n */\n baseURL?: string;\n /**\n * Custom headers to include in the requests.\n */\n headers?: Record<string, string>;\n /**\n * Custom fetch implementation. You can use it as a middleware to intercept\n * requests, or to provide a custom fetch implementation for e.g. testing.\n */\n fetch?: FetchFunction;\n}\n\nexport interface GmicloudProvider extends ProviderV4 {\n /**\n * Creates a GMI Cloud model for text generation.\n */\n (modelId: GmicloudChatModelId): LanguageModelV4;\n\n /**\n * Creates a GMI Cloud model for text generation.\n */\n languageModel(modelId: GmicloudChatModelId): LanguageModelV4;\n\n /**\n * Creates a GMI Cloud chat model for text generation.\n */\n chat(modelId: GmicloudChatModelId): LanguageModelV4;\n\n /**\n * @deprecated Use `embeddingModel` instead.\n */\n textEmbeddingModel(modelId: string): never;\n}\n\nexport function createGmicloud(\n options: GmicloudProviderSettings = {},\n): GmicloudProvider {\n const baseURL = withoutTrailingSlash(\n options.baseURL ?? 'https://api.gmi-serving.com/v1',\n );\n const getHeaders = () =>\n withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: 'GMI_CLOUD_APIKEY',\n description: 'GMI Cloud API key',\n })}`,\n ...options.headers,\n },\n `ai-sdk-gmicloud/${VERSION}`,\n );\n\n const createLanguageModel = (modelId: GmicloudChatModelId) => {\n return new GmicloudChatLanguageModel(modelId, {\n provider: `gmicloud.chat`,\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch,\n errorStructure: gmicloudErrorStructure,\n includeUsage: true,\n });\n };\n\n const provider = (modelId: GmicloudChatModelId) =>\n createLanguageModel(modelId);\n\n provider.specificationVersion = 'v4' as const;\n provider.languageModel = createLanguageModel;\n provider.chat = createLanguageModel;\n\n provider.embeddingModel = (modelId: string) => {\n throw new NoSuchModelError({ modelId, modelType: 'embeddingModel' });\n };\n provider.textEmbeddingModel = provider.embeddingModel;\n provider.imageModel = (modelId: string) => {\n throw new NoSuchModelError({ modelId, modelType: 'imageModel' });\n };\n\n return provider;\n}\n\nexport const gmicloud = createGmicloud();\n"],"mappings":";;;;;;;;;;;AAmBA,IAAa,4BAAb,MAAa,kCACH,kCAEV;CACE,QAAQ,oBAAoB,OAAkC;EAC5D,OAAO,sBAAsB;GAC3B,SAAS,MAAM;GACf,QAAQ,MAAM;EAChB,CAAC;CACH;CAEA,QAAQ,sBAAsB,SAG3B;EACD,OAAO,IAAI,0BAA0B,QAAQ,SAAS,QAAQ,MAAM;CACtE;AACF;;;AChCA,MAAa,0BAA0B,EAAE,OAAO,EAC9C,OAAO,EAAE,OAAO;CACd,SAAS,EAAE,OAAO;CAClB,MAAM,EAAE,OAAO,CAAC,CAAC,QAAQ;CACzB,OAAO,EAAE,IAAI,CAAC,CAAC,QAAQ;CACvB,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ;CAChD,SAAS,EAAE,OAAO,CAAC,CAAC,QAAQ;AAC9B,CAAC,EACH,CAAC;AAID,SAAS,qBAAqB,SAAoC;CAChE,IAAI,WAAW,QAAQ,YAAY,IACjC;CAEF,IAAI;CACJ,IAAI;EACF,SAAS,gBAAgB,OAAO;CAClC,QAAQ;EACN;CACF;CACA,MAAM,UAAW,QAA8C,OAAO;CACtE,OAAO,OAAO,YAAY,YAAY,QAAQ,KAAK,MAAM,KACrD,UACA,KAAA;AACN;AAEA,MAAa,yBACX;CACE,aAAa;CACb,iBAAgB,SACd,qBAAqB,KAAK,MAAM,OAAO,KAAK,KAAK,MAAM;AAC3D;;;ACnCF,MAAa,UAAA;;;AC0Db,SAAgB,eACd,UAAoC,CAAC,GACnB;CAClB,MAAM,UAAU,qBACd,QAAQ,WAAW,gCACrB;CACA,MAAM,mBACJ,oBACE;EACE,eAAe,UAAU,WAAW;GAClC,QAAQ,QAAQ;GAChB,yBAAyB;GACzB,aAAa;EACf,CAAC;EACD,GAAG,QAAQ;CACb,GACA,mBAAmB,SACrB;CAEF,MAAM,uBAAuB,YAAiC;EAC5D,OAAO,IAAI,0BAA0B,SAAS;GAC5C,UAAU;GACV,MAAM,EAAE,WAAW,GAAG,UAAU;GAChC,SAAS;GACT,OAAO,QAAQ;GACf,gBAAgB;GAChB,cAAc;EAChB,CAAC;CACH;CAEA,MAAM,YAAY,YAChB,oBAAoB,OAAO;CAE7B,SAAS,uBAAuB;CAChC,SAAS,gBAAgB;CACzB,SAAS,OAAO;CAEhB,SAAS,kBAAkB,YAAoB;EAC7C,MAAM,IAAI,iBAAiB;GAAE;GAAS,WAAW;EAAiB,CAAC;CACrE;CACA,SAAS,qBAAqB,SAAS;CACvC,SAAS,cAAc,YAAoB;EACzC,MAAM,IAAI,iBAAiB;GAAE;GAAS,WAAW;EAAa,CAAC;CACjE;CAEA,OAAO;AACT;AAEA,MAAa,WAAW,eAAe"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/gmicloud",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.31",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@ai-sdk/openai-compatible": "3.0.
|
|
33
|
-
"@ai-sdk/provider": "4.0.
|
|
34
|
-
"@ai-sdk/provider-utils": "5.0.
|
|
32
|
+
"@ai-sdk/openai-compatible": "3.0.60",
|
|
33
|
+
"@ai-sdk/provider": "4.0.20",
|
|
34
|
+
"@ai-sdk/provider-utils": "5.0.52"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "22.19.19",
|
|
38
38
|
"@vercel/ai-tsconfig": "0.0.0",
|
|
39
|
-
"
|
|
39
|
+
"tsdown": "^0.23.0",
|
|
40
40
|
"typescript": "5.8.3",
|
|
41
41
|
"zod": "3.25.76"
|
|
42
42
|
},
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
],
|
|
65
65
|
"description": "The **GMI Cloud provider** for the [AI SDK](https://ai-sdk.dev/docs) contains language model support for [GMI Cloud](https://www.gmicloud.ai), offering GPU inference for open-weight models over an OpenAI-compatible API.",
|
|
66
66
|
"scripts": {
|
|
67
|
-
"build": "pnpm clean &&
|
|
68
|
-
"build:watch": "pnpm clean &&
|
|
69
|
-
"clean": "del-cli
|
|
67
|
+
"build": "pnpm clean && tsdown",
|
|
68
|
+
"build:watch": "pnpm clean && tsdown --watch",
|
|
69
|
+
"clean": "del-cli docs *.tsbuildinfo",
|
|
70
70
|
"type-check": "tsc --build",
|
|
71
71
|
"test": "pnpm test:node && pnpm test:edge",
|
|
72
72
|
"test:update": "pnpm test:node -u",
|