@combycode/llm-sdk 1.6.0 → 1.6.1

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
@@ -6,6 +6,20 @@ All notable changes to `@combycode/llm-sdk` are documented here. The format foll
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.6.1] - 2026-07-13
10
+
11
+ ### Fixed
12
+ - **Google gemini-image aspect ratio / size (broken image generation).** The `generateContent` image
13
+ path put `aspectRatio` / `imageSize` under `generationConfig.responseFormat.image`, which the API
14
+ rejects (`Invalid value at 'generation_config.response_format.image.aspect_ratio'`) — so any image
15
+ request that passed an aspect ratio 400'd. They belong under `generationConfig.imageConfig`. Verified
16
+ live: `imageConfig.aspectRatio` returns an image for every ratio. (Regressed into view once the 1.6.0
17
+ catalog started advertising `aspectRatio` media params, so the sandbox began sending it.)
18
+ - **Per-model image sizes in the catalog.** The gemini-image `imageSize` options were a blanket
19
+ `512/1K/2K/4K`, but the models 400 on sizes they don't support. Narrowed per model
20
+ (live-probed + confirmed against the official docs): `gemini-3.1-flash-lite-image` → `1K` only;
21
+ `gemini-3-pro-image` / `nano-banana-pro` → `1K/2K/4K` (no 512); `gemini-3.1-flash-image` keeps all four.
22
+
9
23
  ## [1.6.0] - 2026-07-11
10
24
 
11
25
  ### Added
@@ -238,6 +252,7 @@ First public release.
238
252
  - Service tiers end to end (request → bill → cost).
239
253
  - Cross-environment: runs on Node, Bun, and the browser. ESM, zero runtime deps.
240
254
 
255
+ [1.6.1]: https://github.com/combycode/llm-sdk-ts/releases/tag/v1.6.1
241
256
  [1.6.0]: https://github.com/combycode/llm-sdk-ts/releases/tag/v1.6.0
242
257
  [1.2.0]: https://github.com/combycode/llm-sdk-ts/releases/tag/v1.2.0
243
258
  [1.1.0]: https://github.com/combycode/llm-sdk-ts/releases/tag/v1.1.0
@@ -4306,7 +4306,6 @@ var catalog_default2 = {
4306
4306
  },
4307
4307
  imageSize: {
4308
4308
  values: [
4309
- "512",
4310
4309
  "1K",
4311
4310
  "2K",
4312
4311
  "4K"
@@ -4471,7 +4470,6 @@ var catalog_default2 = {
4471
4470
  },
4472
4471
  imageSize: {
4473
4472
  values: [
4474
- "512",
4475
4473
  "1K",
4476
4474
  "2K",
4477
4475
  "4K"
@@ -6026,10 +6024,7 @@ var catalog_default2 = {
6026
6024
  },
6027
6025
  imageSize: {
6028
6026
  values: [
6029
- "512",
6030
- "1K",
6031
- "2K",
6032
- "4K"
6027
+ "1K"
6033
6028
  ],
6034
6029
  default: "1K"
6035
6030
  }
@@ -26547,7 +26542,7 @@ var GoogleMediaAdapter = class {
26547
26542
  const image = {};
26548
26543
  if (req.params?.aspectRatio) image.aspectRatio = req.params.aspectRatio;
26549
26544
  if (req.params?.imageSize) image.imageSize = req.params.imageSize;
26550
- if (Object.keys(image).length) generationConfig.responseFormat = { image };
26545
+ if (Object.keys(image).length) generationConfig.imageConfig = image;
26551
26546
  const { items, usage } = await this.generateContentMedia(
26552
26547
  model,
26553
26548
  req.prompt,
package/dist/index.js CHANGED
@@ -4233,7 +4233,6 @@ var catalog_default2 = {
4233
4233
  },
4234
4234
  imageSize: {
4235
4235
  values: [
4236
- "512",
4237
4236
  "1K",
4238
4237
  "2K",
4239
4238
  "4K"
@@ -4398,7 +4397,6 @@ var catalog_default2 = {
4398
4397
  },
4399
4398
  imageSize: {
4400
4399
  values: [
4401
- "512",
4402
4400
  "1K",
4403
4401
  "2K",
4404
4402
  "4K"
@@ -5953,10 +5951,7 @@ var catalog_default2 = {
5953
5951
  },
5954
5952
  imageSize: {
5955
5953
  values: [
5956
- "512",
5957
- "1K",
5958
- "2K",
5959
- "4K"
5954
+ "1K"
5960
5955
  ],
5961
5956
  default: "1K"
5962
5957
  }
@@ -26474,7 +26469,7 @@ var GoogleMediaAdapter = class {
26474
26469
  const image = {};
26475
26470
  if (req.params?.aspectRatio) image.aspectRatio = req.params.aspectRatio;
26476
26471
  if (req.params?.imageSize) image.imageSize = req.params.imageSize;
26477
- if (Object.keys(image).length) generationConfig.responseFormat = { image };
26472
+ if (Object.keys(image).length) generationConfig.imageConfig = image;
26478
26473
  const { items, usage } = await this.generateContentMedia(
26479
26474
  model,
26480
26475
  req.prompt,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@combycode/llm-sdk",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "Unified, pluggable AI SDK for accessing the LLMs of every major provider (Anthropic, OpenAI, Google, xAI, OpenRouter) through one API. Cross-environment: Node, Bun, and the browser.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",