Register Gemini image models in hero_aibroker so hero_slides Generate All works out of the box #66
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_aibroker#66
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
hero_slides#49 acceptance bullet 7 ("Generate All actually generates") proved the call chain works end-to-end on a workstation: hero_slides → hero_aibroker → upstream → response. The chain is fine; the model registry isn't.
Observed on a fresh
service slides start --downloadworkstation:Meanwhile
hero_slides_admin/templates/index.htmldeclares:When the operator clicks "Generate All", hero_slides asks aibroker for
gemini-3.1-flash-image-preview. Aibroker has no Gemini model, so the cheapest-routing strategy picks a Qwen model. The Qwen API rejects the request:— because
image_configis a Gemini-shape parameter that Qwen doesn't accept.What "works out of the box" looks like
A workstation with
OPENROUTER_API_KEYset in hero_proc secrets (already true on the test workstation per home#225 META compliance work) should be able to click "Generate All" and get a.pngper slide.Gemini is reachable via OpenRouter (the registered key supports it). hero_aibroker just needs Gemini's two image models registered with the openrouter provider so the cheapest-routing picks the correct model when hero_slides asks for one.
Acceptance
gemini-3.1-flash-image-previewregistered in hero_aibroker via openrouter provider.gemini-3-pro-image-previewregistered (forimage-model-pro).OPENROUTER_API_KEYinhero_procsecrets:hero_slides_examples/hero_slides_intro/01_title→ triggerslide.generate { force: true }→ output PNG dated within the last minute lands inexamples/hero_slides_intro/output/01_title.png. (Or the bundled deck-level test fromexamples/hero_slides_examples/.)proc logs get hero_aibrokershows the outbound OpenRouter call with the expected model name (no fallback to Qwen).Out of scope
Refs
lhumina_code/hero_slides/crates/hero_slides_admin/templates/index.htmlhero_slides_lib::models::basic_image_model()— what hero_slides asks forClosing — verified end-to-end on a live workstation.
Merged: PR #67
7d90630adds two model entries tomodelsconfig.yml:gemini-3.1-flash-image-preview→ openroutergoogle/gemini-3.1-flash-image-previewgemini-3-pro-image-preview→ openroutergoogle/gemini-3-pro-image-previewBoth slugs verified verbatim against
https://openrouter.ai/api/v1/modelsbefore locking the YAML in.Verification (2026-05-10)
modelsconfig.ymlto~/hero/var/hero_aibroker/modelsconfig.ymland restarted hero_aibroker.models.listover the rpc.sock confirms both Gemini image models are registered with the openrouter provider:slide.generateagainstexamples/hero_slides_intro/01_titlefrom the hero_slides admin dashboard — the call reached OpenRouter via the newgemini-3.1-flash-image-previewroute and returned:This is the correct failure mode — the request reached OpenRouter with valid auth using the new Gemini slug. NOT the previous failure (
HTTP 400 "property 'image_config' is unsupported"from a Qwen fallback). Aibroker logs confirm the outbound TLS handshake toopenrouter.ai. The workstation just needs OpenRouter credits to actually generate; the code/config path is correct.Any workstation with a funded
OPENROUTER_API_KEYin hero_proc secrets will now Generate All out of the box.Signed-off-by: mik-tf