Skip to content

Feature: add latest Google GenAI models - #2158

Open
azanux wants to merge 2 commits into
embabel:mainfrom
azanux:feature/google-genai-latest-models
Open

azanux wants to merge 2 commits into
embabel:mainfrom
azanux:feature/google-genai-latest-models

Conversation

@azanux

@azanux azanux commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Updates the Google GenAI (Gemini) model list to match what Google offers today. Every model was checked with a real API call.

No model is removed, so existing code keeps compiling.

Changes

New models

Model Type Price (input / output per 1M tokens)
gemini-4-argon Chat Not yet published by Google
gemini-3.8-flash Chat $0.75 / $3.75
gemini-3.6-flash Chat $0.75 / $3.75
gemini-3.5-flash-lite Chat $0.30 / $2.50
gemini-embedding-2 Embedding $0.20

Google has announced that 3.8 Flash and 3.6 Flash will cost $1.50 / $7.50 from January 1, 2027. The YAML file notes this.

Deprecated models

These constants are now marked @Deprecated. Their YAML entries are kept, with a comment.

Constant Reason Replacement
GEMINI_3_5_FLASH Replaced by Google GEMINI_3_6_FLASH
GEMINI_3_FLASH_PREVIEW Replaced by Google GEMINI_3_6_FLASH
GEMINI_3_1_FLASH_LITE_PREVIEW Shut down by Google on 2026-05-25 GEMINI_3_1_FLASH_LITE
TEXT_EMBEDDING_004 Returns 404 GEMINI_EMBEDDING_001
TEXT_EMBEDDING_005 Returns 404 GEMINI_EMBEDDING_001

Default embedding model fixed

DEFAULT_TEXT_EMBEDDING_MODEL pointed to text-embedding-004, which Google shut down. Any call to it returns 404. It now points to gemini-embedding-001, which is already declared in the YAML file.

Docs

The model list on the installation page now includes the new models and marks the deprecated ones.

Tests

  • GoogleGenAiModelLoaderTest: checks that the new models are loaded and that the default embedding model is declared in the YAML file.
  • GoogleGenAiModelsTest (new): checks the default embedding model and that the deprecated embedding constants point to GEMINI_EMBEDDING_001.
  • GoogleGenAiAllModelsIT: calls every declared chat model with a real API key (14/14 pass).
  • GoogleGenAiEmbeddingIT (new): calls every embedding model and checks the vector size (3/3 pass).

Closes #2157

- Add gemini-4-argon, gemini-3.8-flash, gemini-3.6-flash,
  gemini-3.5-flash-lite and gemini-embedding-2.
- Mark models that Google has replaced or shut down as deprecated.
  No model is removed.
- Use gemini-embedding-001 as the default embedding model.
  text-embedding-004 now returns 404.

Signed-off-by: Charles <azanux@gmail.com>
- Point deprecated text-embedding-004/005 to gemini-embedding-001,
  the default embedding model.
- Test the default embedding model and the deprecated constants.
- Add a live test that calls every embedding model and checks
  the vector size.

Signed-off-by: Charles <azanux@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Google GenAI models: add latest models and fix the default embedding model

1 participant