Repository navigation
Fix Antigravity source-control model discovery and retired defaults - #21606
Conversation
|
Authenticated follow-up, 2026-09-20: bundled the exact branch source-control module and ran its real local subprocess path with installed agy 1.2.7 and model
Live model discovery also ran. These are actual generated outputs, not mocks. The probe did not create a commit, rename a branch, or publish a PR. This closes the previous authenticated-generation gap; Windows now also passes all three operations through the same exact-branch module and real subprocess path, using the Windows process API key. The returned branch slug was |
|
Verification update (2026-09-20):
Merge verdict: Approve in stack order for local macOS and native Windows source-control generation with the configured-model fallback. The PR's authenticated commit-message, branch-slug, and PR-field probes support those paths. Direct SSH/WSL/paired-host generation and every vendor/model combination remain unverified; keep the draft status until those are covered. |
ELI5 / evidence / trade-offs auditELI5: Orca can ask agy for a commit message, branch name, and pull-request fields and then parse the answers safely. Proof: Real local macOS/Windows subprocess probes plus focused tests and CI pass; no UI screenshot is applicable to this source-control backend. User-facing trade-off: SSH and every vendor/model combination remain unverified. This note scopes the claim to the evidence above; it does not claim untested remote, SSH, WSL, or vendor combinations. |
|
Understand this PR’s impact Explore downstream dependencies and potential security impact with Blast Radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughAntigravity now uses Priority: ➖ Normal 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
🟠 Major · Forward defaultTuiAgent through remote generation. · runtime-git-client-context.ts:82-100
src/renderer/src/runtime/runtime-git-client-context.ts:82-100
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winForward
defaultTuiAgentthrough remote generation.
getRuntimeCommitMessageSettingsomitsdefaultTuiAgent, while the compatibility check uses it. Add it to the returned settings and propagate it through both Git RPC schemas and the RPC handler. Otherwise, the remote runtime can resolve a different inherited agent or fail to resolve one.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: ac559a98-1e73-4403-b9b7-94f8c5205127
📒 Files selected for processing (10)
src/renderer/src/components/settings/source-control-action-recipe-options.tssrc/renderer/src/runtime/antigravity-generation-compatibility.test.tssrc/renderer/src/runtime/antigravity-generation-compatibility.tssrc/renderer/src/runtime/runtime-git-client-context.tssrc/renderer/src/runtime/runtime-git-generation-client.tssrc/shared/antigravity-source-control.test.tssrc/shared/commit-message-agent-spec.test.tssrc/shared/commit-message-agent-specs-secondary.tssrc/shared/commit-message-model-parsers.tssrc/shared/protocol-version.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.
| } | ||
| const planned = planCommitMessageGeneration(params, '') | ||
| // A recipe or command override can already supply a model that older planners understand. | ||
| if (planned.ok && hasFlag(planned.plan.args, ['--model'])) { |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -C 12 \
'\b(planAdditionalAgentArgs|applySingletonOptionOverrides|agentArgOptionTokens)\b' \
--type=ts .Repository: stablyai/orca
Length of output: 13360
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- compatibility file ---'
sed -n '1,180p' src/renderer/src/runtime/antigravity-generation-compatibility.ts
printf '%s\n' '--- tokenizer and plan definitions ---'
rg -n -C 10 'function tokenizeCustomCommandTemplate|export function tokenizeCustomCommandTemplate|function planAdditionalAgentArgs|export function planAgentCommand|type .*Plan|default' src/shared/commit-message-plan.ts src/shared -g '*.ts'
printf '%s\n' '--- relevant call sites and tests ---'
rg -n -C 8 'antigravity-generation-compatibility|planAgentCommand|agentArgs.*model|--model.*effort|capability' src/renderer src/shared -g '*.ts' -g '*.tsx'Repository: stablyai/orca
Length of output: 45536
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- compatibility file ---'
nl -ba src/renderer/src/runtime/antigravity-generation-compatibility.ts | sed -n '1,140p'
printf '%s\n' '--- commit-message plan top and relevant ranges ---'
rg -n 'tokenizeCustomCommandTemplate|planAdditionalAgentArgs|insertAdditionalAgentArgs|export function plan|default' src/shared/commit-message-plan.ts
nl -ba src/shared/commit-message-plan.ts | sed -n '1,110p'
nl -ba src/shared/commit-message-plan.ts | sed -n '230,340p'
printf '%s\n' '--- tokenizer declaration and implementation ---'
rg -n -l 'tokenizeCustomCommandTemplate' src/shared --glob '*.ts' | xargs -r -n1 sh -c 'echo "--- $0"; rg -n -C 20 "tokenizeCustomCommandTemplate" "$0"'Repository: stablyai/orca
Length of output: 30449
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- singleton override flow ---'
nl -ba src/shared/commit-message-plan.ts | sed -n '105,235p'
printf '%s\n' '--- Antigravity specs and model argument construction ---'
rg -n -C 12 "antigravity|ANTIGRAVITY|configured model|model.*default" src/shared/commit-message-agent-spec.ts src/shared src/renderer/src/runtime --glob '*.ts'
printf '%s\n' '--- focused plan and compatibility tests ---'
rg -n -C 10 "planCommitMessageGeneration|antigravityGenerationCompatibilityError|agentArgs|configured.*model|ANTIGRAVITY_CONFIGURED_MODEL_RUNTIME_CAPABILITY" src/shared src/renderer/src/runtime --glob '*test*.ts' --glob '*test*.tsx'Repository: stablyai/orca
Length of output: 45545
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- singleton override flow ---'
nl -ba src/shared/commit-message-plan.ts | sed -n '105,235p'
printf '%s\n' '--- Antigravity spec locations ---'
rg -n "id: ['\"]antigravity['\"]|antigravity.*buildArgs|ANTIGRAVITY" src/shared --glob '*.ts' --glob '!*.test.ts' --glob '!*.test.tsx'
printf '%s\n' '--- compatibility tests ---'
nl -ba src/renderer/src/runtime/antigravity-generation-compatibility.test.ts | sed -n '1,220p'Repository: stablyai/orca
Length of output: 10589
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- generation caller ---'
rg -n -C 14 'antigravityGenerationCompatibilityError|generateRuntimeCommitMessage|generateRuntimePullRequestFields|sourceControlAiResolvedParams' src/renderer/src/runtime/runtime-git-generation-client.ts src/renderer/src/runtime --glob '*.ts' --glob '!*.test.ts'
printf '%s\n' '--- Antigravity spec ---'
nl -ba src/shared/commit-message-agent-specs-secondary.ts | sed -n '190,245p'Repository: stablyai/orca
Length of output: 42658
Require a valid --model operand before bypassing compatibility. planAdditionalAgentArgs accepts bare --model and --model --effort low, and hasFlag matches the bare token. This can skip the capability check while the remote request still carries model: 'default'. Require a non-option value after --model or a non-empty --model=... value before returning early.
Source: Learnings
There was a problem hiding this comment.
Important
This PR introduces a client-side compatibility gate that resolves the inherited agent from the client's defaultTuiAgent, but that field is never forwarded to the remote runtime — the server resolves from its own settings store instead, so the gate's verdict can diverge from what the server actually runs.
Reviewed changes
- Antigravity model parsing —
parseAntigravityModelsnow splits the currentid<TAB>labelformat while keeping the legacy display-name format (requires a(low|medium|high|thinking)suffix), and dedupes rows. - Retired default replaced by a sentinel — the bundled Gemini 3.5 list is gone;
defaultModelIdisdefault("Config default"),buildArgsomits--modelfor it, and--effortis emitted only when nonempty (singletonOptionscovers--effort). - Runtime capability gate — new
antigravityGenerationCompatibilityErrorblocks sendingdefaultto a runtime server that does not advertisegit.antigravity-configured-model.v1, with an escape when the planned argv already carries--model(recipe/command override). Wired into both runtime generation clients. - Settings hint — the Antigravity recipe agent-args placeholder is now
--effort low. - Tests — new parser/buildArgs/compatibility/retired-saved-model coverage (local + SSH host keys, all three operations); focused suites pass locally.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
Addressed CodeRabbit's actionable remote-generation comment in commit
Verification: focused Vitest (66 tests) passed; |
There was a problem hiding this comment.
Important
The new defaultTuiAgent param rejects the legitimate 'blank' sentinel, so remote source-control generation fails for any user whose default agent is "blank terminal". One inline comment below.
Reviewed changes
The delta since the prior Pullfrog review (cae60da) adds the forwarding that closes the earlier gate/server mismatch, plus a test for it.
- Forwarded the inherited agent to the runtime —
defaultTuiAgentnow rides onGitGenerateCommitMessage(inherited byGitGeneratePullRequestFields) and is threaded throughgetRuntimeCommitMessageSettings,RuntimeCommitMessageSettingsOverride, andbuildCommitMessageGenerationOverride, sogetRuntimeGitGenerationSettingsmerges the client's agent over the server store and the compatibility gate's verdict matches what the server actually runs. - Covered the forwarding —
runtime-git-client.test.tsasserts the field reaches thegit.generateCommitMessageparams.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| sourceControlAi: SourceControlAiSettings.optional(), | ||
| sourceControlAiResolvedParams: ResolvedSourceControlAiGenerationParams.optional(), | ||
| agentCmdOverrides: z.record(z.string(), z.string()).optional(), | ||
| defaultTuiAgent: OptionalTuiAgent.nullable(), |
There was a problem hiding this comment.
GlobalSettings.defaultTuiAgent is TuiAgent | 'blank' | null, and OptionalTuiAgent rejects the 'blank' sentinel because isTuiAgent('blank') is false. The client forwards this field whenever it is defined, so a user whose default agent is "blank terminal" sends 'blank' and the server rejects the whole request before the handler runs.
Technical details
# Accept the `blank` default-agent sentinel
## Affected sites
- `src/shared/rpc-contract/git-params.ts:187` — `defaultTuiAgent: OptionalTuiAgent.nullable()`; `OptionalTuiAgent` superRefines with `isTuiAgent` (`src/shared/tui-agent-config.ts:301`), which is false for `'blank'`.
- `src/renderer/src/runtime/runtime-git-client-context.ts:107-109` — forwards `defaultTuiAgent` whenever it is defined, including `'blank'`.
- `src/shared/rpc-contract/client-settings-params.ts:85-90` — existing precedent allows `null | 'blank' | TuiAgent` on the wire for this same setting.
- `src/main/runtime/rpc/dispatcher-request-parsing.ts:21-26` — a failed parse returns `invalidArgumentResponse`.
Verified locally: `GitGenerateCommitMessage.safeParse({ worktree: 'id:wt-1', defaultTuiAgent: 'blank' }).success === false`, while `null` and `'codex'` pass.
## Required outcome
- A client whose `defaultTuiAgent` is `'blank'` must still generate remotely; the field should not make the call invalid.
## Suggested approach (optional)
- Mirror `client-settings-params.ts`: accept `null`, `'blank'`, or a `TuiAgent`; or normalize `'blank' -> null` in `getRuntimeCommitMessageSettings` before sending, since both mean "no inherited agent" to `resolveCommitMessageSettings`.
## Open questions for the human (optional)
- Should `'blank'` reach the server at all, or be normalized to `null` client-side?Source Control AI pinned Codex to gpt-5.5, which Codex retires on 2026-10-14. Any path that still resolves to that slug would then break commit-message and PR-field generation. Follow the Antigravity precedent (stablyai#21606): add a "Config default" entry for Codex, make it the default, and omit --model when it is selected so `codex exec` uses the model from the user's Codex config or Codex's own default. Explicit model choices still pass --model. Older remote servers would still build `--model default`, so advertise git.codex-configured-model.v1 and have clients refuse the sentinel for servers without it, the same way Antigravity is gated. The gate now covers both agents, and the two capabilities live in their own module because protocol-version.ts is at the max-lines limit. Written with AI assistance (Claude Code). Fixes stablyai#24481
* fix(source-control): use Codex's configured model by default Source Control AI pinned Codex to gpt-5.5, which Codex retires on 2026-10-14. Any path that still resolves to that slug would then break commit-message and PR-field generation. Follow the Antigravity precedent (#21606): add a "Config default" entry for Codex, make it the default, and omit --model when it is selected so `codex exec` uses the model from the user's Codex config or Codex's own default. Explicit model choices still pass --model. Older remote servers would still build `--model default`, so advertise git.codex-configured-model.v1 and have clients refuse the sentinel for servers without it, the same way Antigravity is gated. The gate now covers both agents, and the two capabilities live in their own module because protocol-version.ts is at the max-lines limit. Written with AI assistance (Claude Code). Fixes #24481 * fix(source-control): honor -m, repo overrides and low effort for Codex Review on #24495 found three gaps in the configured-model change. The remote compatibility gate only recognized --model, so a recipe passing Codex's -m short flag was rejected on older servers. The gate also ignored the repository's per-operation model override that the server applies. And moving Codex to Config default dropped the low reasoning effort the pinned model used, which would change cost and latency for users whose Codex config sets a higher effort. * fix(source-control): match gate repo and model checks to the server Repo ids can repeat across hosts, so the configured-model gate now reads the repo row for the worktree's host instead of the first id match, the same row the server applies. A recipe passing --model default or -m default no longer counts as an explicit model, since an older server still forwards that sentinel to the Codex CLI. * fix(source-control): read only the worktree host's repo row in the gate A worktree that names its own host must not fall back to the runtime host's repo row, since the server applies the row for the worktree's host. Also cover an environment id that needs URL encoding. * fix(source-control): default Codex to GPT-5.6 Terra low --------- Co-authored-by: Jinjing <[email protected]>

ELI5
Orca was asking Antigravity for a model that no longer exists. It now reads the model names the installed CLI actually offers and uses the CLI's configured model when discovery is unavailable.
What Changed
Parse current
agy modelsoutput as separate IDs and labels, skip progress/header rows, and retain the older display-name format. Replace the retired Gemini 3.5 fallback withConfig default, which omits--model. Pass a requested effort only when nonempty, and let recipe model/effort arguments override generated values once. Settings suggest--effort lowinstead of a retired model.Why
Pinning another Gemini version would repeat the same failure when models retire. The existing
--print=<prompt>delivery fix stays intact; the remaining problem is model discovery and fallback selection. This uses the existing shared planner for local and remote generation.Linked Issue
Refs #18567. Related overlapping work: #18138 and #14157. This draft does not close or supersede those PRs yet.
Visual Proof
Hidden Electron build, identity verified as this worktree. Selected Antigravity through the rendered source-control recipe picker and inspected the screenshot. This proves the settings state; it does not prove successful text generation.
Testing
agyon macOS and the hidden Orca build. Real discovery returned 11 correctly parsed models through Orca's IPC. The retired Gemini 3.5 argument reproduces the model-selection error; omitting it reaches generation.pnpm tc(node, CLI, renderer), focused lint, and the changed-code quality gate pass.Authenticated verification (2026-09-20): all three real macOS and native Windows source-control generation paths now succeed with installed agy 1.2.7 and configured model
default: commit message, branch slug, and parsed PR fields. The probe used synthetic README context and published nothing. All CI checks pass. Direct SSH source-control generation remains untested.The old error prints
--effort ""even when no effort argument was passed; it is diagnostic output, not evidence of an empty argv value.Review
Agent skill upstream boundary
Notes
No wire format or credential handling changes. The configured-model behavior advertises
git.antigravity-configured-model.v1; newer clients refuse that selection on older servers with an update-or-select-an-explicit-model message. Explicit models, including recipe CLI overrides, remain usable without the new capability. The shared planner continues to run on the execution host. Provider-specific behavior is confined to the Antigravity spec and parser.Checklist