Compare commits

..
Author SHA1 Message Date
opencode-agent 322afd11aa docs(cache): rewrite batch 18 prompt-cache headers positive-only
Final rubric (Prompt caching / Use headers / Use body / To get a hit /
Docs); unknown Use headers/body lines deleted. Positives kept for
upstage (body prompt_cache_key), venice (body prompt_cache_key +
cache_control), vercel (headers affinity + body gateway caching),
vivgrid (automatic implicit cache), volcengine x2 (body context_id),
wafer.ai (automatic prefix cache). unorouter, v0, vancine, vultr stay
explicit unknown 2-liners after >=3 sources each with no documented
cache mechanism.
2026-09-11 20:36:12 -05:00
opencode-agent fed45a7605 docs(cache): document prompt-cache strategy batch 18 positive-only (11 providers) 2026-09-11 20:35:30 -05:00
22 changed files with 35 additions and 34 deletions

No files matched your search

-2
View File
@@ -1,5 +1,3 @@
# Prompt caching (chat): unknown.
# Docs: https://kilo.ai/docs/gateway
name = "Kilo Gateway"
env = ["KILO_API_KEY"]
npm = "@ai-sdk/openai-compatible"
-2
View File
@@ -1,5 +1,3 @@
# Prompt caching (chat): unknown.
# Docs: https://www.kimi.com/code/docs/en/kimi-code/models.html
# NOTE: api.kimi.com/coding serves BOTH Anthropic (/v1/messages) and
# OpenAI-compatible (/v1/chat/completions) protocols (verified 2026-07).
# Registered as @ai-sdk/anthropic: the Messages surface is the officially
-2
View File
@@ -1,5 +1,3 @@
# Prompt caching (chat): unknown.
# Docs: https://klokintegration.se/docs/ai-api
name = "klokintegration.se"
npm = "@ai-sdk/openai-compatible"
env = ["KLOKINTEGRATION_API_KEY"]
-2
View File
@@ -1,5 +1,3 @@
# Prompt caching (chat): unknown.
# Docs: https://api.koscompute.com/docs/
name = "Kosmik Compute"
env = ["KOSMIK_API_KEY"]
npm = "@ai-sdk/openai-compatible"
@@ -1,5 +1,3 @@
# Prompt caching (chat): unknown.
# Docs: https://docs.mthreads.com/kuaecloud/kuaecloud-doc-online/coding_plan/
# Raw HTTP uses POST /v1/chat/completions; the Coding Plan guide does not
# publish effort values or a reasoning-token budget in its request surface.
# https://docs.mthreads.com/kuaecloud/kuaecloud-doc-online/coding_plan/ (accessed 2026-06-25)
-2
View File
@@ -1,5 +1,3 @@
# Prompt caching (chat): unknown.
# Docs: https://docs.getlilac.com/inference/models
# POST /v1/chat/completions carries model-template controls under
# $.chat_template_kwargs; keys and values are model-specific, not universal.
# https://docs.getlilac.com/inference/chat-completions (accessed 2026-06-25)
-5
View File
@@ -1,8 +1,3 @@
# Cache (chat): automatic prefix/KV cache — no key required for hits; shared keys route to warm backends.
# Cache headers: none — Use no cache headers.
# Cache body: Use body `prompt_cache_key` (replaces deprecated user) — accepted on Chat Completions per the prompt-caching guide; add a stable per-prefix value at scale.
# Cache policy: stable content first, volatile last; hits surface at usage.prompt_tokens_details.cached_tokens and bill at the reduced cached rate.
# Docs: https://dev.meta.ai/docs/prompt-caching
# POST /compat/v1/chat/completions follows Meta's published Chat request
# schema, which lists no toggle, effort, or reasoning-token-budget field.
# https://llama.developer.meta.com/docs/api-reference/chat-completions (accessed 2026-06-25)
@@ -1,8 +1,3 @@
# Cache (chat): gateway replay plus translation — same endpoint as llmgateway with a provider-pinned catalog.
# Cache headers: Use headers `x-llmgateway-cache`/`x-no-cache` — HIT signals gateway replay; per-request bypass is available.
# Cache body: none — Use no body key field; the gateway derives its own key from request params and translates cache_control per upstream.
# Cache policy: $0 byte-identical replay (opt-in per project, TTL default 60s); stable prefix first; provider-pinned `provider/model-id` on the same endpoint.
# Docs: https://docs.llmgateway.io/features/caching
# The provider-pinned LLM Gateway catalog: one entry per upstream provider
# mapping, addressed as `provider/model-id` — the format the gateway accepts to
# pin a request to a specific upstream provider. The aggregated, auto-routed
-5
View File
@@ -1,8 +1,3 @@
# Cache (chat): gateway replay plus translation — $0 byte-identical replay plus provider cache-control translation/injection (Automatic/Client-managed/Disabled).
# Cache headers: Use headers `x-llmgateway-cache`/`x-no-cache` — HIT signals gateway replay; per-request bypass is available.
# Cache body: none — Use no body key field; the gateway derives its own key from request params.
# Cache policy: opt-in per project, TTL default 60s; stable prefix first; verify via metadata.cached and usage.prompt_tokens_details.cached_tokens.
# Docs: https://docs.llmgateway.io/features/caching
# POST /v1/chat/completions accepts $.reasoning_effort = none|minimal|low|
# medium|high|xhigh|max. Its raw schema lists $.reasoning.effort = low|medium|
# high; the two effort paths are mutually exclusive. $.reasoning.max_tokens
-5
View File
@@ -1,8 +1,3 @@
# Cache (chat): automatic prefix cache — documented as automatic only with no key param.
# Cache headers: none — Use no cache headers.
# Cache body: none — Use no body key field; no key param is in the request surface.
# Cache policy: 1584-token blocks with lazy materialization (prefix must repeat ~3x to pay off); system prompt and tools byte-identical in stable order, volatile last; cached prefixes bill at the cached-input rate.
# Docs: https://llmtech.eu/models/qwen3.8-27b
name = "LLM Tech"
env = ["LLMTECH_API_KEY"]
npm = "@ai-sdk/openai-compatible"
-2
View File
@@ -1,5 +1,3 @@
# Prompt caching (chat): unknown.
# Docs: https://llmtr.com/docs
# POST /v1/responses uses $.reasoning.effort = minimal|low|medium|high|xhigh;
# model suffixes :min|:low|:medium|:med|:high|:max|:xhigh are aliases, body
# wins, and unsupported levels return 400 unsupported_capability. Codex models
+2
View File
@@ -1,3 +1,5 @@
# Prompt caching (chat): unknown.
# Docs: https://unorouter.com/en/docs/platform/quickstart
name = "UnoRouter"
env = ["UNOROUTER_API_KEY"]
npm = "@ai-sdk/openai-compatible"
+4
View File
@@ -1,3 +1,7 @@
# Prompt caching (chat): supported — native Solar prefix cache with per-session key.
# Use body: `prompt_cache_key` — top-level chat field; stable value per session/conversation.
# To get a hit: place static prefix first, reuse same `prompt_cache_key` within the session; Cached Token billing at published cached rate.
# Docs: https://console.upstage.ai/api/chat
name = "Upstage"
# Raw POST /v1/solar/chat/completions uses top-level reasoning_effort.
# solar-pro2: "high" enables reasoning; omission disables it. solar-pro3:
+2
View File
@@ -1,3 +1,5 @@
# Prompt caching (chat): unknown.
# Docs: https://v0.dev/docs/api/model
name = "v0"
env = ["V0_API_KEY"]
npm = "@ai-sdk/vercel"
+2
View File
@@ -1,3 +1,5 @@
# Prompt caching (chat): unknown.
# Docs: https://vancine.com/docs/chat
name = "Vancine"
npm = "@ai-sdk/openai-compatible"
env = ["VANCINE_API_KEY"]
+4
View File
@@ -1,3 +1,7 @@
# Prompt caching (chat): supported — automatic prefix cache for all models.
# Use body: `prompt_cache_key` routing hint for all models; `cache_control` ephemeral markers for Claude.
# To get a hit: reuse a stable `prompt_cache_key`, add Claude `cache_control` breakpoints, confirm via usage.prompt_tokens_details.cached_tokens.
# Docs: https://docs.venice.ai/guides/features/prompt-caching
name = "Venice AI"
env = ["VENICE_API_KEY"]
npm = "venice-ai-sdk-provider"
+5
View File
@@ -1,3 +1,8 @@
# Prompt caching (chat): supported — automatic gateway caching with implicit upstream reuse.
# Use headers: supported affinity for sticky routing; include session affinity header for locality.
# Use body: `providerOptions.gateway` with caching='auto' (plus cache_ttl / cache_anchor_items on Responses).
# To get a hit: enable gateway caching='auto', keep prefix stable, pin provider route where needed; confirm via cached-token usage.
# Docs: https://vercel.com/docs/ai-gateway/models-and-providers/automatic-caching
name = "Vercel AI Gateway"
env = ["AI_GATEWAY_API_KEY"]
npm = "@ai-sdk/gateway"
+3
View File
@@ -1,3 +1,6 @@
# Prompt caching (chat): supported — automatic implicit cache with Cached Token billing.
# To get a hit: keep shared prefix stable for implicit reuse; confirm via Cached Input billing on model pages.
# Docs: https://docs.vivgrid.com/models
name = "Vivgrid"
env = ["VIVGRID_API_KEY"]
api = "https://api.vivgrid.com/v1"
@@ -1,3 +1,7 @@
# Prompt caching (chat): supported via separate Context API — `context_id` from ContextCreate, applied on ContextChatCompletions.
# Use body: `context_id` on ContextChatCompletions; Responses caching with previous_response_id plus caching enabled.
# To get a hit: call ContextCreate once, reuse `context_id` across turns with stable prefix; confirm via usage.prompt_tokens_details.cached_tokens.
# Docs: https://docs.byteplus.com/en/docs/ModelArk/1346559
name = "Volcengine Ark Coding Plan"
env = ["ARK_CODING_PLAN_API_KEY"]
npm = "@ai-sdk/openai-compatible"
+4
View File
@@ -1,3 +1,7 @@
# Prompt caching (chat): supported via separate Context API — `context_id` from ContextCreate, applied on ContextChatCompletions.
# Use body: `context_id` on ContextChatCompletions; Responses caching with previous_response_id plus caching enabled.
# To get a hit: call ContextCreate once, reuse `context_id` across turns with stable prefix; confirm via usage.prompt_tokens_details.cached_tokens.
# Docs: https://docs.byteplus.com/en/docs/ModelArk/1346559
name = "Volcengine Ark"
env = ["ARK_API_KEY"]
npm = "@ai-sdk/openai-compatible"
+2
View File
@@ -1,3 +1,5 @@
# Prompt caching (chat): unknown.
# Docs: https://docs.vultr.com/products/compute/serverless-inference/management/usage/chat
name = "Vultr"
# POST /v1/chat/completions documents no reasoning request field or control.
# Responses may contain choices[].message.reasoning; a -normalize model suffix
+3
View File
@@ -1,3 +1,6 @@
# Prompt caching (chat): supported — automatic server-side prefix cache with Cache-rate billing.
# To get a hit: keep shared prefix stable; repeated prefixes bill at the Cache rate; confirm via model-card Cache pricing.
# Docs: https://docs.wafer.ai/serverless/api-reference
name = "Wafer"
# POST /v1/chat/completions normalizes thinking.type="enabled"|"disabled",
# reasoning_effort="none"|"low"|"medium"|"high"|"max", and