Skip to content

feat(showcase): forward probe mock headers onto google-antigravity model calls - #7664

Merged
mme merged 3 commits into
mainfrom
mme/pni-576-forward-mock-headers
Oct 6, 2026
Merged

mme merged 3 commits into
mainfrom
mme/pni-576-forward-mock-headers

Conversation

@mme

@mme mme commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Forwards a probe's mock and diagnostic headers onto Google Antigravity's model calls (PNI-576).

Pins ag-ui-antigravity==0.2.1, the release of ag-ui-protocol/ag-ui#2969 (per-session endpoint factory). The preview archive pin used while 0.2.1 was unreleased has been replaced, and its temporary validate-pins override removed.

Problem

Google's Go harness, not the Python agent, makes Antigravity's model calls, so the probe's X-AIMock-Strict, x-test-id and x-diag-* headers stopped at the agent hop. A fixture miss therefore proxied to the real provider instead of failing, and the harness could only match a run's model calls in aimock's journal by integration, not by run.

Change

  • endpoint is passed to the adapter as a callable (ag-ui#2969). It's resolved per session, inside the conversation's first request, where HeaderForwardingHTTPMiddleware has captured the inbound headers.
  • New aimock_headers() forwards x-aimock-*, x-test-id and x-diag-* when present, and always sets this package's x-aimock-context, which can't be overridden by the request. Other x-* headers (x-forwarded-for, …) aren't forwarded, and plain demo traffic is never made strict.
  • The two Python-side Gemini calls (subagents.py, a2ui_dynamic.py) use the same headers.
  • PARITY_NOTES.md "LLM path" is rewritten to match. Remaining limit: headers are fixed per conversation (the SDK sets the model config when a conversation starts). Probes use a fresh thread per conversation, so per-run correlation holds.

Verification

  • Package Python tests: 67 pass against the released 0.2.1 (fresh venv), including 5 new ones for aimock_headers() and the callable endpoint.
  • validate-pins: google-antigravity [OK], repo FAIL count at the baseline of 26.
  • Real agent server + aimock in --proxy-only with an unreachable provider: a probe-style request's model call carried strict, test and diagnostic headers, and dropped x-forwarded-for. A strict miss got 503 with no proxy attempt; a non-strict miss still proxied.
  • Local isolated stack (image built with the preview pin, same code as 0.2.1; aimock on staging's strict rule): google-antigravity D6 39/39 green. All 146 model calls carried X-AIMock-Strict: true, x-test-id and x-diag-run-id, with zero fixture misses.

@linear-code

linear-code Bot commented Oct 6, 2026

Copy link
Copy Markdown

PNI-576

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Ignore keyword(s) in the title.

⛔ Ignored keywords (4)
  • fix(showcase)
  • feat(showcase)
  • chore(release)
  • chore: release

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: CopilotKit/CopilotKit/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 85ed724b-7d04-4bb8-9cb9-c5b96082c190

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Production Digest-Pinning Audit

All 42 services digest-pinned.

Run 2026-10-06 05:01:41 PDT — 0 finding(s).

@mme
mme force-pushed the mme/pni-576-forward-mock-headers branch from 2b098fb to ed3b714 Compare October 6, 2026 10:08
@pkg-pr-new

pkg-pr-new Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
@copilotkit/a2ui-renderer

pnpm add https://pkg.pr.new/@copilotkit/a2ui-renderer@7664

@copilotkit/agentcore-runner

pnpm add https://pkg.pr.new/@copilotkit/agentcore-runner@7664

@copilotkit/angular

pnpm add https://pkg.pr.new/@copilotkit/angular@7664

@copilotkit/channels

pnpm add https://pkg.pr.new/@copilotkit/channels@7664

@copilotkit/channels-core

pnpm add https://pkg.pr.new/@copilotkit/channels-core@7664

@copilotkit/channels-discord

pnpm add https://pkg.pr.new/@copilotkit/channels-discord@7664

@copilotkit/channels-intelligence

pnpm add https://pkg.pr.new/@copilotkit/channels-intelligence@7664

@copilotkit/channels-slack

pnpm add https://pkg.pr.new/@copilotkit/channels-slack@7664

@copilotkit/channels-teams

pnpm add https://pkg.pr.new/@copilotkit/channels-teams@7664

@copilotkit/channels-telegram

pnpm add https://pkg.pr.new/@copilotkit/channels-telegram@7664

@copilotkit/channels-ui

pnpm add https://pkg.pr.new/@copilotkit/channels-ui@7664

@copilotkit/channels-whatsapp

pnpm add https://pkg.pr.new/@copilotkit/channels-whatsapp@7664

@copilotkit/core

pnpm add https://pkg.pr.new/@copilotkit/core@7664

@copilotkit/intelligence-langgraph

pnpm add https://pkg.pr.new/@copilotkit/intelligence-langgraph@7664

@copilotkit/intelligence-mastra

pnpm add https://pkg.pr.new/@copilotkit/intelligence-mastra@7664

@copilotkit/learning

pnpm add https://pkg.pr.new/@copilotkit/learning@7664

@copilotkit/mcp-apps-renderer

pnpm add https://pkg.pr.new/@copilotkit/mcp-apps-renderer@7664

@copilotkit/react-core

pnpm add https://pkg.pr.new/@copilotkit/react-core@7664

@copilotkit/react-native

pnpm add https://pkg.pr.new/@copilotkit/react-native@7664

@copilotkit/react-textarea

pnpm add https://pkg.pr.new/@copilotkit/react-textarea@7664

@copilotkit/react-ui

pnpm add https://pkg.pr.new/@copilotkit/react-ui@7664

@copilotkit/runtime

pnpm add https://pkg.pr.new/@copilotkit/runtime@7664

@copilotkit/runtime-client-gql

pnpm add https://pkg.pr.new/@copilotkit/runtime-client-gql@7664

@copilotkit/sdk-js

pnpm add https://pkg.pr.new/@copilotkit/sdk-js@7664

@copilotkit/shared

pnpm add https://pkg.pr.new/@copilotkit/shared@7664

@copilotkit/sqlite-runner

pnpm add https://pkg.pr.new/@copilotkit/sqlite-runner@7664

@copilotkit/voice

pnpm add https://pkg.pr.new/@copilotkit/voice@7664

@copilotkit/vue

pnpm add https://pkg.pr.new/@copilotkit/vue@7664

@copilotkit/web-components

pnpm add https://pkg.pr.new/@copilotkit/web-components@7664

@copilotkit/web-inspector

pnpm add https://pkg.pr.new/@copilotkit/web-inspector@7664

commit: 39828fe

mme and others added 3 commits October 6, 2026 14:01
…del calls

Google's Go harness, not the Python agent, makes Antigravity's model
calls, so a probe's X-AIMock-Strict, x-test-id and x-diag-* headers
stopped at the agent hop. A fixture miss then proxied to the real
provider instead of failing, and the harness could only match the run's
model calls in aimock's journal by integration, not by run.

Pass the adapter `endpoint` as a callable (ag-ui-antigravity 0.2.1). It
is resolved per session, inside the conversation's first request, where
the header middleware has captured the inbound headers. aimock_headers()
forwards x-aimock-*, x-test-id and x-diag-* when present, always sets
this package's x-aimock-context, and is reused by the two Python-side
Gemini calls (subagents, a2ui_dynamic). Headers are fixed per
conversation; PARITY_NOTES records that limit.

Until 0.2.1 is released, requirements.txt pins the adapter to
ag-ui-protocol/ag-ui#2969's head commit (archive URL, no git needed in
the image), with a matching documented override in
showcase-canonical-pins.json. Both are swapped for ==0.2.1 before merge.

Refs PNI-576
0.2.1 is the release of ag-ui-protocol/ag-ui#2969 (per-session endpoint
factory). Replaces the preview archive pin and drops its temporary
validate-pins override.
@mme
mme force-pushed the mme/pni-576-forward-mock-headers branch from ed3b714 to 39828fe Compare October 6, 2026 12:01
@mme
mme merged commit 6531223 into main Oct 6, 2026
31 checks passed
@mme
mme deleted the mme/pni-576-forward-mock-headers branch October 6, 2026 12:48
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