@loonylabs/tti-middleware 1.2.0 → 1.3.0

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.
@@ -392,6 +392,12 @@ class GoogleCloudTTIProvider extends base_tti_provider_1.BaseTTIProvider {
392
392
  const config = {
393
393
  responseModalities: ['TEXT', 'IMAGE'],
394
394
  };
395
+ // Add imageConfig with aspectRatio if provided
396
+ if (request.aspectRatio) {
397
+ config.imageConfig = {
398
+ aspectRatio: request.aspectRatio,
399
+ };
400
+ }
395
401
  // Add temperature if provided
396
402
  if (request.providerOptions?.temperature !== undefined) {
397
403
  config.temperature = request.providerOptions.temperature;
@@ -400,6 +406,7 @@ class GoogleCloudTTIProvider extends base_tti_provider_1.BaseTTIProvider {
400
406
  model: internalModelId,
401
407
  region,
402
408
  hasReferenceImages: (0, base_tti_provider_1.hasReferenceImages)(request),
409
+ config: JSON.stringify(config, null, 2),
403
410
  });
404
411
  const response = await client.generateContent({
405
412
  model: internalModelId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loonylabs/tti-middleware",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Provider-agnostic Text-to-Image middleware with GDPR compliance. Supports Google Cloud (Imagen, Gemini), Eden AI, and IONOS.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -55,7 +55,7 @@
55
55
  "homepage": "https://github.com/loonylabs-dev/tti-middleware#readme",
56
56
  "peerDependencies": {
57
57
  "@google-cloud/aiplatform": ">=3.0.0",
58
- "@google/genai": ">=0.14.0"
58
+ "@google/genai": ">=1.40.0"
59
59
  },
60
60
  "peerDependenciesMeta": {
61
61
  "@google-cloud/aiplatform": {
@@ -67,7 +67,7 @@
67
67
  },
68
68
  "devDependencies": {
69
69
  "@google-cloud/aiplatform": "^3.29.0",
70
- "@google/genai": "^0.14.0",
70
+ "@google/genai": "^1.40.0",
71
71
  "@types/jest": "^29.5.8",
72
72
  "@types/node": "^20.10.0",
73
73
  "@typescript-eslint/eslint-plugin": "^6.13.0",