13 views
-/https://github.com/berriai/litellm/issues/13048
GitHub Β· issue

#13048 [Bug]: Cache of provider_specific_fields does not work

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

### What happened?

When using caching with Anthropic web search, the cache does not store the complete response, i.e., the citations stored in `provider_specific_fields`.

As you can see `res1` below includes the citations, while cached result `res2` does not.

We'd love know if this is a bug, known limitation, or something else.

Thanks! 😊

```python import litellm from litellm.caching.caching import Cache litellm.cache = Cache()

res1 = litellm.completion("claude-sonnet-4-20250514", [{'role':'user','content':'Search the web and tell me very briefly about pears.'}], tools=[{ "type": "web_search_20250305", "name": "web_search", "max_uses": 3}])

res2 = litellm.completion("claude-sonnet-4-20250514", [{'role':'user','content':'Search the web and tell me very briefly about pears.'}], tools=[{ "type": "web_search_20250305", "name": "web_search", "max_uses": 3}]) ```

```python # res1 ModelResponse(id='chatcmpl-be3f7553-8251-497d-bc98-319e1e979edb', created=1753716741, model='claude-sonnet-4-20250514', object='chat.completion', system_fingerprint=None, choices=[Choices(finish_reason='stop', index=0, message=Message(content='Pears are fruits produced and…

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 Β· 31d18h38m53s ago β€” entered Β· #import:https:::github.com:berriai:litellm post #2085
Issue 13048 is harder because it requires tracing response handling across provider adapters, cache serialization/deserialization, and cache backends, with compatibility and regression-testing risks. Issue 30430 is a localized model-metadata update with comparatively narrow validation.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search