feat(ui): tighten the Prompt Caching descriptions

The toggle and ttl descriptions were a wall of text, with a panel intro that
mostly repeated the toggle description. Drop the intro and cut both descriptions
to one or two lines, keeping a one-clause note that the cache is shared across
callers on the same upstream credentials.
This commit is contained in:
Tin Chi Lo 2026-07-17 12:16:09 -07:00
parent 73cbbdd51d
commit 4e5f488452
2 changed files with 3 additions and 18 deletions

View file

@ -14825,25 +14825,15 @@ _GENERAL_SETTINGS_UI_LITELLM_FIELDS: dict[str, GeneralSettingsUILiteLLMFieldSpec
"type": "Boolean",
"tab": "prompt_caching",
"description": (
"Automatically add Anthropic cache_control breakpoints to the system prompt and the "
"trailing turn, for Anthropic and Bedrock Claude models that support prompt caching. "
"Lets clients that never set cache_control themselves still get cached prompts. "
"Requests that already carry their own cache_control are left untouched. "
"The provider caches a prefix against the upstream credentials that sent it, not per "
"end user, so this makes every caller's prompts cacheable on that shared account. "
"Leave this off if callers sharing a set of credentials must not learn whether "
"another caller recently sent a given prompt."
"Auto-adds cache_control to the system prompt and trailing turn for supported Anthropic "
"and Bedrock Claude models. The cache is shared across callers on the same upstream credentials."
),
},
"anthropic_prompt_caching_ttl": {
"type": "Select",
"options": ("5m", "1h"),
"tab": "prompt_caching",
"description": (
"Cache lifetime for the breakpoints added by 'enable_anthropic_prompt_caching'. "
"Leave empty for Anthropic's 5m default. 1h suits long agentic sessions but doubles "
"the cache write premium."
),
"description": "Empty uses Anthropic's 5m default. 1h suits long sessions but doubles the cache write cost.",
},
}

View file

@ -120,11 +120,6 @@ const PromptCachingPanel: React.FC<{
return (
<Card>
<Title>Prompt Caching</Title>
<Text className="mt-2">
Automatically inject Anthropic prompt caching for every Anthropic and Bedrock Claude model, so clients that
never set <span className="font-mono">cache_control</span> themselves still get cached prompts. This is a single
gateway-wide switch; there is no per-model setup.
</Text>
<div className="mt-6 flex items-start justify-between gap-8">
<div className="max-w-2xl">