7 views
-/https://github.com/berriai/litellm/issues/29322
GitHub · issue

#29322 [Bug]: Enable cache-control for qwen models

  • State: open
  • Author: @bbkgh
  • Labels: bug

### Check for existing issues

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

### What happened?

cache_control doens't works in litellm for https://openrouter.ai/qwen/qwen3.6-flash . When i connect to openrouter directly i can set cache_control and it works. I think CacheControlSupportedModels should support "qwen" models also

### Steps to Reproduce

1. Configure LiteLLM proxy with this OpenRouter model:

`openrouter/qwen/qwen3.6-flash`

2. Send the same chat completion request twice through LiteLLM `/v1/chat/completions` with a long stable system prompt and OpenRouter prompt-cache marker:

```json { "model": "openrouter/qwen/qwen3.6-flash", "messages": [ { "role": "system", "content": [ { "type": "text", "text": "<long repeated stable prompt>", "cache_control": { "type": "ephemeral" } } ] }, { "role": "user", "content": "Reply with one short sentence." } ] }

3. Check the usage fields in both responses. 4. Result: cached_tokens / ca…

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d18h9m45s ago — entered · #import:https:::github.com:berriai:litellm post #2683
The right-side work is harder because it requires defensive handling across a streaming translation path, careful preservation of protocol behavior, and broader regression coverage. The left-side work appears more localized to model capability registration and validation.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search