Replies: 2 comments 1 reply
|
Copilot agent has dynamic tool calls that may affect the caching. Our code is fully open source so you can check how our context envelope works. That said, Copilot v4 is in preview and it will launch officially soon. It completely changes how it works and moves to OpenCode, Claude Code and Codex as the main agent harnesses. Token caching handling will shift to them instead. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello everyone and @logancyang . As you know, the new DeepSeek v4 version models provide a very generous cache hit discount. And I'm wondering how the cache hits and the prompt caching are handled in the free version of Copilot in Obsidian.
I ran some newbie tests in Obsidian console and it showed me that my system promps are not cached at all. I noticed that some 128 tokens are almost every time cached but as for other tokens that are in my system prompt(2500-3500 tokens) - they are processed every time.
This implies that the discounts offered by the DeepSeek API cache won’t matter at all because the Obsidian Copilot appears to be unable to process them correctly.
For OpenRouter models there is Prompt Caching toggle button in model settings, but what about DeepSeek API models?
Is there anything I’m overlooking?
{ "id": "9ed62c60-*****-49ad-*****-*****", "object": "chat.completion.chunk", "created": 1777808848, "model": "deepseek-v4-flash", "system_fingerprint": "fp_********_prod0820_fp8_kvcache_20260402", "choices": [ { "index": 0, "delta": { "content": "", "reasoning_content": null }, "logprobs": null, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 1387, "completion_tokens": 423, "total_tokens": 1810, "prompt_tokens_details": { "cached_tokens": 128, <-----------------------HERE "miss_tokens": 1259 }, "completion_tokens_details": { "reasoning_tokens": 223 }, "prompt_cache_hit_tokens": 128, <----------------AND HERE "prompt_cache_miss_tokens": 1259 } }```All reactions