Skip to content

feat!: configure the image model instead of hardcoding Gemini - #48

Open
nielsrowinbik wants to merge 1 commit into
mainfrom
feat/openrouter-image-backend
Open

feat!: configure the image model instead of hardcoding Gemini#48
nielsrowinbik wants to merge 1 commit into
mainfrom
feat/openrouter-image-backend

Conversation

@nielsrowinbik

@nielsrowinbik nielsrowinbik commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Generation was locked to Google's Gemini image API: one model, one place to buy it. The pipeline now calls an OpenAI-compatible chat/completions endpoint (see the illustrations repo), so GENERATE_API_URL and GENERATE_MODEL choose where the calls go — OpenRouter by default, or a server on your own network, which is the case that could not be served before.

The app itself still never calls a model. It reads GENERATE_API_KEY as the feature gate and passes the environment through to the pipeline, so the two new variables need no plumbing here; PIPELINE_VERSION moves to v2.0.0 to pick up the pipeline that reads them.

BREAKING CHANGE: GEMINI_API_KEY is no longer read; set GENERATE_API_KEY instead. A Google AI key will not authenticate against OpenRouter, so this needs a new key rather than a renamed variable. The refresh service says so at startup when it finds only the old name, rather than silently leaving generation off.

BREAKING CHANGE: The Home Assistant app's gemini_api_key option is now generate_api_key, joined by generate_api_url and generate_model. The unused generate_max_per_cycle option is removed as well. Home Assistant validates saved options against the schema, so an app carrying either removed option refuses to start until it is deleted from the configuration.

Generation was locked to Google's Gemini image API: one model, one place
to
buy it. The pipeline now calls an OpenAI-compatible chat/completions
endpoint
(see the illustrations repo), so GENERATE_API_URL and GENERATE_MODEL
choose
where the calls go — OpenRouter by default, or a server on your own
network,
which is the case that could not be served before.

The app itself still never calls a model. It reads GENERATE_API_KEY as
the
feature gate and passes the environment through to the pipeline, so the
two new
variables need no plumbing here; PIPELINE_VERSION moves to v2.0.0 to
pick up
the pipeline that reads them.

BREAKING CHANGE: GEMINI_API_KEY is no longer read; set GENERATE_API_KEY
instead. A Google AI key will not authenticate against OpenRouter, so
this
needs a new key rather than a renamed variable. The refresh service says
so at
startup when it finds only the old name, rather than silently leaving
generation off.
* the Home Assistant app's `gemini_api_key` option is now
  `generate_api_key`, joined by `generate_api_url` and `generate_model`.
  The
  unused `generate_max_per_cycle` option is removed as well. Home
  Assistant
  validates saved options against the schema, so an app carrying either
  removed
  option refuses to start until it is deleted from the configuration.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
saezuri 8630df4 Commit Preview URL

Branch Preview URL
Aug 31 2026, 02:25 PM

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