@ai-sdk/fireworks 3.0.62 → 3.0.64

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/fireworks
2
2
 
3
+ ## 3.0.64
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [8c65988]
8
+ - Updated dependencies [527a163]
9
+ - @ai-sdk/provider@4.0.21
10
+ - @ai-sdk/provider-utils@5.0.53
11
+ - @ai-sdk/openai-compatible@3.0.61
12
+
13
+ ## 3.0.63
14
+
15
+ ### Patch Changes
16
+
17
+ - ede5b89: chore: migrate package builds from tsup to tsdown
18
+ - Updated dependencies [ede5b89]
19
+ - @ai-sdk/openai-compatible@3.0.60
20
+ - @ai-sdk/provider@4.0.20
21
+ - @ai-sdk/provider-utils@5.0.52
22
+
3
23
  ## 3.0.62
4
24
 
5
25
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1,167 +1,173 @@
1
- import { z } from 'zod/v4';
2
- import * as _ai_sdk_provider from '@ai-sdk/provider';
3
- import { ImageModelV4, ProviderV4, LanguageModelV4, EmbeddingModelV4 } from '@ai-sdk/provider';
4
- import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
5
- import { WORKFLOW_SERIALIZE, WORKFLOW_DESERIALIZE, FetchFunction, InferSchema } from '@ai-sdk/provider-utils';
6
-
1
+ import { FetchFunction, InferSchema, WORKFLOW_DESERIALIZE, WORKFLOW_SERIALIZE } from "@ai-sdk/provider-utils";
2
+ import { z } from "zod/v4";
3
+ import { EmbeddingModelV4, ImageModelV4, LanguageModelV4, ProviderV4 } from "@ai-sdk/provider";
4
+ //#region src/fireworks-chat-options.d.ts
7
5
  type FireworksChatModelId = 'accounts/fireworks/models/deepseek-v3' | 'accounts/fireworks/models/llama-v3p3-70b-instruct' | 'accounts/fireworks/models/llama-v3p2-3b-instruct' | 'accounts/fireworks/models/llama-v3p1-405b-instruct' | 'accounts/fireworks/models/llama-v3p1-8b-instruct' | 'accounts/fireworks/models/mixtral-8x7b-instruct' | 'accounts/fireworks/models/mixtral-8x22b-instruct' | 'accounts/fireworks/models/mixtral-8x7b-instruct-hf' | 'accounts/fireworks/models/qwen2p5-coder-32b-instruct' | 'accounts/fireworks/models/qwen2p5-72b-instruct' | 'accounts/fireworks/models/qwen-qwq-32b-preview' | 'accounts/fireworks/models/qwen2-vl-72b-instruct' | 'accounts/fireworks/models/llama-v3p2-11b-vision-instruct' | 'accounts/fireworks/models/qwq-32b' | 'accounts/fireworks/models/yi-large' | 'accounts/fireworks/models/kimi-k2-instruct' | 'accounts/fireworks/models/kimi-k2-thinking' | 'accounts/fireworks/models/kimi-k2p6' | 'accounts/fireworks/models/minimax-m2' | (string & {});
