#5685 wired the backend to honor `prompt_cache_ttl` on the request, but there was no UI to actually pick it -- every Studio chat ended up on Anthropic's default 5 minute pool. This adds a Cache TTL selector to the chat settings sheet's Provider section, visible only when the provider supports the choice (Anthropic today) and Prompt caching is on. - New `promptCacheTtl?: "5m" | "1h"` on `ExternalProviderConfig`. Normalizer drops the field on providers that don't support the choice so localStorage stays clean across provider swaps. - `supportsProviderPromptCacheTtl` + `isPromptCacheTtl` helpers so the picker, normalizer, and adapter all agree on which values are valid. - Settings sheet renders a small Select (5 minutes / 1 hour) right under the Prompt caching switch when the toggle is on; flipping it persists on the provider config like the other per-provider knobs. - chat-adapter passes `prompt_cache_ttl` on outbound requests when the value is valid; omitted otherwise so the backend keeps inheriting Anthropic's 5m default. |
||
|---|---|---|
| .. | ||
| backend | ||
| frontend | ||
| src-tauri | ||
| __init__.py | ||
| install_llama_prebuilt.py | ||
| install_python_stack.py | ||
| LICENSE.AGPL-3.0 | ||
| package-lock.json | ||
| package.json | ||
| setup.bat | ||
| setup.ps1 | ||
| setup.sh | ||
| Unsloth_Studio_Colab.ipynb | ||