Skip to content

[Feature]: google-antigravity — route base model + reasoning effort to the correct tiered wire ID (collapsed picker rows) #2025

Description

@GoldenLoaf24h

Area

Provider integration — Google Antigravity (reasoning-effort routing)

What are you trying to accomplish?

Change Gemini Flash thinking effort on the google-antigravity provider without switching models. After #1897, discovery exposes each CCA thinking tier as a separate picker row (gemini-3.7-flash-low/-medium/-high, same for 3.5/3.6, gemini-3.1-pro-low/high), so the client's reasoning-effort control no longer has any effect on the rows users actually see.

What prevents this today?

Rule 1 of resolveAntigravityEffortWireModel (src/providers/antigravity-models.ts) treats any suffix ID as "the suffix IS the effort": it returns the resolved wire ID unchanged and deliberately sends no thinkingConfig, so an explicit effort from the client (e.g. low, or none) is silently discarded for suffix models. The smoother path already exists but is unreachable from the picker: rule 2 maps a base model + effort to the correct tiered wire ID (gemini-3.7-flash + high → the high-tier wire ID, thinkingLevel preserved), and ANTIGRAVITY_MODEL_EFFORTS already advertises the ladder for base IDs (gemini-3.7-flash: [low, medium, high]).

What should OpenCodex do?

  • Expose collapsed base-model rows for discovered tiered models (by default or via an option) and drive the upstream wire ID from the request's reasoning effort through the existing rule-2 mapping — one model selection covers all thinking levels.
  • Honor an explicit effort when a suffix ID was selected (strip the suffix, then apply rule 2), or at least surface a warning that the effort was ignored instead of silently dropping it.
  • Document a none/minimallow expectation: CCA exposes no "thinking off" tier for Flash, so none cannot be honored upstream.

Possible implementation

  • When discovery returns tier-suffixed rows, also register the derived base ID with its effort ladder from ANTIGRAVITY_MODEL_EFFORTS (dedup per base), letting rule 2 resolve base + effort → wire ID at request time in src/adapters/google.ts.
  • In rule 1, when an explicit effort is present and differs from the suffix tier, either apply rule 2 on the stripped base or log a warning once per request.

Example usage or interface

model: gemini-3.7-flash, reasoning effort: low   → wire: low tier
model: gemini-3.7-flash, reasoning effort: high  → wire: high tier

Live-verified in commit a70bb78: the effort ladder reaches the wire (reasoning_tokens 0/27/84 for low/medium/high).

Alternatives or workarounds

  • Keep one picker row per tier and switch models to change effort (current behavior).
  • Pin gemini-3.7-flash-low as the near-"no thinking" choice (low measured 0 reasoning tokens in the commit above).

Additional context

Rule semantics reference: devlog _fin/260722_antigravity_effort_routing/010_models.md (precedence rules 1–3) and 020_adapter.md (suffix IDs receive no clamping; rule 1 returns thinkingLevel: undefined).

Checks

  • I searched existing issues and documentation.
  • I removed secrets and personal data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneeds-infoWaiting on reporter for a concrete spec or reproductionproviderProvider adapters, OpenAI-compat presets, upstream API quirks

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions