diff --git a/src/api/anthropic.ts b/src/api/anthropic.ts index 0bb4b84..cc0b860 100644 --- a/src/api/anthropic.ts +++ b/src/api/anthropic.ts @@ -56,9 +56,7 @@ export class AnthropicHandler implements ApiHandler { } return message }), - tools: tools.map((tool, index) => - index === tools.length - 1 ? { ...tool, cache_control: { type: "ephemeral" } } : tool - ), + tools, // cache breakpoints go from tools > system > messages, and since tools dont change, we can just set the breakpoint at the end of system (this avoids having to set a breakpoint at the end of tools which by itself does not meet min requirements for haiku caching) tool_choice: { type: "auto" }, }, (() => { diff --git a/webview-ui/src/components/ApiOptions.tsx b/webview-ui/src/components/ApiOptions.tsx index 826269e..da300f6 100644 --- a/webview-ui/src/components/ApiOptions.tsx +++ b/webview-ui/src/components/ApiOptions.tsx @@ -215,45 +215,35 @@ const ModelInfoView = ({ modelInfo }: { modelInfo: ModelInfo }) => { }).format(price) } - const showPromptCachingPrices = - modelInfo.supportsPromptCache && modelInfo.cacheWritesPrice && modelInfo.cacheReadsPrice - return (

- {" "} - - (what is this?) - -

+ +
Max output: {modelInfo.maxTokens.toLocaleString()} tokens
- - {showPromptCachingPrices ? "Base input price:" : "Input price:"} - {" "} - {formatPrice(modelInfo.inputPrice)} per million tokens - {showPromptCachingPrices && ( + Input price: {formatPrice(modelInfo.inputPrice)}/million tokens + {modelInfo.supportsPromptCache && modelInfo.cacheWritesPrice && modelInfo.cacheReadsPrice && ( <>
- Prompt caching write price:{" "} - {formatPrice(modelInfo.cacheWritesPrice || 0)} per million tokens + Cache writes price:{" "} + {formatPrice(modelInfo.cacheWritesPrice || 0)}/million tokens
- Prompt caching read price:{" "} - {formatPrice(modelInfo.cacheReadsPrice || 0)} per million tokens + Cache reads price:{" "} + {formatPrice(modelInfo.cacheReadsPrice || 0)}/million tokens )}
- Output price: {formatPrice(modelInfo.outputPrice)} per million - tokens + Output price: {formatPrice(modelInfo.outputPrice)}/million tokens

) }