Skip to content

model,app: pin antigravity to Gemini 3.1 Pro (High); add --antigravity-model - #7

Merged
selyafi merged 1 commit into
mainfrom
feat/antigravity-model-pin
Jun 19, 2026
Merged

model,app: pin antigravity to Gemini 3.1 Pro (High); add --antigravity-model#7
selyafi merged 1 commit into
mainfrom
feat/antigravity-model-pin

Conversation

@selyafi

@selyafi selyafi commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Why

agy is multi-model (Gemini / Claude / GPT-OSS variants), and its session default is user/config-dependent — on this machine it resolves to Gemini 3.5 Flash. That made antigravity reviews non-deterministic across machines and let a light model fill the third slot. Pinning a model restores reproducibility and keeps antigravity a distinct family (Google) from codex (GPT) and claude (Claude).

What

  • Pin Gemini 3.1 Pro (High) by default (DefaultModel) via --model in the agy invocation. Pro-tier reasoning suits correctness review and follows the prompt-only JSON contract more reliably than Flash.
  • SetModel(name) override (empty = no-op, mirroring SetInputBudget) + a new model.ModelSetter capability interface and compile-time guard.
  • --antigravity-model flag and $DIFFSMITH_ANTIGRAVITY_MODEL env, applied via applyAntigravityModel (flag wins → env → pinned default), wired on every entry point alongside --input-budget. Pick e.g. Claude Opus 4.6 (Thinking) to make antigravity a stronger synthesis lead.

Testing

  • +7 tests → 502 pass, build/vet/gofmt clean.
    • adapter: default pin, SetModel override, empty-is-no-op, ModelSetter capability.
    • app: flag-wins-over-env, env-fallback, none-is-no-op.
  • Live integration (-tags=integration) re-run with real agy: confirmed it now runs --model "Gemini 3.1 Pro (High)" and self-IDs as Gemini 3.1 Pro (vs Flash before).

Notes

  • The agy --model string format ("Gemini 3.1 Pro (High)", exactly as agy models lists it) was empirically verified before coding — agy accepts it and switches.
  • Ships as v0.3.1 (this is a release PR — CHANGELOG already promoted).
  • docs/ updates are local-only per the repo's .git/info/exclude; doc.go + CHANGELOG.md are in this diff.

…y-model

agy is multi-model and its session default is user/config-dependent (often
Gemini 3.5 Flash), which made antigravity reviews non-deterministic across
machines. Pin a model via --model so reviews are reproducible and the third
slot stays a distinct family (Google) from codex (GPT) and claude (Claude).

- antigravitycli: pin DefaultModel = "Gemini 3.1 Pro (High)" (Pro-tier
  reasoning for correctness review); add SetModel override (empty = no-op)
  and the model.ModelSetter capability + guard.
- app: --antigravity-model flag and $DIFFSMITH_ANTIGRAVITY_MODEL env, applied
  via applyAntigravityModel (flag wins > env > pinned default), wired on every
  entry point alongside --input-budget.
- changelog: v0.3.1.
@selyafi
selyafi merged commit a87f409 into main Jun 19, 2026
2 checks passed
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