Skip to content

Add every hosted Gemma 4 model, and document adding your own without a release - #229

Merged
handstandsam merged 3 commits into
mainfrom
gemma4-model-coverage
Aug 10, 2026
Merged

Add every hosted Gemma 4 model, and document adding your own without a release#229
handstandsam merged 3 commits into
mainfrom
gemma4-model-coverage

Conversation

@handstandsam

@handstandsam handstandsam commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #228 — review that first. This PR's own changes are the two commits below; the base will collapse once #228 merges.

Summary

Every Gemma 4 model Google and Ollama serve is now built in. #225 added one; there are three, and you can pick any of them by id with no specs to look up:

Where Ids
Gemini API (free tier) gemma-4-12b-it, gemma-4-26b-a4b-it, gemma-4-31b-it
Ollama (local) gemma4:12b, gemma4:26b, gemma4:31b

Google's own reference for the Gemini API ids: Gemma on the Gemini API.

And a new docs page says out loud that you never had to wait for a release to use a new model. A workspace trailblaze.yaml can declare any model its provider serves, and it takes effect on the next run — that was previously one sentence buried in the LLM reference. Adding a Model is now the page to hand someone who asks.

Two things worth flagging on #225

  • gemma-4-31b-it and gemma-4-26b-a4b-it are both real, distinct models — 31B dense and 26B-A4B MoE. add gemma4 as a model for google #225's google.yaml declared the first and its hand-written LLM_MODELS.md row named the second, which reads like a typo but isn't. LLM_MODELS.md is generated from the provider yamls, so regenerating it (in Make waits settle instead of stalling, harden the iOS driver, and add the all: recording key #228) resolved the mismatch by silently dropping one real model. Both are back, plus the 12B.
  • max_output_tokens is 32768, not the 65536 the Gemini models use. Google publishes no output cap for Gemma 4; 32768 is the largest figure any host documents.

The e2b / e4b edge builds are deliberately omitted from Ollama: 128K context and much weaker at the screenshot-driven tool calling the agent loop does. Worth knowing that gemma4:latest resolves to e4b, so name a size explicitly.

The docs change

Two files, one gap each.

New: docs/adding_a_model.md. How a workspace entry combines with the built-in list (matched by id — an unknown id adds a model, a known id overrides it field-by-field), the 131K/8K fallbacks you inherit by omitting the limits, what a model actually needs to be useful here (image input + tool calling), and recipes for hosted / local Ollama / your-own-gateway. Ends with how to contribute a model back to the built-in registry — including running :docs:generator:run, since LLM_MODELS.md is generated and hand-editing it is exactly what tripped up #225.

Rewritten opening of docs/configuration.md. The page titled "Configuration" documented Android instrumentation args and scripting callback timeouts and never mentioned trailblaze.yaml at all. It now opens with the file itself: where it lives and how it's discovered, that every section is optional, a table of the top-level keys (defaults, targets, toolsets, tools, providers, llm), the inline-or-ref: shape those lists accept, and one precedence table covering built-ins → user file → workspace file → persisted settings → env/flags. Existing sections are unchanged, below.

Cross-links added from index.md and llm_configuration.md.

Test plan

  • ./gradlew :docs:generator:runLLM_MODELS.md regenerates with all six rows, no other drift
  • Doc anchors resolve against the pages they point at
  • CI green

@handstandsam

Copy link
Copy Markdown
Collaborator Author

🤖 Stacked on top of this: #230 refreshes the whole built-in catalog to current OpenAI / Anthropic / Google models (and drops two ids that were already dead — gemini-3.1-flash-lite-preview is shut down, gemini-3.1-pro-preview-customtools isn't published by Google). It leans on the "no release needed to use a model" page added here as the migration path for anyone still on a dropped id.

Base automatically changed from upstream-2026.08.10 to main August 10, 2026 16:45
#225 added one Gemma 4 model to the google provider. Google serves three on the
Gemini API free tier (12B dense, 26B-A4B MoE, 31B dense) and Ollama publishes the
same three locally, so all six are now built in — pick one by id, no specs to
look up.

Two details worth calling out:

- `gemma-4-31b-it` and `gemma-4-26b-a4b-it` are both real, distinct models. The
  mismatch between #225's yaml and its LLM_MODELS.md row read like a typo; it
  wasn't, and regenerating the doc silently dropped one of them. Both are here now.
- max_output_tokens is 32768, not the 65536 the Gemini models use. Google
  publishes no output cap for Gemma 4; 32768 is the largest figure any host
  documents.

The e2b/e4b edge builds are deliberately omitted from Ollama — 128K context and
much weaker at the screenshot-driven tool calling Trailblaze's agent loop does.
Note `gemma4:latest` resolves to e4b, so name a size explicitly.

LLM_MODELS.md is generated from the provider yamls (`:docs:generator:run`).
Chasing model releases through Trailblaze releases is the wrong loop, and nothing
required it — a workspace trailblaze.yaml can declare any model its provider
serves, and it takes effect on the next run. That was documented only as a passing
sentence inside the LLM reference.

New 'Adding a Model' page covers it directly: how a workspace entry merges with the
built-in list (by id — new ids add, known ids override field-by-field), the 131K/8K
fallbacks you get by omitting the limits, recipes for hosted, local Ollama, and
gateway models, and how to contribute a model back to the built-in registry
(including regenerating LLM_MODELS.md, which is generated).

Also fills a real gap: the page titled 'Configuration' documented Android
instrumentation args and scripting timeouts and never mentioned trailblaze.yaml
itself. It now opens with the file — where it lives, that every section is
optional, what each top-level key does, the inline-or-ref shape, and one precedence
table — with the existing sections kept below.
@handstandsam
handstandsam force-pushed the gemma4-model-coverage branch from d1f00ff to 1bbcffe Compare August 10, 2026 16:45
Landing on the generated External Config page gave no way to find out what
trailblaze.yaml itself is — the page covers the trails/config/ directory
(targets, toolsets, tools) and only mentions the file in passing. It now opens
with a pointer to the Configuration page, which documents the file's keys,
workspace defaults, and precedence.

Generator change (ExternalConfigDocsGenerator) + regenerated output.
@handstandsam
handstandsam merged commit c1ba663 into main Aug 10, 2026
8 checks passed
@handstandsam
handstandsam deleted the gemma4-model-coverage branch August 10, 2026 17:07
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.

1 participant