okami.mom/albedo
git clone https://git.nkp.pet/okami.mom/albedo
3d822db
main
1{ 2"version" :1 , 3"entries" : [ 4 { 5"id" :"claude-subscription" , 6"match" : { 7"extension" :"claude" 8 }, 9"policy" :"refresh" , 10"clock" :"request" , 11"tiers" : [ 12 { 13"seconds" :300 , 14"write" :1.25 15 }, 16 { 17"seconds" :3600 , 18"write" :2.0 19 } 20 ], 21"read" :0.1 , 22"evidence" :"documented" , 23"source" :"https://code.claude.com/docs/en/prompt-caching" , 24"note" :"Claude OAuth. Albedo's Claude requests use the 1h cache-write TTL for subscription and usage-credit paths; the provider still reports 5m writes for other clients. Lifetime counts from request start, so streaming time uses it up." , 25"checked" :"2026-09-28" 26 }, 27 { 28"id" :"anthropic-api" , 29"match" : { 30"host" :"api.anthropic.com" 31 }, 32"policy" :"refresh" , 33"clock" :"request" , 34"tiers" : [ 35 { 36"seconds" :300 , 37"write" :1.25 38 }, 39 { 40"seconds" :3600 , 41"write" :2.0 42 } 43 ], 44"read" :0.1 , 45"evidence" :"documented" , 46"source" :"https://platform.claude.com/docs/en/build-with-claude/prompt-caching" , 47"note" :"Every hit refreshes for free. 1h entries must precede 5m entries in one request. Minimum prefix is model-dependent (512-4096 tokens)." , 48"checked" :"2026-09-28" 49 }, 50 { 51"id" :"bedrock-claude" , 52"match" : { 53"host" :"bedrock-runtime.*.amazonaws.com" , 54"model" :"*claude*" 55 }, 56"policy" :"refresh" , 57"clock" :"request" , 58"tiers" : [ 59 { 60"seconds" :300 , 61"write" :1.25 62 }, 63 { 64"seconds" :3600 , 65"write" :2.0 66 } 67 ], 68"read" :0.1 , 69"evidence" :"documented" , 70"source" :"https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-caching.html" , 71"note" :"Resets with each successful hit. Cross-region inference can route to a cold region and force extra writes." , 72"checked" :"2026-09-28" 73 }, 74 { 75"id" :"codex-subscription" , 76"match" : { 77"extension" :"codex" 78 }, 79"policy" :"evict" , 80"survival" : { 81"typical" :1800 , 82"max" :86400 83 }, 84"evidence" :"folklore" , 85"source" :"https://developers.openai.com/api/docs/guides/prompt-caching" , 86"note" :"ChatGPT/Codex OAuth: nothing published. Codex CLI sends only prompt_cache_key. Observed informally at about 30 minutes, which matches the API's GPT-5.6+ and 24h-retention behaviour." , 87"checked" :"2026-09-28" 88 }, 89 { 90"id" :"openai-5.6" , 91"match" : { 92"host" :"api.openai.com" , 93"model" : [ 94"gpt-5.6*" , 95"gpt-6*" 96 ] 97 }, 98"policy" :"refresh" , 99"tiers" : [ 100 { 101"seconds" :1800 , 102"write" :1.25 103 } 104 ], 105"read" :0.1 , 106"evidence" :"documented" , 107"source" :"https://developers.openai.com/api/docs/guides/prompt-caching" , 108"note" :"prompt_cache_options.ttl \"30m\" is the only value and the default; a minimum, OpenAI may retain longer. Minimum prefix 1024 tokens." , 109"checked" :"2026-09-28" 110 }, 111 { 112"id" :"openai" , 113"match" : { 114"host" :"api.openai.com" 115 }, 116"policy" :"evict" , 117"survival" : { 118"typical" :450 , 119"max" :3600 120 }, 121"evidence" :"documented" , 122"source" :"https://developers.openai.com/api/docs/guides/prompt-caching" , 123"note" :"Earlier models, prompt_cache_retention in_memory (albedo sends none): about 5-10 minutes idle, at most an hour. With \"24h\" retention: typically about 30 minutes, at most 24 hours." , 124"checked" :"2026-09-28" 125 }, 126 { 127"id" :"gemini-implicit" , 128"match" : { 129"host" : [ 130"generativelanguage.googleapis.com" , 131"*aiplatform.googleapis.com" 132 ] 133 }, 134"policy" :"evict" , 135"survival" : { 136"typical" :240 , 137"max" :86400 138 }, 139"evidence" :"folklore" , 140"source" :"https://ai.google.dev/gemini-api/docs/caching" , 141"note" :"Google publishes no implicit TTL. OpenRouter reports 3-5 minutes on average; Vertex says implicit entries are cleared within 24 hours." , 142"checked" :"2026-09-28" 143 }, 144 { 145"id" :"antigravity" , 146"match" : { 147"extension" :"antigravity" 148 }, 149"policy" :"unknown" , 150"survival" : { 151"typical" :240 , 152"max" :86400 153 }, 154"evidence" :"unknown" , 155"source" :"https://ai.google.dev/gemini-api/docs/caching" , 156"note" :"Cloud Code Assist: no docs. Assumed to behave like Gemini implicit caching until measured." , 157"checked" :"2026-09-28" 158 }, 159 { 160"id" :"deepseek" , 161"match" : { 162"host" :"api.deepseek.com" 163 }, 164"policy" :"evict" , 165"survival" : { 166"typical" :14400 , 167"max" :259200 168 }, 169"evidence" :"documented" , 170"source" :"https://api-docs.deepseek.com/guides/kv_cache" , 171"note" :"Disk cache, on by default; unused entries are cleared \"usually within a few hours to a few days\". Matches whole cache units only." , 172"checked" :"2026-09-28" 173 }, 174 { 175"id" :"alibaba" , 176"match" : { 177"extension" :"alibaba" 178 }, 179"policy" :"evict" , 180"survival" : { 181"typical" :300 , 182"max" :3600 183 }, 184"read" :0.2 , 185"evidence" :"documented" , 186"source" :"https://www.alibabacloud.com/help/en/model-studio/context-cache" , 187"note" :"Implicit cache (albedo sends no cache_control): validity \"indeterminate\", periodically cleared; hits 20%, writes 100%. Explicit markers would give a 5m refresh-on-hit clock at 1.25x write, 0.1x read. The typical and max are placeholders." , 188"checked" :"2026-09-28" 189 }, 190 { 191"id" :"zai" , 192"match" : { 193"host" : [ 194"api.z.ai" , 195"open.bigmodel.cn" 196 ] 197 }, 198"policy" :"unknown" , 199"survival" : { 200"typical" :300 , 201"max" :3600 202 }, 203"evidence" :"unknown" , 204"source" :"https://docs.z.ai/guides/capabilities/cache" , 205"note" :"Implicit only; docs give no validity period." , 206"checked" :"2026-09-28" 207 }, 208 { 209"id" :"kimi-coding" , 210"match" : { 211"host" :"api.kimi.com" 212 }, 213"policy" :"evict" , 214"survival" : { 215"typical" :300 , 216"max" :1800 217 }, 218"evidence" :"measured" , 219"source" :"https://github.com/Leechael/pi-provider-kimi-code/blob/main/docs/caching.md" , 220"note" :"kimi-for-coding endpoint: probes hit at 60s and 300s and missed at 1800s and beyond; markers are ignored and caching works in 256-token chunks." , 221"checked" :"2026-09-28" 222 }, 223 { 224"id" :"kimi-api" , 225"match" : { 226"host" : [ 227"api.moonshot.ai" , 228"api.moonshot.cn" 229 ] 230 }, 231"policy" :"refresh" , 232"tiers" : [ 233 { 234"seconds" :300 235 }, 236 { 237"seconds" :3600 238 } 239 ], 240"evidence" :"documented" , 241"source" :"https://platform.kimi.ai/docs/guide/context-caching" , 242"note" :"5m unless prompt_cache_options.ttl asks for 1h; each hit renews under the TTL locked at first write. Organisation-scoped." , 243"checked" :"2026-09-28" 244 }, 245 { 246"id" :"xai" , 247"match" : { 248"host" :"api.x.ai" 249 }, 250"policy" :"evict" , 251"survival" : { 252"typical" :300 253 }, 254"evidence" :"documented" , 255"source" :"https://docs.x.ai/developers/advanced-api-usage/prompt-caching/best-practices" , 256"note" :"No TTL: entries \"can be evicted at any time due to server load or restarts\". x-grok-conv-id keeps requests on one cache. The typical is a placeholder." , 257"checked" :"2026-09-28" 258 }, 259 { 260"id" :"groq" , 261"match" : { 262"host" :"api.groq.com" 263 }, 264"policy" :"refresh" , 265"tiers" : [ 266 { 267"seconds" :7200 268 } 269 ], 270"evidence" :"documented" , 271"source" :"https://console.groq.com/docs/prompt-caching" , 272"note" :"Expires after 2 hours without use." , 273"checked" :"2026-09-28" 274 }, 275 { 276"id" :"openrouter" , 277"match" : { 278"host" :"openrouter.ai" 279 }, 280"policy" :"unknown" , 281"survival" : { 282"typical" :300 , 283"max" :3600 284 }, 285"evidence" :"documented" , 286"source" :"https://openrouter.ai/docs/guides/best-practices/prompt-caching" , 287"note" :"No cache of its own: the upstream's rules apply, and TTL syntax is not translated between providers. Sticky routing to one upstream lapses after 10 minutes idle. Several reports of no Anthropic caching through it." , 288"checked" :"2026-09-28" 289 }, 290 { 291"id" :"hyper" , 292"match" : { 293"host" :"hyper.charm.land" 294 }, 295"policy" :"unknown" , 296"survival" : { 297"typical" :300 , 298"max" :3600 299 }, 300"evidence" :"unknown" , 301"source" :"https://hyper.charm.land/docs/models.html" , 302"note" :"Gateway with no caching docs. Placeholder until measured." , 303"checked" :"2026-09-28" 304 } 305 ] 306}