- Enforce per-model disabled, permanent-unavailability, forced-cooldown, and non-quota cooldown checks in findAllAntigravityCreditsCandidateAuths and prepareAntigravityRequest while preserving late-switched variant admission.
- Track and persist non-capacity non-quota cooldown deadlines separately so a subsequent 503 capacity error cannot mask an active non-quota model cooldown in memory or across restarts.
- Add unit and end-to-end streaming/non-streaming regression tests covering direct model admission, 404-then-503 restart persistence, and switched variant recovery.
Closes: #8182
- Canonicalize and merge snake_case tool_config and function_calling_config fields into camelCase toolConfig before setting VALIDATED mode on Claude requests, preserving non-conflicting fields without emitting duplicate proto-JSON keys.
- Recognize, cap, and strip all four generationConfig/generation_config maxOutputTokens/max_output_tokens paths across buildRequestForModelDoc and CapAntigravityMaxOutputTokensDoc while merging mixed generation config containers.
- Add regression tests covering Claude tool_config canonicalization, non-Claude max_output_tokens stripping, and snake_case generation_config output capping.
Closes: #8183
- Rebind cpa_signature_cache_grant and cpa_signature_cache_grant_binding after RefreshAuthViaHome in Refresh and ensureAccessTokenWithOptions only when account continuity is verified.
- Align Home-dispatched Antigravity credentials with Home's enum scope and home_binding so Claude thinking signature scopes stay consistent across token rotations and rolling Home upgrades.
- Add regression tests covering Home refresh scope preservation, cross-account isolation, and bidirectional rolling-upgrade cache lookups.
Closes: #8168
- Strip thinkingConfig and thinking_config in CapAntigravityMaxOutputTokensDoc when clamping a numeric Claude thinking budget would fall below 1024 while leaving non-numeric, dynamic, and level-based configs untouched.
- Recognize numeric snake_case max_output_tokens aliases capped by model MaxCompletionTokens in effectiveMaxTokensDoc and apply the same catalog output cap in buildRequestForModelDoc.
- Add unit tests covering sub-1024 Claude budget stripping, snake_case max_output_tokens handling, and catalog-limit clamping.
Closes: #8165
- Scope Claude signature recovery and writes to the active credential.
- Preserve scoped cache continuity across verified token refreshes.
- Fail closed for unscoped recovery and credential replacement.
- Add stream and non-stream multi-account isolation regression coverage.
Closes: #7960
- Clamp Claude thinking budgets when the model output limit reduces maxOutputTokens below an accepted requested ceiling.
- Add regression coverage for Antigravity Sonnet and Opus models, including case-insensitive model resolution.
Closes: #7916
Resolve model enums per credential and correlate agent request IDs with session labels. Preserve the reference key order for agent envelopes and remove formatting whitespace when serializing all model requests.
- Generate random and deterministic session IDs as signed 64-bit decimal values, using FNV-1a for stable IDs.
- Preserve negative signs in reasoning replay keys and test positive/negative ID coverage.
Closes: #7857
- Prefer credential-scoped derived session IDs over raw incoming request.sessionId values when auth.ID is set, and deterministically scope direct incoming session IDs via ScopeAntigravitySessionIDForAuth across standard, image, and web_search requests without synthesizing sessionId when absent.
- Preserve verbatim incoming request.sessionId when auth.ID is empty while keeping reasoning replay keying and final payload barrier rules unchanged.
- Add regression tests covering Gemini, native Antigravity, image, web_search, unenriched direct calls, subagent isolation, anonymous auth preservation, and payload override/filter barriers.
Closes: #7838
- Attach X-Goog-User-Project whenever a non-empty project_id is available across generation, countTokens, fetchAvailableModels, credits loadCodeAssist, PrepareRequest, HttpRequest, and fetch_antigravity_models requests before custom header overrides.
- Scope automatic injection in PrepareRequest and HttpRequest to Cloud Code PA endpoints or matching per-auth base_url targets, and clear stale headers when switching credentials on a reused request.
- Apply cross-origin redirect header stripping across Antigravity executor HTTP clients and disable redirects in fetch_antigravity_models so project IDs cannot leak across origins.
Closes: #7837
- Enforce active short-cooldown checks at CountTokens entry without credits bypass and share model-aware schema sanitization with buildRequestDoc before payload finalization.
- Route CountTokens HTTP 429 responses through shared 429 state bookkeeping with single idle-transport eviction per response and bound CountTokens response reads to 1 MiB.
- Add regression tests covering short-cooldown gating, 429 bookkeeping, bounded response reads, model schema sanitization, and payload-finalizer ordering.
Closes: #7786
- Skip overwriting functionCallingConfig.mode with VALIDATED in buildRequestDoc when the request already specifies mode NONE under camelCase or snake_case proto-JSON paths, canonicalizing non-canonical NONE strings in place.
- Add regression tests covering OpenAI Chat Completions, OpenAI Responses, Claude, Gemini, proto-JSON alias spellings, and final payload rule precedence on Antigravity Claude models.
Closes: #7792
- Scan all parts of the first user turn in generateStableSessionIDFromContentsForAuth for the first non-empty text part so multimodal turns retain a stable sessionId across turns.
- Normalize model names to lowercase in buildRequestDoc, geminiToAntigravityDocForAuth, and Execute routing, including lowercase fallback lookup when capping maxOutputTokens.
- Add regression tests covering multimodal Turn 1 session ID stability and case-insensitive Claude, Gemini Pro, and image model handling.
Closes: #7760
- Derive synthesized Antigravity request.sessionId deterministically from auth.ID and canonical, execution, or derived session identity across non-stream, Claude non-stream, and streaming paths.
- Scope the content-based fallback session ID by auth.ID so credential failovers emit a fresh request.sessionId while keeping explicit request.sessionId values and reasoning replay keys unchanged.
- Add regression tests verifying cross-model stability on the same credential and sessionId rotation across credential failover.
Closes: #7706
- Replace tidwall/gjson and tidwall/sjson with github.com/MoeForge/moego/ojson
and encoding/base64 with github.com/MoeForge/moego/base64 across the main
module and examples
- Introduce cross-method *ojson.Doc request rewriting pipelines across
thinking, signature, client/codex, runtime/executor/helps, pluginhost, and
all provider executors with FinalizePayloadDoc as the final semantic barrier
- Convert all consecutive JSON mutations (>= 2 Set/SetRaw/Delete operations)
to batch edits on ojson.Doc
- Upgrade read-only byte paths to ojson.GetBytesNoCopy,
ojson.GetManyBytesNoCopy, and util.ParseGJSONBytesNoCopy with explicit
strings.Clone ownership protection across streaming and persistent state
- Use base64.StdEncoding.ValidateString for zero-allocation signature checks
and base64.EncodeDataURL for single-allocation data URL construction
- Fall back to schema prompts for Antigravity Claude 5.5 while preserving unrelated request settings.
- Normalize unsupported forced tool choices before thinking preparation in direct Claude execution and token-count paths.
- Add regression coverage for schema integrity, model boundaries, retries, and final payload rule precedence.
Closes: #7000
- Use stream-wide tool call indices in Gemini OpenAI chat response translation and preserve explicit upstream tool call IDs across stream and non-stream responses.
- Bind preceding turn thought signatures to unsigned function calls, mark completed non-stream candidate payloads as terminal, and clone request payloads before envelope mutation.
- Fall back to context API keys for reasoning replay caller isolation when explicit caller scope metadata is absent.
Closes: #6825
Include the captured client User-Agent in model capability cache and backoff
keys, discard obsolete publications, and cancel stale probes on refresh.
Use release-specific Hub changelists and the daily loadCodeAssist endpoint
for project discovery and credits queries.
Refs #6619
- Refactor antigravity tool schema sanitization to process declarations and elements in a single pass.
- Avoid quadratic whole-document rewrites for payloads with many function declarations.
- Preserve original array whitespace and untouched elements during byte splicing.
Closes: #6714
- Introduce `CleanJSONSchemaForAntigravityClaudeTool` and model-aware schema sanitization helpers to flatten multi-branch `anyOf`/`oneOf` unions specifically for Antigravity Claude tool parameter schemas.
- Preserve multi-branch union support for Gemini model variants while preventing Claude backend HTTP 400 validation errors on nested unions.
- Ensure proper inheritance of nullable markers and idempotency across the translator and executor chain.
Closes: #3662
- Add `PayloadFinalizer` to apply configuration rules at the final serialization barrier
- Support decoding, modifying, and re-encoding Devin protobuf business fields
- Add multipart form-data payload normalization to JSON for media payload rules
Closes: #5067
- Removed deprecated interceptor and executor-related methods, including `callRequestInterceptor`, `callResponseInterceptor`, and `callStreamChunkInterceptor`.
- Consolidated unused logic and pruned redundant imports to streamline `adapters.go`.
- No functional changes.