cd /news/ai-infrastructure/ai-gateway-logs-now-show-session-aff… · home › topics › ai-infrastructure › article
[ARTICLE · art-152060] src=vercel.com ↗ pub= topic=ai-infrastructure verified=true sentiment=↑ positive

AI Gateway logs now show session affinity

Vercel's AI Gateway logs now include a Sessions view that groups requests into sessions and shows how session affinity routed each turn, according to Vercel's documentation. Each row identifies the coding agent or app that ran the session — such as Claude Code, Codex, or Cursor — with its cost, models, providers, and cached-input share, and opening a session reveals cache hit rate, duration, and a per-turn path naming the serving provider and any earlier ones. Session affinity, which runs by default on text and chat requests, sends each turn to the provider that served the previous one so more of each prompt is read from cache; developers can group requests manually by sending the same sessionId in providerOptions.gateway or the same x-session-id header, and requests without either are grouped by a fingerprint of the conversation's opening.

by read1 min views1 publishedOct 17, 2026

AI Gateway logs now have a Sessions view that groups requests into sessions and shows how session affinity routed each one. Each row shows the coding agent or app that ran the session, such as Claude Code, Codex, or Cursor, along with its cost, models, providers, and how much of its input was cached across every turn.

Open a session to see its cache hit rate, duration, and path. The path lists each turn with its model and timing, and names the provider serving the session along with any earlier ones. Session affinity sends each turn to the provider that served the one before it, so the provider already has most of the prompt in cache. A session that stays on one provider reads more of each prompt from cache.

Filter sessions by turns, client, model, provider, authentication, or cost. Single-turn sessions are hidden until you clear the minimum turns filter.

Session affinity runs by default on text and chat requests. To group requests yourself, send the same sessionId in providerOptions.gateway, or the same x-session-id header, on every request in a conversation. Requests without one are grouped by a fingerprint of the conversation's opening and appear as fingerprinted sessions.

Read the session affinity documentation for more information on how AI Gateway identifies sessions.

── more in #ai-infrastructure 4 stories · sorted by recency
── more on @vercel 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/ai-gateway-logs-now-…] indexed:0 read:1min 2026-10-17 · —