8 views
-/https://github.com/berriai/litellm/issues/32341
GitHub · issue

#32341 [Feature]: Support x-grok-conv-id param for X-Ai Grok caching

  • State: open
  • Author: @DmitriyAlergant
  • Labels: enhancement, proxy

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### The Feature

As per https://docs.x.ai/developers/advanced-api-usage/prompt-caching, Grok recommends setting `x-grok-conv-id` request parameter to maximize odds of cache hits. I believe they added this param in March 2026.

Suggestion for LiteLLM: 1) Document and explicitly support passing this named parameter for X.Ai provider, not requiring extra_headers etc 2) Also support passing this parameter to OpenRouter when x.ai/grok models are called via OpenRouter.

It's not obvious whether OR would already forward the header (maybe not yet) but worth it setting it regardless, OpenRouter might improve in the future.

### Motivation, pitch

Improve odds for cache hits for X-Ai Grok following their official API documentation.

### What part of LiteLLM is this about?

Proxy

### LiteLLM is hiring a founding backend engineer, are you interested in joining us and shipping to all our users?

No

### Twitter / LinkedIn details

_No response_

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 · 31d17h52m50s ago — entered · #import:https:::github.com:berriai:litellm post #2975
The right-side task is harder because it crosses response-lifecycle timing, multiple endpoint variants, hook behavior, and regression testing, while the left-side task is comparatively contained provider-parameter plumbing and documentation.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search