8
6
  declare const fireworksLanguageModelOptions: z.ZodObject<{
9
- promptCacheKey: z.ZodOptional<z.ZodString>;
10
- serviceTier: z.ZodOptional<z.ZodEnum<{
11
- priority: "priority";
12
- }>>;
13
- thinking: z.ZodOptional<z.ZodObject<{
14
- type: z.ZodOptional<z.ZodEnum<{
15
- enabled: "enabled";
16
- disabled: "disabled";
17
- }>>;
18
- budgetTokens: z.ZodOptional<z.ZodNumber>;
19
- }, z.core.$strip>>;
20
- reasoningHistory: z.ZodOptional<z.ZodEnum<{
21
- disabled: "disabled";
22
- interleaved: "interleaved";
23
- preserved: "preserved";
7
+ promptCacheKey: z.ZodOptional<z.ZodString>;
8
+ serviceTier: z.ZodOptional<z.ZodEnum<{
9
+ priority: "priority";
10
+ }>>;
11
+ thinking: z.ZodOptional<z.ZodObject<{
12
+ type: z.ZodOptional<z.ZodEnum<{
13
+ enabled: "enabled";
14
+ disabled: "disabled";
24
15
  }>>;
16
+ budgetTokens: z.ZodOptional<z.ZodNumber>;
17
+ }, z.core.$strip>>;
18
+ reasoningHistory: z.ZodOptional<z.ZodEnum<{
19
+ disabled: "disabled";
20
+ interleaved: "interleaved";
21
+ preserved: "preserved";
22
+ }>>;
25
23
  }, z.core.$strip>;
26
24
  type FireworksLanguageModelOptions = z.infer<typeof fireworksLanguageModelOptions>;
27
-
25
+ //#endregion
26
+ //#region src/fireworks-embedding-options.d.ts
28
27
  type FireworksEmbeddingModelId = 'nomic-ai/nomic-embed-text-v1.5' | (string & {});
29
28
  declare const fireworksEmbeddingModelOptions: z.ZodObject<{}, z.core.$strip>;
30
29
  type FireworksEmbeddingModelOptions = z.infer<typeof fireworksEmbeddingModelOptions>;
31
-
30
+ //#endregion
31
+ //#region src/fireworks-image-options.d.ts
32
32
  type FireworksImageModelId = 'accounts/fireworks/models/flux-1-dev-fp8' | 'accounts/fireworks/models/flux-1-schnell-fp8' | 'accounts/fireworks/models/flux-kontext-pro' | 'accounts/fireworks/models/flux-kontext-max' | 'accounts/fireworks/models/playground-v2-5-1024px-aesthetic' | 'accounts/fireworks/models/japanese-stable-diffusion-xl' | 'accounts/fireworks/models/playground-v2-1024px-aesthetic' | 'accounts/fireworks/models/SSD-1B' | 'accounts/fireworks/models/stable-diffusion-xl-1024-v1-0' | (string & {});
33
-
33
+ //#endregion
34
+ //#region src/fireworks-image-model.d.ts
34
35
  interface FireworksImageModelConfig {
35
- provider: string;
36
- baseURL: string;
37
- headers?: () => Record<string, string>;
38
- fetch?: FetchFunction;
39
- /**
40
- * Poll interval in milliseconds between status checks for async models.
41
- * Defaults to 500ms.
42
- */
43
- pollIntervalMillis?: number;
44
- /**
45
- * Overall timeout in milliseconds for polling before giving up.
46
- * Defaults to 120000ms (2 minutes).
47
- */
48
- pollTimeoutMillis?: number;
49
- _internal?: {
50
- currentDate?: () => Date;
51
- };
36
+ provider: string;
37
+ baseURL: string;
38
+ headers?: () => Record<string, string>;
39
+ fetch?: FetchFunction;
40
+ /**
41
+ * Poll interval in milliseconds between status checks for async models.
42
+ * Defaults to 500ms.
43
+ */
44
+ pollIntervalMillis?: number;
45
+ /**
46
+ * Overall timeout in milliseconds for polling before giving up.
47
+ * Defaults to 120000ms (2 minutes).
48
+ */
49
+ pollTimeoutMillis?: number;
50
+ _internal?: {
51
+ currentDate?: () => Date;
52
+ };
52
53
  }
53
- declare class FireworksImageModel implements ImageModelV4 {
54
- readonly modelId: FireworksImageModelId;
55
- private config;
56
- readonly specificationVersion = "v4";
57
- readonly maxImagesPerCall = 1;
58
- get supportsFileInputs(): boolean | undefined;
59
- get supportsMaskInputs(): boolean | undefined;
60
- get provider(): string;
61
- static [WORKFLOW_SERIALIZE](model: FireworksImageModel): {
62
- modelId: string;
63
- config: _ai_sdk_provider.JSONObject;
64
- };
65
- static [WORKFLOW_DESERIALIZE](options: {
66
- modelId: FireworksImageModelId;
67
- config: FireworksImageModelConfig;
68
- }): FireworksImageModel;
69
- constructor(modelId: FireworksImageModelId, config: FireworksImageModelConfig);
70
- doGenerate({ prompt, n, size, aspectRatio, seed, providerOptions, headers, abortSignal, files, mask, }: Parameters<ImageModelV4['doGenerate']>[0]): Promise<Awaited<ReturnType<ImageModelV4['doGenerate']>>>;
71
- /**
72
- * Handles async image generation for models like flux-kontext-* that return
73
- * a request_id and require polling for results.
74
- */
75
- private doGenerateAsync;
76
- /**
77
- * Polls the get_result endpoint until the image is ready.
78
- */
79
- private pollForImageUrl;
54
+ export declare class FireworksImageModel implements ImageModelV4 {
55
+ readonly modelId: FireworksImageModelId;
56
+ private config;
57
+ readonly specificationVersion = "v4";
58
+ readonly maxImagesPerCall = 1;
59
+ get supportsFileInputs(): boolean | undefined;
60
+ get supportsMaskInputs(): boolean | undefined;
61
+ get provider(): string;
62
+ static [WORKFLOW_SERIALIZE](model: FireworksImageModel): {
63
+ modelId: string;
64
+ config: import("@ai-sdk/provider").JSONObject;
65
+ };
66
+ static [WORKFLOW_DESERIALIZE](options: {
67
+ modelId: FireworksImageModelId;
68
+ config: FireworksImageModelConfig;
69
+ }): FireworksImageModel;
70
+ constructor(modelId: FireworksImageModelId, config: FireworksImageModelConfig);
71
+ doGenerate({ prompt, n, size, aspectRatio, seed, providerOptions, headers, abortSignal, files, mask }: Parameters<ImageModelV4['doGenerate']>[0]): Promise<Awaited<ReturnType<ImageModelV4['doGenerate']>>>;
72
+ /**
73
+ * Handles async image generation for models like flux-kontext-* that return
74
+ * a request_id and require polling for results.
75
+ */
76
+ private doGenerateAsync;
77
+ /**
78
+ * Polls the get_result endpoint until the image is ready.
79
+ */
80
+ private pollForImageUrl;
80
81
  }
81
-
82
- declare const fireworksImageModelOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
83
- [x: string]: unknown;
84
- guidance_scale?: number | undefined;
85
- num_inference_steps?: number | undefined;
86
- output_format?: "jpeg" | "png" | undefined;
87
- webhook_url?: string | undefined;
88
- webhook_secret?: string | undefined;
89
- prompt_upsampling?: boolean | undefined;
90
- safety_tolerance?: number | undefined;
91
- cfg_scale?: number | undefined;
92
- steps?: number | undefined;
82
+ //#endregion
83
+ //#region src/fireworks-image-model-options.d.ts
84
+ declare const fireworksImageModelOptionsSchema: import("@ai-sdk/provider-utils").LazySchema<{
85
+ [x: string]: unknown;
86
+ guidance_scale?: number | undefined;
87
+ num_inference_steps?: number | undefined;
88
+ output_format?: "jpeg" | "png" | undefined;
89
+ webhook_url?: string | undefined;
90
+ webhook_secret?: string | undefined;
91
+ prompt_upsampling?: boolean | undefined;
92
+ safety_tolerance?: number | undefined;
93
+ cfg_scale?: number | undefined;
94
+ steps?: number | undefined;
93
95
  }>;
94
96
  type FireworksImageModelOptions = InferSchema<typeof fireworksImageModelOptionsSchema>;
95
-
97
+ //#endregion
98
+ //#region src/fireworks-completion-options.d.ts
96
99
  type FireworksCompletionModelId = 'accounts/fireworks/models/llama-v3-8b-instruct' | 'accounts/fireworks/models/llama-v2-34b-code' | (string & {});
97
-
100
+ //#endregion
101
+ //#region src/fireworks-provider.d.ts
98
102
  type FireworksErrorData = z.infer<typeof fireworksErrorSchema>;
99
103
  declare const fireworksErrorSchema: z.ZodObject<{
100
- error: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
101
- message: z.ZodString;
102
- object: z.ZodOptional<z.ZodNullable<z.ZodString>>;
103
- type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
104
- param: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
105
- code: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
106
- }, z.core.$strip>]>;
104
+ error: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
105
+ message: z.ZodString;
106
+ object: z.ZodOptional<z.ZodNullable<z.ZodString>>;
107
+ type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
108
+ param: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
109
+ code: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
110
+ }, z.core.$strip>]>;
107
111
  }, z.core.$strip>;
