You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#### ADC: `GOOGLE_APPLICATION_CREDENTIALS_JSON` Support
35
+
- New ADC credential source for containerized environments (Heroku, Fly.io, Railway, Docker) where mounting credential files is impractical
36
+
- Set `GOOGLE_APPLICATION_CREDENTIALS_JSON='{"type":"service_account",...}'` with full JSON content
37
+
- Parsed before the standard file-path `GOOGLE_APPLICATION_CREDENTIALS` in the credential discovery chain
38
+
- Service account JSON parsing now uses an explicit key allowlist instead of `String.to_atom/1`
39
+
40
+
#### Vertex AI Model Endpoints
41
+
-**`list_models/1`** uses the correct Vertex publisher models endpoint (`/v1beta1/publishers/google/models`) with `pageSize`/`pageToken` query params
42
+
-**`list_models/1` pagination**: accepts `:page_size` and `:page_token` options passed as query parameters
43
+
-**`get_model/2`** uses `publishers/google/models/{model}` path for Vertex AI
44
+
-**`publisherModels` response normalization**: Vertex AI `list_models` responses are transparently normalized to the same `%ListModelsResponse{}` shape as Gemini API responses
45
+
46
+
#### HTTP Client Per-Request Auth Override
47
+
-`Gemini.Client.HTTP` verb functions (`get`, `post`, `patch`, `delete`) now respect `:auth`, `:api_key`, `:project_id`, `:location`, `:access_token`, and `:service_account` options passed per-request
48
+
- Absolute paths (`/v1beta1/...`) and full URLs are passed through without re-prefixing
49
+
50
+
#### Vertex Live Session Model Prefix
51
+
- Live sessions with `auth: :vertex_ai` now build correct `projects/{p}/locations/{l}/publishers/google/models/{m}` resource names in the setup message
52
+
53
+
#### `stream_generate/2` Configurable Timeout
54
+
- New `:stream_timeout` option (default: 60,000ms, up from hardcoded 30,000ms) for `Gemini.stream_generate/2`
55
+
- Stream cleanup on timeout: `Coordinator.stop_stream/1` is called before returning the error, preventing orphaned streams
56
+
57
+
#### Live API ADC Integration Test
58
+
- New `test/live_api/adc_live_test.exs` for end-to-end ADC-authenticated Live API sessions
59
+
60
+
### Changed
61
+
-**Vertex Live API upgraded to v1**: WebSocket endpoint changed from `v1beta1.LlmBidiService/BidiGenerateContent` to `v1.LlmBidiService/BidiGenerateContent`; Vertex WebSocket path no longer appends `?project=...&location=...` query parameters
62
+
-**Live model resolution uses registry**: `Gemini.Live.Models.resolve/1` now consults `ModelRegistry` plus runtime `list_models` results instead of hardcoded candidate lists
63
+
-**Live model auth-aware candidate selection**: separate candidate and default lists for `:gemini` vs `:vertex_ai` auth strategies; Vertex AI candidates exclude Gemini-only `gemini-live-*` aliases; smart modality-based fallback scans available models when no candidate matches
64
+
-**Default text live model**: changed from `gemini-2.0-flash-exp` to `gemini-2.5-flash-native-audio-preview-12-2025`
65
+
-**`latest` model alias**: updated from `gemini-3-pro-preview` to `gemini-3.1-pro-preview`
66
+
-**ADC credential discovery order**: now `GOOGLE_APPLICATION_CREDENTIALS_JSON` → `GOOGLE_APPLICATION_CREDENTIALS` → gcloud user creds → metadata server
67
+
-**`Live.Models.candidates/1`** and **`Live.Models.default/1`** now accept an optional `opts` keyword list for auth-aware candidate selection
68
+
-**`Live.Setup.normalize_model_name/1`**: now recognizes `projects/`, `publishers/`, and `models/` prefixes
69
+
-**Video generation request format**: flattened request params — `numberOfVideos`, `durationSeconds`, `aspectRatio`, `personGeneration` are now top-level keys instead of nested under `videoConfig`; compatible with Veo 3.1 API requirements
70
+
-**Video `person_generation` default**: changed from `:allow_none` to `:dont_allow`; format changed from camelCase (`allowAdult`) to snake_case (`allow_adult`); `:allow_none` now maps to `"dont_allow"`
71
+
-**Video binary encoding**: `image_to_api/1` and `video_to_api/1` now use `%{"inlineData" => %{"data" => ..., "mimeType" => ...}}` format instead of `%{"bytesBase64Encoded" => ...}`; response parsing handles both legacy and new formats
72
+
-**Video generation legacy fields**: `fps`, `compression_format`, `safety_filter_level`, and `guidance_scale` are no longer sent in API requests (struct fields retained for backwards compatibility)
73
+
-**Images API implicit Vertex AI auth**: `generate/3`, `edit/5`, and `upscale/3` now auto-set `auth: :vertex_ai` on opts; validation uses per-request auth credentials via `HTTP.auth_config_for_request/1` with actual credential completeness checking; location resolved from per-request auth config
74
+
-**Streaming options pass-through**: `UnifiedManager` now extracts `:timeout`, `:max_retries`, `:max_backoff_ms`, `:connect_timeout`, `:method`, and `:add_sse_params` from stream config and passes them to `HTTPStreaming.stream_to_process/6`
75
+
-**Model reclassifications**: `deep_research_pro_preview_12_2025` moved from universal to Gemini-only models; `live_2_5_flash_preview` moved to Gemini-only legacy aliases; `flash_2_5_native_audio_latest` added as a universal model
76
+
-**`RUN_BILLED_VERTEX_LIVE_TESTS` gate**: Vertex Live tests now require explicit opt-in via environment variable to prevent accidental GCP billing
77
+
78
+
### Fixed
79
+
-**Vertex AI model path handling**: `list_models` and `get_model` use correct Vertex AI resource paths instead of Gemini API paths
80
+
-**WebSocket model name normalization**: handles `models/`, `publishers/google/models/`, and full `projects/.../models/` prefixes, plus endpoint suffixes (`:generateContent`)
81
+
-**Live Setup model prefix**: Vertex AI sessions correctly prefix model names with `projects/{p}/locations/{l}/publishers/google/`
82
+
-**HTTP client URL building**: absolute paths and full URLs are no longer double-prefixed with the base URL
83
+
84
+
### Removed
85
+
- Bulk cleanup of ~50,000 lines of internal planning documents, gap analyses, implementation specs, and development notes not intended for distribution
86
+
- Removed `test.sh`, `repro_concurrency_gate.exs`, and `CLAUDE.md` development artifacts
-**Live API (WebSocket)**: Bidirectional, low-latency sessions with real-time input/output, native audio with affective dialog and proactivity (Enhanced in v0.9.0!)
24
+
-**Live API (WebSocket)**: Bidirectional, low-latency sessions with real-time input/output, native audio with affective dialog and proactivity (Enhanced in v0.10.0!)
25
25
-**Automatic Rate Limiting**: Built-in rate limit handling with retries, concurrency gating, and adaptive backoff
26
26
-**Files API**: Upload, manage, and use files with Gemini models for multimodal content (NEW in v0.7.0!)
27
27
-**File Search Stores**: RAG store creation, ingestion, and semantic search (NEW in v0.8.x!)
28
28
-**Documents API**: Manage indexed documents inside stores for RAG workflows (NEW in v0.7.0!)
29
29
-**Batches API**: Submit large numbers of requests with 50% cost savings (NEW in v0.7.0!)
30
30
-**Operations API**: Track long-running operations like video generation (NEW in v0.7.0!)
31
31
-**Tunings (Fine-Tuning)**: Create, monitor, and manage tuned models (NEW in v0.8.x!)
32
-
-**Image & Video Generation**: Imagen/Veo APIs for text-to-image, editing, upscaling, and video generation (NEW in v0.8.x!)
32
+
-**Model Registry**: Centralized model capabilities, modality tracking, and registry-backed Live API model resolution (NEW in v0.10.0!)
33
+
-**Image & Video Generation**: Imagen/Veo APIs for text-to-image, editing, upscaling, and video generation with Veo 3.1 support
33
34
-**Embeddings with MRL**: Text embeddings with Matryoshka Representation Learning, normalization, and distance metrics
34
35
-**Async Batch Embeddings**: Production-scale embedding generation with 50% cost savings
35
36
-**Type Safety**: Complete type definitions with runtime validation
@@ -58,7 +59,7 @@ Add `gemini` to your list of dependencies in `mix.exs`:
Streaming knobs: pass `timeout:` (per attempt, default `config :gemini_ex, :timeout` = 120_000), `max_retries:` (default 3), `max_backoff_ms:` (default 10_000), and `connect_timeout:` (default 5_000). Manager cleanup delay can be tuned via `config :gemini_ex, :streaming, cleanup_delay_ms: ...`.
179
+
Streaming knobs: pass `timeout:` (per attempt, default `config :gemini_ex, :timeout` = 120_000), `stream_timeout:` (collect timeout, default 60_000; orphaned streams are cleaned up on timeout), `max_retries:` (default 3), `max_backoff_ms:` (default 10_000), and `connect_timeout:` (default 5_000). Manager cleanup delay can be tuned via `config :gemini_ex, :streaming, cleanup_delay_ms: ...`.
179
180
180
181
### Interactions Quick Start
181
182
@@ -201,15 +202,15 @@ for event <- stream do
201
202
end
202
203
```
203
204
204
-
See `docs/guides/interactions.md` for CRUD, resumption (`last_event_id`), and background/cancel/delete examples.
205
+
See `guides/interactions.md` for CRUD, resumption (`last_event_id`), and background/cancel/delete examples.
205
206
206
207
### Live API (WebSocket)
207
208
208
-
Real-time bidirectional streaming for voice, video, and text interactions. The v0.9.0 release upgrades to v1beta as the default API version while supporting v1alphafor advanced nativeaudio features.
209
+
Real-time bidirectional streaming for voice, video, and text interactions. For Gemini Live connections, `v1beta` is the default API version, while `v1alpha` is available for advanced native-audio features. Vertex Live connections use the Vertex `v1` WebSocket endpoint.
209
210
210
211
#### Model Resolution
211
212
212
-
Live API model availability varies by API key and regional rollout. Use `Gemini.Live.Models.resolve/1`to automatically select an available model:
213
+
Live API model availability varies by API key and regional rollout. `Gemini.Live.Models.resolve/1`uses the model registry plus runtime `list_models` results to select a compatible model:
213
214
214
215
```elixir
215
216
aliasGemini.Live.Models
@@ -284,7 +285,7 @@ tools = [
284
285
)
285
286
```
286
287
287
-
See the [Live API Guide](docs/guides/live_api.md) for complete documentation including voice activity detection, session resumption, thinking budgets, and context window compression.
288
+
See the [Live API Guide](guides/live_api.md) for complete documentation including voice activity detection, session resumption, thinking budgets, and context window compression.
The client checks `GOOGLE_APPLICATION_CREDENTIALS`, gcloud user credentials, and metadata server endpoints, caching access tokens for you via ETS.
1428
+
The client checks `GOOGLE_APPLICATION_CREDENTIALS_JSON` (gemini_ex extension), `GOOGLE_APPLICATION_CREDENTIALS` (standard ADC), gcloud user credentials, and metadata server endpoints, caching access tokens for you via ETS. Official Google ADC order starts with `GOOGLE_APPLICATION_CREDENTIALS`; JSON-content env support is a gemini_ex convenience.
1421
1429
1422
1430
## Model Configuration System
1423
1431
@@ -1459,6 +1467,11 @@ Gemini.Config.models_for(:both) # Only universal models
Use the dedicated Imagen endpoints for text-to-image, editing, and upscaling (Vertex AI).
1670
+
Use the dedicated Imagen endpoints for text-to-image, editing, and upscaling. As of v0.10.0, `auth: :vertex_ai` is set automatically on all Images API calls.
1658
1671
1659
1672
```elixir
1660
1673
aliasGemini.APIs.Images
@@ -1704,7 +1717,7 @@ alias Gemini.Types.Generation.Video.VideoGenerationConfig
1704
1717
{:ok, op} =
1705
1718
Videos.generate(
1706
1719
"A cinematic drone shot over misty mountains at sunrise",
0 commit comments