@ai-sdk/openai 2.0.0-canary.17 → 2.0.0-canary.18
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 +42 -0
- package/dist/index.d.mts +3 -9
- package/dist/index.d.ts +3 -9
- package/dist/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -5
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +2 -10
- package/dist/internal/index.d.ts +2 -10
- package/dist/internal/index.js +3 -4
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +3 -4
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1436,15 +1436,14 @@ var hasDefaultResponseFormat = /* @__PURE__ */ new Set(["gpt-image-1"]);
|
|
|
1436
1436
|
|
|
1437
1437
|
// src/openai-image-model.ts
|
|
1438
1438
|
var OpenAIImageModel = class {
|
|
1439
|
-
constructor(modelId,
|
|
1439
|
+
constructor(modelId, config) {
|
|
1440
1440
|
this.modelId = modelId;
|
|
1441
|
-
this.settings = settings;
|
|
1442
1441
|
this.config = config;
|
|
1443
1442
|
this.specificationVersion = "v2";
|
|
1444
1443
|
}
|
|
1445
1444
|
get maxImagesPerCall() {
|
|
1446
|
-
var _a
|
|
1447
|
-
return (
|
|
1445
|
+
var _a;
|
|
1446
|
+
return (_a = modelMaxImagesPerCall[this.modelId]) != null ? _a : 1;
|
|
1448
1447
|
}
|
|
1449
1448
|
get provider() {
|
|
1450
1449
|
return this.config.provider;
|
|
@@ -2651,7 +2650,7 @@ function createOpenAI(options = {}) {
|
|
|
2651
2650
|
headers: getHeaders,
|
|
2652
2651
|
fetch: options.fetch
|
|
2653
2652
|
});
|
|
2654
|
-
const createImageModel = (modelId
|
|
2653
|
+
const createImageModel = (modelId) => new OpenAIImageModel(modelId, {
|
|
2655
2654
|
provider: `${providerName}.image`,
|
|
2656
2655
|
url: ({ path }) => `${baseURL}${path}`,
|
|
2657
2656
|
headers: getHeaders,
|