@ai-sdk/gmicloud 3.0.44 → 3.0.46

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 CHANGED
@@ -1,5 +1,25 @@
1
1
  # @ai-sdk/gmicloud
2
2
 
3
+ ## 3.0.46
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [b089ce8]
8
+ - Updated dependencies [39a776b]
9
+ - Updated dependencies [e619655]
10
+ - @ai-sdk/provider-utils@5.0.65
11
+ - @ai-sdk/openai-compatible@3.0.75
12
+
13
+ ## 3.0.45
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [0c2a9de]
18
+ - Updated dependencies [200c47f]
19
+ - @ai-sdk/provider@4.0.31
20
+ - @ai-sdk/provider-utils@5.0.64
21
+ - @ai-sdk/openai-compatible@3.0.74
22
+
3
23
  ## 3.0.44
4
24
 
5
25
  ### Patch Changes
package/dist/index.js CHANGED
@@ -46,7 +46,7 @@ const gmicloudErrorStructure = {
46
46
  };
47
47
  //#endregion
48
48
  //#region src/version.ts
49
- const VERSION = "3.0.44";
49
+ const VERSION = "3.0.46";
50
50
  //#endregion
51
51
  //#region src/gmicloud-provider.ts
52
52
  function createGmicloud(options = {}) {
@@ -1,19 +1,66 @@
1
1
  ---
2
2
  title: GMI Cloud
3
- description: Learn how to use GMI Cloud's models with the AI SDK.
3
+ description: Learn how to use GMI Cloud with AI Gateway and the direct provider.
4
4
  ---
5
5
 
6
6
  # GMI Cloud Provider
7
7
 
8
8
  The [GMI Cloud](https://www.gmicloud.ai) provider offers access to open-weight language models through GMI Cloud's GPU inference platform, over an OpenAI-compatible API.
9
+ Start with [AI Gateway](/providers/ai-sdk-providers/ai-gateway) for models in its catalog (recommended), or use `@ai-sdk/gmicloud` to connect directly to GMI Cloud.
9
10
 
10
- API keys can be obtained from the [GMI Cloud console](https://console.gmicloud.ai).
11
+ ```ts provider="gmicloud" model="deepseek/deepseek-v4-flash-0731"
12
+ import { generateText } from 'ai';
13
+ __PROVIDER_IMPORT__;
14
+
15
+ const { text } = await generateText({
16
+ model: __MODEL__,
17
+ prompt: 'Write a vegetarian lasagna recipe for 4 people.',
18
+ __GATEWAY_OPTIONS__,
19
+ });
20
+
21
+ console.log(text);
22
+ ```
23
+
24
+ ## Using AI Gateway
25
+
26
+ The AI SDK uses AI Gateway by default for model strings. Gateway provides access to models across providers through a single API key, with usage and cost tracking. Install `ai`:
11
27
 
12
- ## Setup
28
+ <InstallPackages packages="ai" />
29
+
30
+ Set an [AI Gateway API key](https://vercel.com/docs/ai-gateway/getting-started) in your environment:
31
+
32
+ ```bash
33
+ export AI_GATEWAY_API_KEY=your_api_key_here
34
+ ```
13
35
 
14
- The GMI Cloud provider is available via the `@ai-sdk/gmicloud` module. You can install it with:
36
+ Vercel deployments can also use [OIDC authentication](/providers/ai-sdk-providers/ai-gateway#oidc-authentication-vercel-deployments).
37
+ See the [AI Gateway provider documentation](/providers/ai-sdk-providers/ai-gateway) for configuration and the [model catalog](https://vercel.com/ai-gateway/models) for available models.
15
38
 
16
- <InstallPackages packages="@ai-sdk/gmicloud" />
39
+ The example sets `providerOptions.gateway.order` to `['gmicloud']`. This sends the request to GMI Cloud first, then falls back to other available providers of the same model if GMI Cloud is unavailable or the request fails. `order` sets a preference; it does not restrict fallback to GMI Cloud. See [provider ordering](https://vercel.com/docs/ai-gateway/models-and-providers/provider-filtering-and-ordering).
40
+
41
+ The dropdown lists models served by GMI Cloud through Gateway with a corresponding direct-provider example. Provider availability depends on the model and your team's [Provider Allowlist](https://vercel.com/docs/ai-gateway/models-and-providers/provider-filtering-and-ordering).
42
+
43
+ ## Using `@ai-sdk/gmicloud`
44
+
45
+ For direct access to GMI Cloud, install `ai` and `@ai-sdk/gmicloud`:
46
+
47
+ <InstallPackages packages="ai @ai-sdk/gmicloud" />
48
+
49
+ Set your GMI Cloud API credential in the `GMI_CLOUD_APIKEY` environment variable:
50
+
51
+ ```bash
52
+ export GMI_CLOUD_APIKEY=your_api_key_here
53
+ ```
54
+
55
+ AI Gateway does not expose every API in `@ai-sdk/gmicloud`. Use the direct provider for provider-specific APIs or custom connection settings.
56
+
57
+ <Note>
58
+ The following sections document the direct `@ai-sdk/gmicloud` provider,
59
+ including its model factories and settings. Gateway model and feature
60
+ availability can differ.
61
+ </Note>
62
+
63
+ API keys can be obtained from the [GMI Cloud console](https://console.gmicloud.ai).
17
64
 
18
65
  ## Provider Instance
19
66
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/gmicloud",
3
- "version": "3.0.44",
3
+ "version": "3.0.46",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -29,9 +29,9 @@
29
29
  }
30
30
  },
31
31
  "dependencies": {
32
- "@ai-sdk/openai-compatible": "3.0.73",
33
- "@ai-sdk/provider": "4.0.30",
34
- "@ai-sdk/provider-utils": "5.0.63"
32
+ "@ai-sdk/openai-compatible": "3.0.75",
33
+ "@ai-sdk/provider": "4.0.31",
34
+ "@ai-sdk/provider-utils": "5.0.65"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "22.19.19",