Skip to content

feat(mitm): add Antigravity reasoning effort overrides - #2584

Closed
trfi wants to merge 1 commit into
decolua:masterfrom
trfi:feat/antigravity-mitm-reasoning-effort
Closed

trfi wants to merge 1 commit into
decolua:masterfrom
trfi:feat/antigravity-mitm-reasoning-effort

Conversation

@trfi

@trfi trfi commented Jul 13, 2026

Copy link
Copy Markdown

Summary

Add per-source-model reasoning effort overrides to the Antigravity MITM Proxy alongside the existing destination model mappings.

Each Antigravity model row now supports:

  • Default
  • None
  • Minimal
  • Low
  • Medium
  • High
  • XHigh
  • Max

Default preserves the thinking configuration sent by Antigravity. Explicit selections override the request and are translated through 9Router's existing unified thinking pipeline.

Changes

  • Add an accessible reasoning selector beside each Antigravity model mapping.
  • Allow model and reasoning overrides to be configured independently.
  • Support reasoning-only overrides without changing the source model.
  • Store structured { model, reasoningEffort } entries.
  • Preserve compatibility with legacy string-based model mappings.
  • Normalize cached aliases for the standalone MITM runtime.
  • Validate reasoning values at the API boundary.
  • Remove conflicting Gemini thinking fields when an explicit effort is selected.
  • Keep native Antigravity thinking fields unchanged when effort is Default.
  • Add focused tests for mapping normalization and request transformation.
  • Document persistence, reasoning values, and safety behavior.

Backward compatibility

Existing mappings remain valid:

{
  "gemini-3-flash-agent": "provider/model-id"
}

They are normalized at the API and standalone MITM boundaries into:

{
  "gemini-3-flash-agent": {
    "model": "provider/model-id"
  }
}

No database migration is required.

Verification

  • Focused ESLint check passed.
  • CommonJS MITM syntax checks passed.
  • Mapping and request-transformation smoke assertions passed.
  • Next.js development server started successfully.
  • Mapping API route compiled successfully.
  • git diff --check passed.

Notes

  • The repository's root dependencies do not include Vitest, so the focused Vitest file was not executed in the existing workspace.
  • Equivalent core normalization and request-transformation assertions were executed directly with Node.
  • Antigravity tab-completion models remain excluded from MITM rerouting.

diegosouzapw added a commit to diegosouzapw/OmniRoute that referenced this pull request Jul 17, 2026
* feat(mitm): add Antigravity reasoning-effort overrides

The Antigravity MITM alias mapping only ever swapped the destination model;
there was no way to override the reasoning effort Antigravity's own
thinkingConfig requested. Alias entries are now `{ model?, reasoningEffort? }`
(a legacy plain-string mapping still normalizes to `{ model }`, so no DB
migration is required). The standalone proxy (server.cjs) forwards the chosen
tier as a top-level `reasoningEffortOverride` on the intercepted request; the
antigravity->openai translator honors it ahead of its thinkingConfig-derived
guess, and an explicit "none" suppresses reasoning_effort entirely even when
Antigravity's own request asked for thinking. Reuses the existing canonical
5-tier reasoning vocabulary (`@/shared/reasoning/effortStandardization.ts`,
with max/extra aliasing to xhigh) instead of introducing a new one. The API
route validates the reasoning-effort value at the boundary and the Antigravity
tool card UI now exposes a per-model reasoning-effort selector alongside the
existing model-mapping input.

Co-authored-by: Truong Fiu <gnourtf@gmail.com>
Inspired-by: decolua/9router#2584

* chore(changelog): fragment for #7228

---------

Co-authored-by: Truong Fiu <gnourtf@gmail.com>
@trfi trfi closed this Jul 27, 2026
HouMinXi pushed a commit to HouMinXi/OmniRoute that referenced this pull request Aug 2, 2026
…7228)

* feat(mitm): add Antigravity reasoning-effort overrides

The Antigravity MITM alias mapping only ever swapped the destination model;
there was no way to override the reasoning effort Antigravity's own
thinkingConfig requested. Alias entries are now `{ model?, reasoningEffort? }`
(a legacy plain-string mapping still normalizes to `{ model }`, so no DB
migration is required). The standalone proxy (server.cjs) forwards the chosen
tier as a top-level `reasoningEffortOverride` on the intercepted request; the
antigravity->openai translator honors it ahead of its thinkingConfig-derived
guess, and an explicit "none" suppresses reasoning_effort entirely even when
Antigravity's own request asked for thinking. Reuses the existing canonical
5-tier reasoning vocabulary (`@/shared/reasoning/effortStandardization.ts`,
with max/extra aliasing to xhigh) instead of introducing a new one. The API
route validates the reasoning-effort value at the boundary and the Antigravity
tool card UI now exposes a per-model reasoning-effort selector alongside the
existing model-mapping input.

Co-authored-by: Truong Fiu <gnourtf@gmail.com>
Inspired-by: decolua/9router#2584

* chore(changelog): fragment for diegosouzapw#7228

---------

Co-authored-by: Truong Fiu <gnourtf@gmail.com>
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…7228)

* feat(mitm): add Antigravity reasoning-effort overrides

The Antigravity MITM alias mapping only ever swapped the destination model;
there was no way to override the reasoning effort Antigravity's own
thinkingConfig requested. Alias entries are now `{ model?, reasoningEffort? }`
(a legacy plain-string mapping still normalizes to `{ model }`, so no DB
migration is required). The standalone proxy (server.cjs) forwards the chosen
tier as a top-level `reasoningEffortOverride` on the intercepted request; the
antigravity->openai translator honors it ahead of its thinkingConfig-derived
guess, and an explicit "none" suppresses reasoning_effort entirely even when
Antigravity's own request asked for thinking. Reuses the existing canonical
5-tier reasoning vocabulary (`@/shared/reasoning/effortStandardization.ts`,
with max/extra aliasing to xhigh) instead of introducing a new one. The API
route validates the reasoning-effort value at the boundary and the Antigravity
tool card UI now exposes a per-model reasoning-effort selector alongside the
existing model-mapping input.

Co-authored-by: Truong Fiu <gnourtf@gmail.com>
Inspired-by: decolua/9router#2584

* chore(changelog): fragment for diegosouzapw#7228

---------

Co-authored-by: Truong Fiu <gnourtf@gmail.com>
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