108
112
  interface FireworksProviderSettings {
109
- /**
110
- * Fireworks API key. Default value is taken from the `FIREWORKS_API_KEY`
111
- * environment variable.
112
- */
113
- apiKey?: string;
114
- /**
115
- * Base URL for the API calls.
116
- */
117
- baseURL?: string;
118
- /**
119
- * Custom headers to include in the requests.
120
- */
121
- headers?: Record<string, string>;
122
- /**
123
- * Custom fetch implementation. You can use it as a middleware to intercept requests,
124
- * or to provide a custom fetch implementation for e.g. testing.
125
- */
126
- fetch?: FetchFunction;
113
+ /**
114
+ * Fireworks API key. Default value is taken from the `FIREWORKS_API_KEY`
115
+ * environment variable.
116
+ */
117
+ apiKey?: string;
118
+ /**
119
+ * Base URL for the API calls.
120
+ */
121
+ baseURL?: string;
122
+ /**
123
+ * Custom headers to include in the requests.
124
+ */
125
+ headers?: Record<string, string>;
126
+ /**
127
+ * Custom fetch implementation. You can use it as a middleware to intercept requests,
128
+ * or to provide a custom fetch implementation for e.g. testing.
129
+ */
130
+ fetch?: FetchFunction;
127
131
  }
