@ai-sdk/google-vertex
Advanced tools
Comparing version 2.0.13 to 2.0.14
# @ai-sdk/google-vertex | ||
## 2.0.14 | ||
### Patch Changes | ||
- 19a2ce7: feat (ai/core): add aspectRatio and seed options to generateImage | ||
- 6337688: feat: change image generation errors to warnings | ||
- Updated dependencies [19a2ce7] | ||
- Updated dependencies [19a2ce7] | ||
- Updated dependencies [6337688] | ||
- @ai-sdk/provider@1.0.4 | ||
- @ai-sdk/provider-utils@2.0.6 | ||
- @ai-sdk/anthropic@1.0.7 | ||
- @ai-sdk/google@1.0.13 | ||
## 2.0.13 | ||
@@ -4,0 +18,0 @@ |
@@ -163,2 +163,4 @@ "use strict"; | ||
this.specificationVersion = "v1"; | ||
// https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/imagen-api#parameter_list | ||
this.maxImagesPerCall = 4; | ||
} | ||
@@ -172,2 +174,4 @@ get provider() { | ||
size, | ||
aspectRatio, | ||
seed, | ||
providerOptions, | ||
@@ -178,6 +182,9 @@ headers, | ||
var _a; | ||
if (size) { | ||
throw new Error( | ||
"Google Vertex does not support the `size` option. Use `providerOptions.vertex.aspectRatio` instead. See https://cloud.google.com/vertex-ai/generative-ai/docs/image/generate-images#aspect-ratio" | ||
); | ||
const warnings = []; | ||
if (size != null) { | ||
warnings.push({ | ||
type: "unsupported-setting", | ||
setting: "size", | ||
details: "This model does not support the `size` option. Use `aspectRatio` instead." | ||
}); | ||
} | ||
@@ -188,2 +195,4 @@ const body = { | ||
sampleCount: n, | ||
...aspectRatio != null ? { aspectRatio } : {}, | ||
...seed != null ? { seed } : {}, | ||
...(_a = providerOptions.vertex) != null ? _a : {} | ||
@@ -206,3 +215,4 @@ } | ||
(p) => p.bytesBase64Encoded | ||
) | ||
), | ||
warnings | ||
}; | ||
@@ -209,0 +219,0 @@ } |
@@ -244,2 +244,4 @@ "use strict"; | ||
this.specificationVersion = "v1"; | ||
// https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/imagen-api#parameter_list | ||
this.maxImagesPerCall = 4; | ||
} | ||
@@ -253,2 +255,4 @@ get provider() { | ||
size, | ||
aspectRatio, | ||
seed, | ||
providerOptions, | ||
@@ -259,6 +263,9 @@ headers, | ||
var _a; | ||
if (size) { | ||
throw new Error( | ||
"Google Vertex does not support the `size` option. Use `providerOptions.vertex.aspectRatio` instead. See https://cloud.google.com/vertex-ai/generative-ai/docs/image/generate-images#aspect-ratio" | ||
); | ||
const warnings = []; | ||
if (size != null) { | ||
warnings.push({ | ||
type: "unsupported-setting", | ||
setting: "size", | ||
details: "This model does not support the `size` option. Use `aspectRatio` instead." | ||
}); | ||
} | ||
@@ -269,2 +276,4 @@ const body = { | ||
sampleCount: n, | ||
...aspectRatio != null ? { aspectRatio } : {}, | ||
...seed != null ? { seed } : {}, | ||
...(_a = providerOptions.vertex) != null ? _a : {} | ||
@@ -287,3 +296,4 @@ } | ||
(p) => p.bytesBase64Encoded | ||
) | ||
), | ||
warnings | ||
}; | ||
@@ -290,0 +300,0 @@ } |
{ | ||
"name": "@ai-sdk/google-vertex", | ||
"version": "2.0.13", | ||
"version": "2.0.14", | ||
"license": "Apache-2.0", | ||
@@ -40,6 +40,6 @@ "sideEffects": false, | ||
"dependencies": { | ||
"@ai-sdk/anthropic": "1.0.6", | ||
"@ai-sdk/google": "1.0.12", | ||
"@ai-sdk/provider": "1.0.3", | ||
"@ai-sdk/provider-utils": "2.0.5", | ||
"@ai-sdk/anthropic": "1.0.7", | ||
"@ai-sdk/google": "1.0.13", | ||
"@ai-sdk/provider": "1.0.4", | ||
"@ai-sdk/provider-utils": "2.0.6", | ||
"google-auth-library": "^9.15.0" | ||
@@ -46,0 +46,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
234093
2140
+ Added@ai-sdk/anthropic@1.0.7(transitive)
+ Added@ai-sdk/google@1.0.13(transitive)
+ Added@ai-sdk/provider@1.0.4(transitive)
+ Added@ai-sdk/provider-utils@2.0.6(transitive)
- Removed@ai-sdk/anthropic@1.0.6(transitive)
- Removed@ai-sdk/google@1.0.12(transitive)
- Removed@ai-sdk/provider@1.0.3(transitive)
- Removed@ai-sdk/provider-utils@2.0.5(transitive)
Updated@ai-sdk/anthropic@1.0.7
Updated@ai-sdk/google@1.0.13
Updated@ai-sdk/provider@1.0.4
Updated@ai-sdk/provider-utils@2.0.6