Repository navigation
Conversation
Add explicit OAuth/profile storage, cancellation-safe token refresh, bounded native transport and lossless fixed-session replay/schema adaptation. Keep disabled discovery baseline-compatible, expose read-only capabilities, and provide local count estimates with documented limitations. Validated offline under umask 022 with formatting, Clippy, build, 1206 Rust tests and 83 Python fixture/launcher tests. Native Google acceptance remains unverified; no live provider or service activation is included. Co-Authored-By: Claude Code <noreply@anthropic.com>
Default all outbound requests to claude-code-proxy/<version>. Apply a validated provider-specific full User-Agent only to generation and project discovery, preserving proxy identity for OAuth and exact override bytes. Keep the independently validated OS-string override outside legacy UTF-8 environment snapshots, with redacted failures and unchanged provider-scoped invalid configuration behavior. Tests-first regressions, independent review, fmt, Clippy, build and 1222 isolated tests pass under umask 022. No live activation. Co-Authored-By: Claude Code <noreply@anthropic.com>
Add opt-in hosted-code completion with PKCE and strict URL/state validation, private bounded Unix terminal input, and explicit post-commit and bounded-exit semantics. Keep automatic callback login unchanged. Co-Authored-By: Claude Code <noreply@anthropic.com>
Render visible input with a bounded terminal viewport, preserve cancellation and redaction guarantees, and verify native proxy routing with a local fixture. Co-Authored-By: Claude Code <noreply@anthropic.com>
Expose only allowlisted Google error labels and validated retry hints, while preserving HTTP status and never retrying failed generation. Co-Authored-By: Claude Code <noreply@anthropic.com>
Bound refresh retries within the original deadline, preserve credentials with scoped cooldowns, and retain fail-closed ambiguous-rotation handling. Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Use the consumer Cloud Code origin for discovery and generation while preserving explicit endpoint overrides and fixed OAuth URLs. Add selection regressions and lossless non-streaming client-tool replay coverage against synthetic upstream SSE. Co-Authored-By: Claude Code <noreply@anthropic.com>
Accept propertyNames with bounded recursive validation and complete local constraint guidance. Retain original argument validation, lossless codecs, and reference rejection. Cover optional CLI record-shaped tools and pre-auth failure ordering. Co-Authored-By: Claude Code <noreply@anthropic.com>
Match the observed official loadCodeAssist metadata without changing project or credential-owner behavior. Preserve allowlisted ErrorInfo reasons from the exact daily API domain, with pure privacy and boundary regressions. Co-Authored-By: Claude Code <noreply@anthropic.com>
Add the user role to system instructions and serialize one compiled function declaration per tool group while preserving declaration order and codecs. Use 65536 only when max_tokens is absent or null, preserving explicit caller limits and validation. Cover request and HTTP ingress contracts for stream and non-stream callers without changing transport, authentication, replay, labels, or user-agent policy. Co-Authored-By: Claude Code <noreply@anthropic.com>
Use a generation-only Hyper transport with explicit proxy/TLS behavior, bounded gzip decoding and foreground cancellation. Preserve the existing OAuth and project-discovery clients and disable automatic generation retries. Add verified local TLS, framing, compression, cancellation and proxy regression coverage. Co-Authored-By: Claude Code <noreply@anthropic.com>
Preserve both native Antigravity routing/privacy regressions and upstream Grok classifier routing tests. Retain the published native configuration reference without hand-editing it and clarify requested-model classifier routing in the README. Combined verification follows before publication. Co-Authored-By: Claude Code <noreply@anthropic.com>
Select a bounded all-or-nothing compatible schema projection, preserving explicit defaults, proto-style zero omission and quoted int64 limits. Keep original validators, fallback codecs and V1 replay recipes unchanged. Emit VALIDATED for explicit auto with declarations and add synthetic verified-HTTPS regression coverage. Co-Authored-By: Claude Code <noreply@anthropic.com>
Require absent Accept, exact JSON content type and gzip negotiation in the combined transport/schema fixture. Preserve strict method, URL, authorization and schema assertions. Verified combined upstream suite, formatting and strict Clippy pass. Co-Authored-By: Claude Code <noreply@anthropic.com>
Reconstruct compatible synthetic caller schemas from observed typed tool shapes and compare complete outgoing groups through prepare. Keep names and text synthetic and preserve quoted int64 limits. Co-Authored-By: Claude Code <noreply@anthropic.com>
Add a closed default-legacy metadata policy and separately versioned V2 transcript state for observed main-user and signed string-tool continuations. Preserve V1 codec/session semantics, bind logical and user-execution identities separately from the backend session, and allocate dispatch IDs only after actual native binding checks. Use value-only native count inputs and an advisory nonsecret serving snapshot without credential/profile reads, refresh, network dispatch or ID allocation. Retain legacy counting, reject unqualified transition shapes, and document scoped coverage without at-most-once or all-account claims. Co-Authored-By: Claude Code <noreply@anthropic.com>
Start synthetic services on kernel-selected loopback ports and discover their actual bound address from owned startup stderr. Reject early child exit rather than accepting an unrelated TCP listener, retain complete bounded stderr for security assertions, and cover foreign-listener and delayed-start cases. Co-Authored-By: Claude Code <noreply@anthropic.com>
…te agy systemInstruction
… and carrierless prefix replay
…rmalized tool inputs
…d thinking budgets
…rredToolPlaceholder, and handle non-STOP tool finish reasons
…ramsToSchema
Replace Codec::Json string-wrapping, strict keyword/format whitelisting, and
post-generation jsonschema validation rejection with agy-style native
v1main.Schema projection:
- Inline local #/... $ref definitions with cycle protection
- Fold simple allOf object compositions and unwrap nullable Optional[T] /
["T", "null"] / string enum+const unions (e.g. TaskUpdate.status)
- Alias tool names outside ^[a-zA-Z_][a-zA-Z0-9_-]{0,63}$ via ccp_<sha256>
for Vertex-Anthropic and Gemini parity
- Delegate semantic argument validation to downstream callers via tool_result
(is_error: true) and drop the jsonschema crate dependency
chris7iu
marked this pull request as ready for review
November 12, 2026 13:25
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an experimental, opt-in (
default-off) native Antigravity provider (src/providers/antigravity/) for Anthropic/v1/messagesand local/v1/messages/count_tokensbacked directly by the Cloud Code Assistv1internal:streamGenerateContent?alt=sseAPI (noagysubprocess wrapper or credential import).When disabled (the default), existing provider catalogs, model routing, aliases, and auto-review overrides are untouched.
Supported Models
antigravity/gemini-4-carbon-{low,medium,high}antigravity/gemini-4-argon-{low,medium,high}antigravity/claude-opus-5-5-{low,medium,high}(Optional
[1m]model suffixes from Claude Code are accepted.)Highlights
https://daily-cloudcode-pa.googleapis.com(baseUrlconfigurable), gzip response decoding,agy-aligned timeouts (300sheader and SSE stream-idle budgets,3600sturn deadline, no automatic inference retries),15sdownstream: ping\n\nSSE heartbeats while collecting buffered turns, and bounded/redacted upstream error diagnostics./modelswitching: Preserves native parts and thought signatures in a versionedccp:antigravity:v1:carrier across tool turns, canonicalizes client-normalized tool inputs, and folds unsigned or cross-model/cross-tier prefix turns into<prior_conversation_transcript>user context so mid-session model or effort changes continue cleanly.agy-style nativeSchemaprojection: Translates JSON Schema tool definitions directly into Cloud Code Assistv1main.Schema($ref/$defsinlining with cycle guards,allOf/anyOf/oneOfnormalization,const→enum, stringifiedenumvalues), skips Claude CodeDeferredToolPlaceholder/defer_loadingplaceholders, and aliases MCP/external tool names outside[a-zA-Z_][a-zA-Z0-9_-]{0,63}via deterministicccp_<sha256>mapping.antigravity auth login), bounded foreground-TTY manual code entry on Unix (antigravity auth login --manual),logout, and pure read-onlystatus/GET /v1/models?include_capabilities=true, with sibling-locked credential storage and singleflight token refresh./v1/messages/count_tokensestimates tokens locally without reading credentials, refreshing tokens, or making network calls.Configuration & CLI
Enable via
~/.config/claude-code-proxy/config.jsonorCCP_ANTIGRAVITY_*environment variables:{ "antigravity": { "enabled": true, "clientId": "<oauth-client-id>", "clientSecret": "<oauth-client-secret>", "projectId": "<optional-gcp-project-id>", "baseUrl": "https://daily-cloudcode-pa.googleapis.com", "userAgent": "<optional-native-api-user-agent>" } }claude-code-proxy antigravity auth login [--manual] claude-code-proxy antigravity auth status claude-code-proxy antigravity auth logoutTest Plan
cargo fmt --all -- --checkcargo clippy --all-targets -- -D warningscargo test --lib antigravitycargo test --test antigravity_schema_parity --test antigravity_transport --test server --test clipytest tests/antigravity_compatibility