128
132
  interface FireworksProvider extends ProviderV4 {
129
- /**
130
- * Creates a model for text generation.
131
- */
132
- (modelId: FireworksChatModelId): LanguageModelV4;
133
- /**
134
- * Creates a chat model for text generation.
135
- */
136
- chatModel(modelId: FireworksChatModelId): LanguageModelV4;
137
- /**
138
- * Creates a completion model for text generation.
139
- */
140
- completionModel(modelId: FireworksCompletionModelId): LanguageModelV4;
141
- /**
142
- * Creates a chat model for text generation.
143
- */
144
- languageModel(modelId: FireworksChatModelId): LanguageModelV4;
145
- /**
146
- * Creates a text embedding model for text generation.
147
- */
148
- embeddingModel(modelId: FireworksEmbeddingModelId): EmbeddingModelV4;
149
- /**
150
- * @deprecated Use `embeddingModel` instead.
151
- */
152
- textEmbeddingModel(modelId: FireworksEmbeddingModelId): EmbeddingModelV4;
153
- /**
154
- * Creates a model for image generation.
155
- */
156
- image(modelId: FireworksImageModelId): ImageModelV4;
157
- /**
158
- * Creates a model for image generation.
159
- */
160
- imageModel(modelId: FireworksImageModelId): ImageModelV4;
133
+ /**
134
+ * Creates a model for text generation.
135
+ */
136
+ (modelId: FireworksChatModelId): LanguageModelV4;
137
+ /**
138
+ * Creates a chat model for text generation.
139
+ */
140
+ chatModel(modelId: FireworksChatModelId): LanguageModelV4;
141
+ /**
142
+ * Creates a completion model for text generation.
143
+ */
144
+ completionModel(modelId: FireworksCompletionModelId): LanguageModelV4;
145
+ /**
146
+ * Creates a chat model for text generation.
147
+ */
148
+ languageModel(modelId: FireworksChatModelId): LanguageModelV4;
149
+ /**
150
+ * Creates a text embedding model for text generation.
151
+ */
152
+ embeddingModel(modelId: FireworksEmbeddingModelId): EmbeddingModelV4;
153
+ /**
154
+ * @deprecated Use `embeddingModel` instead.
155
+ */
156
+ textEmbeddingModel(modelId: FireworksEmbeddingModelId): EmbeddingModelV4;
157
+ /**
158
+ * Creates a model for image generation.
159
+ */
160
+ image(modelId: FireworksImageModelId): ImageModelV4;
161
+ /**
162
+ * Creates a model for image generation.
163
+ */
164
+ imageModel(modelId: FireworksImageModelId): ImageModelV4;
161
165
  }
