New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ai-sdk/google-vertex

Package Overview
Dependencies
Maintainers
0
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ai-sdk/google-vertex - npm Package Compare versions

Comparing version 2.0.13 to 2.0.14

14

CHANGELOG.md
# @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 @@

20

dist/index.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc