Skip to content

feat([issue-3231]): pin agy imagegen to a cheap agent model and record the fixed image model - #3232

Merged
atomantic merged 3 commits into
mainfrom
next/issue-3231
Jul 30, 2026
Merged

feat([issue-3231]): pin agy imagegen to a cheap agent model and record the fixed image model#3232
atomantic merged 3 commits into
mainfrom
next/issue-3231

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

Phase 1 of the render-defaults epic (Refs #3231): give Agy image renders the same cheap-tier default Codex renders already have, and stop the Settings UI from implying an image-model choice that doesn't exist.

  • AGY_IMAGEGEN_DEFAULT_MODEL = 'gemini-3.5-flash-low' (server/services/imageGen/modes.js, next to the Codex pins). An unpinned agy render previously resolved to the ANTIGRAVITY_CONFIGURED_DEFAULT sentinel, which resolveCliModel maps to no --model flag at all — so agy ran whatever session model its own config selected (potentially claude-opus-4-6-thinking) just to relay one generate_image tool call. CLOUD_PROVIDER_SPECS[AGY] now falls back to the concrete pin; an explicit imageGen.agy.model in Settings still wins, as does a per-render cloudModel. Code-level default (no migration), per the Codex precedent. Agy bakes effort into the model id (-low/-medium/-high), so no separate effort pin is needed.
  • AGY_IMAGEGEN_IMAGE_MODEL = 'imagen-3.0-generate-002' — the image model behind agy's generate_image tool, fixed server-side by Antigravity. All three selection channels were empirically probed and closed (no tool parameter; --model imagen-* errors pre-generation; prompt directives are ignored — agy itself falsely claims two of those routes work, which is documented at the constant so it isn't re-litigated). Render sidecars now record it as imageModel, distinct from the agent model.
  • Settings → Image Gen → Agy CLI: the model field is relabeled "Agent model (drives the session — not the image model)", the placeholder names the shipped default instead of the no-longer-true "Agy's own configured default", and a read-only "Image model" row names the fixed backend. The Image Gen page's per-render picker default label follows the same resolution.

Legacy queue rows carrying the old sentinel still display "configured default" in MediaJobsQueue — correct for historical jobs. The LLM-session sentinel path (providerModels, TUI spawning) is untouched.

Test plan

  • server: full suite green (23,460 passed). New/updated: resolver fallback = pin (cloudProviderConfig.test.js), sidecar records imageModel (agy.test.js), and a route-level test pinning that a fully-unpinned enqueue persists params.model === 'gemini-3.5-flash-low' into the queue job (routes/imageGen.test.js).
  • client: full suite green (5,429 passed). New: ImageGenTab names imagen-3.0-generate-002 read-only and states it is not selectable.
  • Manually verified end-to-end earlier: agy --model gemini-3.5-flash-low completes a generate_image render.

Refs #3231

…d the fixed image model

An unpinned agy render resolved to the ANTIGRAVITY_CONFIGURED_DEFAULT
sentinel, which resolveCliModel maps to no --model at all — so agy ran
its own configured session default (potentially claude-opus-4-6-thinking)
just to relay one generate_image call. Mirror the Codex precedent
(CODEX_IMAGEGEN_DEFAULT_MODEL) with AGY_IMAGEGEN_DEFAULT_MODEL =
gemini-3.5-flash-low as a code-level default; an explicit
imageGen.agy.model still wins, as does a per-render cloudModel.

The image model behind generate_image is fixed server-side at
imagen-3.0-generate-002 and not selectable through any channel (no tool
parameter, --model imagen-* errors, prompt directives are ignored —
empirically probed; agy itself falsely claims two of those routes work).
Record it in render sidecars as imageModel, name it read-only in
Settings, and relabel the agent-model field so the two axes can't be
conflated.

Phase 1 of the render-defaults epic. Refs #3231
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