Skip to content

Releases: papi-ai/google

v0.16.1

Choose a tag to compare

@MarcelloDuarte MarcelloDuarte released this 09 Oct 20:15
c5de467
  • Requires papi-core 0.15.3 or later, which carries the PHP 8.5 fixes

v0.16.0

Choose a tag to compare

@MarcelloDuarte MarcelloDuarte released this 14 Sep 20:03
386a5bd
  • Default is now gemini-3.8-flash; adds 3.7 Flash and 3.1 Flash-Lite.
  • GeminiModel enum is the source of truth; constants alias it.
  • Model watch enumerates the enum instead of parsing docblocks.
  • Drops the deprecated curl_close calls. By @mogliabr.

v0.15.6

Choose a tag to compare

@MarcelloDuarte MarcelloDuarte released this 31 Jul 18:05
456b661

Documentation only. No code changes, no API changes.

Found by running v0.15.5 against the live API rather than a stub: generateImage() works, but the Gemini image models return image/jpeg by default, while every example wrote the bytes to output.png / image.png / edited.png. The bytes were correct, the filename was not, and anything dispatching on file extension would have been misled.

The MIME type is already returned on each image, so the examples now derive the extension from the response:

$extension = str_replace('image/', '', $image['mimeType']);
file_put_contents("output.{$extension}", base64_decode($image['data']));

Live verification of the v0.15.5 image path, six checks, all passing: image returned and decodable (image/jpeg, 1408x768), aspectRatio and imageSize honoured (2752x1536 for 16:9 at 2K), numberOfImages > 1 throwing rather than returning one image, generateImageToFile() writing a valid file, chat working on the default model, and effort mapping to a thinking level without error.

v0.15.5

Choose a tag to compare

@MarcelloDuarte MarcelloDuarte released this 31 Jul 16:47
bd851ea
Generate images through generateContent, not Imagen (#10)

generateImage() has been broken for a while. It builds an Imagen-shaped request
(instances/parameters posted to :predict) and its default model,
imagen-4.0-fast-generate-001, has already dropped off Google's published list.
The whole Imagen line shuts down on 17 August 2026 and the :predict endpoint
goes with it.

The Gemini image models that replace it are reached through generateContent,
asking for an image modality back. That is the same shape editImage() has
always sent and parseImageResponse() has always parsed, so both methods now
share one private seam where the image wire format lives.

Two behaviour changes worth knowing about:

- Neither method invents an aspect ratio or an image size any more. editImage()
  used to force 1:1 and 2K on every call, which reshaped whatever the caller
  passed in. Omitting them lets the model keep the source proportions. This is
  the same mistake the Agent's unconditional temperature of 0.7 was.
- numberOfImages above 1 now throws. The Gemini image models have no equivalent
  of Imagen's sampleCount, so the alternative was handing back one image and
  pretending four had been asked for.

The IMAGEN_* constants stay, all deprecated. Nothing defaults to them now, so
model-watch no longer reports a deprecated default.

The README documented IMAGEN_3 and IMAGEN_3_FAST, neither of which exists as a
constant; copying that example was a fatal error. Both docs now list the models
the class actually ships.

v0.15.4

Choose a tag to compare

@MarcelloDuarte MarcelloDuarte released this 31 Jul 15:55
b99a664

Found by the new keyless model-watch check on its first real run.

  • MODEL_3_PRO_IMAGE was a dead default. gemini-3-pro-image-preview was shut down on 25 June when it graduated to gemini-3-pro-image. It is the default for image editing, so that path was failing. Corrected.
  • MODEL_VEO_3_1_FAST was published in error in v0.15.2 and does not exist. Google publishes veo-3.1-lite-generate-preview. Replaced by MODEL_VEO_3_1_LITE and removed rather than deprecated, since an ID that was never real cannot have callers.
  • gemini-1.5-pro and gemini-1.5-flash are retired and are now marked @deprecated.

The watchdog itself is now keyless: it reads Google's published model list rather than the API, so a public repository needs no credential. A deprecated-but-still-default constant is reported rather than failed, so the job cannot sit permanently red.

v0.15.3

Choose a tag to compare

@MarcelloDuarte MarcelloDuarte released this 31 Jul 15:41
3295d1c

Fixes a regression in v0.15.2.

generateImage() builds an Imagen-shaped request (instances/parameters on :predict). v0.15.2 repointed its default to gemini-3.1-flash-image, a Gemini model that uses generateContent, so the default no longer matched the code around it. Reverted to imagen-4.0-fast-generate-001.

A stay of execution, not a fix. Imagen shuts down 17 August 2026 and the Gemini image path still needs implementing as a new request shape and response parser. The video default fixed in v0.15.2 is unaffected and remains correct.

v0.15.2

Choose a tag to compare

@MarcelloDuarte MarcelloDuarte released this 31 Jul 15:36
80c6c36

Fixes two dead defaults, the same class of bug as the chat defaults in v0.15.0.

startVideo() defaulted to veo-3.0-generate-001, shut down 30 June 2026. Video generation has been failing for anyone not passing an explicit model. Now defaults to veo-3.1.

generateImage() defaulted to imagen-4.0-fast-generate-001. Imagen is retired as a product line and shuts down 17 August 2026. Now defaults to gemini-3.1-flash-image.

Adds the current image constants and veo-3.1-fast. Dead constants are kept and marked @deprecated with their shutdown dates rather than removed: deleting them would turn a runtime 404 into a fatal error for anyone merely referencing one.

v0.15.0

Choose a tag to compare

@MarcelloDuarte MarcelloDuarte released this 31 Jul 14:49
30e7e29

Requires papi-ai/papi-core ^0.15.

Adds the neutral effort option mapping where this provider has a reasoning knob, declares its tool-selection capability as a type so callers can ask instead of catching, and refreshes the default model where the previous one was retired.

See the commit for provider-specific detail.

v0.14.0

Choose a tag to compare

@MarcelloDuarte MarcelloDuarte released this 27 Jul 13:21
e5d5d9e

Requires papi-ai/papi-core ^0.14, so this package installs alongside core 0.14. No source changes; adds the docs page.

v0.13.0: Forced tool choice (toolChoice)

Choose a tag to compare

@MarcelloDuarte MarcelloDuarte released this 25 Jul 23:07
ef982de

Maps the provider-agnostic toolChoice option to Gemini's toolConfig.functionCallingConfig (AUTO/ANY/NONE + allowedFunctionNames), on both chat and streaming. Validation in core ToolChoice throws before any HTTP call on an unenforceable choice. Requires papi-core ^0.13.