@ai-sdk/fireworks 3.0.77 → 3.0.78

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,15 @@
1
1
  # @ai-sdk/fireworks
2
2
 
3
+ ## 3.0.78
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
+
3
13
  ## 3.0.77
4
14
 
5
15
  ### Patch Changes
package/dist/index.js CHANGED
@@ -286,7 +286,7 @@ var FireworksImageModel = class FireworksImageModel {
286
286
  };
287
287
  //#endregion
288
288
  //#region src/version.ts
289
- const VERSION = "3.0.77";
289
+ const VERSION = "3.0.78";
290
290
  //#endregion
291
291
  //#region src/fireworks-provider.ts
292
292
  const fireworksErrorStructure = {
@@ -1,17 +1,64 @@
1
1
  ---
2
2
  title: Fireworks
3
- description: Learn how to use Fireworks models with the AI SDK.
3
+ description: Learn how to use Fireworks with AI Gateway and the direct provider.
4
4
  ---
5
5
 
6
6
  # Fireworks Provider
7
7
 
8
8
  [Fireworks](https://fireworks.ai/) is a platform for running and testing LLMs through their [API](https://readme.fireworks.ai/).
9
+ Start with [AI Gateway](/providers/ai-sdk-providers/ai-gateway) for models in its catalog (recommended), or use `@ai-sdk/fireworks` to connect directly to Fireworks.
9
10
 
10
- ## Setup
11
+ ```ts provider="fireworks" model="openai/gpt-oss-120b"
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`:
27
+
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
+ ```
35
+
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.
38
+
39
+ The example sets `providerOptions.gateway.order` to `['fireworks']`. This sends the request to Fireworks first, then falls back to other available providers of the same model if Fireworks is unavailable or the request fails. `order` sets a preference; it does not restrict fallback to Fireworks. See [provider ordering](https://vercel.com/docs/ai-gateway/models-and-providers/provider-filtering-and-ordering).
40
+
41
+ The dropdown lists models served by Fireworks 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/fireworks`
44
+
45
+ For direct access to Fireworks, install `ai` and `@ai-sdk/fireworks`:
11
46
 
12
- The Fireworks provider is available via the `@ai-sdk/fireworks` module. You can install it with
47
+ <InstallPackages packages="ai @ai-sdk/fireworks" />
13
48
 
14
- <InstallPackages packages="@ai-sdk/fireworks" />
49
+ Set your Fireworks API credential in the `FIREWORKS_API_KEY` environment variable:
50
+
51
+ ```bash
52
+ export FIREWORKS_API_KEY=your_api_key_here
53
+ ```
54
+
55
+ AI Gateway does not expose every API in `@ai-sdk/fireworks`. Use the direct provider for provider-specific APIs or custom connection settings.
56
+
57
+ <Note>
58
+ The following sections document the direct `@ai-sdk/fireworks` provider,
59
+ including its model factories and settings. Gateway model and feature
60
+ availability can differ.
61
+ </Note>
15
62
 
16
63
  ## Provider Instance
17
64
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/fireworks",
3
- "version": "3.0.77",
3
+ "version": "3.0.78",
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.74",
32
+ "@ai-sdk/openai-compatible": "3.0.75",
33
33
  "@ai-sdk/provider": "4.0.31",
34
- "@ai-sdk/provider-utils": "5.0.64"
34
+ "@ai-sdk/provider-utils": "5.0.65"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@ai-sdk/test-server": "2.0.4",