162
- declare function createFireworks(options?: FireworksProviderSettings): FireworksProvider;
163
- declare const fireworks: FireworksProvider;
164
-
165
- declare const VERSION: string;
166
-
167
- export { type FireworksEmbeddingModelId, type FireworksEmbeddingModelOptions, type FireworksEmbeddingModelOptions as FireworksEmbeddingProviderOptions, type FireworksErrorData, FireworksImageModel, type FireworksImageModelId, type FireworksImageModelOptions, type FireworksLanguageModelOptions, type FireworksProvider, type FireworksLanguageModelOptions as FireworksProviderOptions, type FireworksProviderSettings, VERSION, createFireworks, fireworks };
166
+ export declare function createFireworks(options?: FireworksProviderSettings): FireworksProvider;
167
+ export declare const fireworks: FireworksProvider;
168
+ //#endregion
169
+ //#region src/version.d.ts
170
+ export declare const VERSION: string;
171
+ //#endregion
172
+ export type { FireworksEmbeddingModelId, FireworksEmbeddingModelOptions, FireworksEmbeddingModelOptions as FireworksEmbeddingProviderOptions, FireworksErrorData, FireworksImageModelId, FireworksImageModelOptions, FireworksLanguageModelOptions, FireworksLanguageModelOptions as FireworksProviderOptions, FireworksProvider, FireworksProviderSettings };
173
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/fireworks-chat-options.ts","../src/fireworks-embedding-options.ts","../src/fireworks-image-options.ts","../src/fireworks-image-model.ts","../src/fireworks-image-model-options.ts","../src/fireworks-completion-options.ts","../src/fireworks-provider.ts","../src/version.ts"],"mappings":";;;;KAIY;cAsBC,+BAA6B,EAAA;;;;;;;;;;;;;;;;;GAoBxC,EAAA,KAAA;KAEU,gCAAgC,EAAE,aACrC;;;KC9CG;cAIC,gCAA8B,EAAA,cAAA,EAAA,KAAA;KAE/B,iCAAiC,EAAE,aACtC;;;KCTG;;;UC8FF;EACR;EACA;EACA,gBAAgB;EAChB,QAAQ;;;;;EAKR;;;;;EAKA;EACA;IACE,oBAAoB;;;qBAIX,+BAA+B;WAgD/B,SAAS;UACV;WAhDD;WACA;MAEL;MAqBA;MAIA;UAII,oBAAoB,OAAO;;;;UAO3B,sBAAsB;IAC5B,SAAS;IACT,QAAQ;MACT;EAKU,YAAA,SAAS,uBACV,QAAQ;EAGZ,aACJ,QACA,GACA,MACA,aACA,MACA,iBACA,SACA,aACA,OACA,QACC,WAAW,iCAAiC,QAC7C,QAAQ,WAAW;;;;;UA2GP;;;;UAkEA;;;;cCzVH,mEAAgC;;;;;;;;;;;;KAmDjC,6BAA6B,mBAChC;;;KC1DG;;;KCyBA,qBAAqB,EAAE,aAAa;cAE1C,sBAAoB,EAAA;;;;;;;;GAWxB,EAAA,KAAA;UAQe;;;;;EAKf;;;;EAIA;;;;EAIA,UAAU;;;;;EAKV,QAAQ;;UAGO,0BAA0B;;;;GAIxC,SAAS,uBAAuB;;;;EAKjC,UAAU,SAAS,uBAAuB;;;;EAK1C,gBAAgB,SAAS,6BAA6B;;;;EAKtD,cAAc,SAAS,uBAAuB;;;;EAK9C,eAAe,SAAS,4BAA4B;;;;EAKpD,mBAAmB,SAAS,4BAA4B;;;;EAKxD,MAAM,SAAS,wBAAwB;;;;EAKvC,WAAW,SAAS,wBAAwB;;wBAK9B,gBACd,UAAS,4BACR;qBAqHU,WAAS;;;qBCrOT"}