Skip to content

Add Antigravity CLI auxiliary provider - #5

Merged
pai-scaffolde merged 1 commit into
mainfrom
fix/google-antigravity-auxiliary-cli-20260521
May 21, 2026
Merged

Add Antigravity CLI auxiliary provider#5
pai-scaffolde merged 1 commit into
mainfrom
fix/google-antigravity-auxiliary-cli-20260521

Conversation

@pai-scaffolde

Copy link
Copy Markdown
Collaborator

Adds a text-only google-antigravity-cli provider backed by local agy -p for Hermes auxiliary tasks, so compression can use Gary's Gemini-aligned Antigravity route without Nous model quota.\n\nVerification:\n- .venv/bin/python -m py_compile agent/google_antigravity_cli_adapter.py agent/auxiliary_client.py hermes_cli/auth.py hermes_cli/models.py\n- scripts/run_tests.sh tests/agent/test_google_antigravity_cli_adapter.py tests/agent/test_auxiliary_named_custom_providers.py tests/hermes_cli/test_api_key_providers.py -q\n- live smoke: get_text_auxiliary_client('compression') resolves GoogleAntigravityCLIClient and call_llm returns COMPRESS_AGY_OK

@pai-scaffolde
pai-scaffolde merged commit 20a9089 into main May 21, 2026
14 of 16 checks passed
@pai-scaffolde
pai-scaffolde deleted the fix/google-antigravity-auxiliary-cli-20260521 branch May 21, 2026 22:21
@github-actions

Copy link
Copy Markdown

🔎 Lint report: fix/google-antigravity-auxiliary-cli-20260521 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 8984 on HEAD, 8983 on base (🆕 +1)

🆕 New issues (1):

Rule Count
unresolved-import 1
First entries
tests/agent/test_google_antigravity_cli_adapter.py:3: [unresolved-import] unresolved-import: Cannot resolve imported module `pytest`

✅ Fixed issues: none

Unchanged: 4740 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 24ddf8baf7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

self.chat = _AntigravityChat(self)

def complete(self, prompt: str) -> str:
cmd = [self.command, *self.args, "-p", prompt, "--print-timeout", self.print_timeout]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Stop passing full prompt in CLI argv

Build the Antigravity request without embedding prompt directly in the command arguments. In complete(), cmd includes -p followed by the full prompt text, which makes auxiliary task content (often conversation/context-compression text that may include secrets) visible via process inspection (ps//proc/<pid>/cmdline) while the subprocess runs. This introduces a real data-exposure path on shared hosts and CI runners; pass prompt content through stdin or another non-argv channel instead.

Useful? React with 👍 / 👎.

Comment thread hermes_cli/models.py
ProviderEntry("huggingface", "Hugging Face", "Hugging Face Inference Providers (20+ open models)"),
ProviderEntry("gemini", "Google AI Studio", "Google AI Studio (Gemini models — native Gemini API)"),
ProviderEntry("google-gemini-cli", "Google Gemini (OAuth)", "Google Gemini via OAuth + Code Assist (free tier supported; no API key needed)"),
ProviderEntry("google-antigravity-cli", "Google Antigravity CLI", "Google Antigravity via local `agy -p` process (text-only; no API key)"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Gate provider from model picker until runtime supports it

Do not expose google-antigravity-cli as a general selectable provider in the model picker until the main runtime resolver handles it. This entry makes users able to set model.provider: google-antigravity-cli, but hermes_cli/runtime_provider.py only has an external-process branch for copilot-acp and otherwise falls through to OpenRouter resolution, so main chat sessions will be routed to the wrong backend (often with model antigravity-cli, which then fails). Either add a runtime-provider branch for this provider or keep it auxiliary-only and hidden from canonical provider selection.

Useful? React with 👍 / 👎.

self.chat = _AntigravityChat(self)

def complete(self, prompt: str) -> str:
cmd = [self.command, *self.args, "-p", prompt, "--print-timeout", self.print_timeout]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid argv length failures for large compression prompts

Do not pass the entire synthesized prompt as a single CLI argument. build_prompt_from_messages() can produce very large payloads for auxiliary compression/title tasks, and placing that text directly after -p risks hitting OS command-line length limits (E2BIG/CreateProcess limits), causing deterministic failures on long sessions instead of graceful model fallback. Send prompt text via stdin or a temp file to keep argument size bounded.

Useful? React with 👍 / 👎.

Comment on lines +95 to +97
def create(self, **kwargs: Any) -> Any:
messages = kwargs.get("messages") or []
model = str(kwargs.get("model") or self._client.model or DEFAULT_ANTIGRAVITY_MODEL)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor per-request timeout in Antigravity adapter

Propagate the request timeout from chat.completions.create(**kwargs) into CLI execution. This adapter reads messages and model but ignores kwargs["timeout"], so auxiliary task timeouts configured in Hermes are not enforced for this provider and calls can run far longer than the task budget (defaulting to the client’s fixed print timeout behavior instead of per-call limits). This can block compression and other auxiliary flows unexpectedly.

Useful? React with 👍 / 👎.

pai-scaffolde pushed a commit that referenced this pull request Jun 12, 2026
…eSessionPage (NousResearch#43487)

When auto-compression rotates the session tip (old #4 → new #5), the
incoming page carries the new tip but the previous list still holds the
old one. The old tip's id differs from the new tip's id, so the existing
id-only dedup in mergeSessionPage() preserves both as separate sidebar
rows.

Add lineage-level dedup: build a set of incoming lineage keys
(`_lineage_root_id ?? id`) and filter survivors whose lineage key
matches any incoming row. This mirrors the existing sessionPinId()
logic used for pin stability.

Fixes NousResearch#43483
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