revert(proxy): drop the 1-hour cache TTL option and TTL-bucketed write accounting

The forced 1-hour cache_control TTL (schema v14) was a mistake. Injected
breakpoints return to Anthropic's standard 5-minute TTL, caller-owned
markers are preserved verbatim instead of having their TTLs rewritten,
and the 5m/1h cache-write buckets are removed from usage parsing and
pricing (back to the single aggregate cache-creation rate). The cache
TTL selector is removed from the rectifier settings panel along with its
i18n keys in all four locales.

SCHEMA_VERSION returns to 13: the unreleased cache_creation_1h_tokens
column and the v13->v14 migration are removed. The feature never shipped
in a release and the introducing commit was never pushed, so no
databases were stamped v14 outside this machine (local DB verified at
user_version 13).
This commit is contained in:
Jason
2026-07-13 17:55:33 +08:00
parent ac52c851bf
commit 6eb217b242
23 changed files with 56 additions and 416 deletions
@@ -22,7 +22,6 @@ export function RectifierConfigPanel() {
enabled: false,
thinkingOptimizer: true,
cacheInjection: true,
cacheTtl: "1h",
});
const [isLoading, setIsLoading] = useState(true);
@@ -204,31 +203,6 @@ export function RectifierConfigPanel() {
}
/>
</div>
{optimizerConfig.cacheInjection && (
<div className="flex items-center justify-between">
<div className="space-y-0.5">
<Label>{t("settings.advanced.optimizer.cacheTtl")}</Label>
</div>
<select
className="h-9 rounded-md border border-input bg-background px-3 text-sm"
value={optimizerConfig.cacheTtl}
disabled={
!optimizerConfig.enabled || !optimizerConfig.cacheInjection
}
onChange={(e) =>
handleOptimizerChange({ cacheTtl: e.target.value })
}
>
<option value="5m">
{t("settings.advanced.optimizer.cacheTtl5m")}
</option>
<option value="1h">
{t("settings.advanced.optimizer.cacheTtl1h")}
</option>
</select>
</div>
)}
</div>
</div>
</div>
+1 -4
View File
@@ -392,10 +392,7 @@
"thinkingOptimizer": "Thinking Optimization",
"thinkingOptimizerDescription": "Automatically enable Adaptive Thinking for Opus/Sonnet, and inject Extended Thinking for legacy models",
"cacheInjection": "Cache Injection",
"cacheInjectionDescription": "Automatically inject cache breakpoints at key positions in requests to reduce duplicate token billing",
"cacheTtl": "Cache TTL",
"cacheTtl5m": "5 minutes",
"cacheTtl1h": "1 hour"
"cacheInjectionDescription": "Automatically inject standard 5-minute cache breakpoints at key positions to reduce duplicate token billing"
},
"logConfig": {
"title": "Log Management",
+1 -4
View File
@@ -392,10 +392,7 @@
"thinkingOptimizer": "Thinking 最適化",
"thinkingOptimizerDescription": "Opus/Sonnet に Adaptive Thinking を自動的に有効化し、レガシーモデルに Extended Thinking を注入",
"cacheInjection": "Cache 注入",
"cacheInjectionDescription": "リクエストの重要な位置に Cache ブレークポイントを自動注入し、重複トークンの課金を削減",
"cacheTtl": "Cache TTL",
"cacheTtl5m": "5 分",
"cacheTtl1h": "1 時間"
"cacheInjectionDescription": "リクエストの重要な位置に標準の 5 分間 Cache ブレークポイントを自動注入し、重複トークンの課金を削減"
},
"logConfig": {
"title": "ログ管理",
+1 -4
View File
@@ -392,10 +392,7 @@
"thinkingOptimizer": "Thinking 最佳化",
"thinkingOptimizerDescription": "自動為 Opus/Sonnet 啟用 Adaptive Thinking,為舊模型注入 Extended Thinking",
"cacheInjection": "Cache 注入",
"cacheInjectionDescription": "自動在請求關鍵位置注入 Cache 斷點,減少重複 token 計費",
"cacheTtl": "Cache TTL",
"cacheTtl5m": "5 分鐘",
"cacheTtl1h": "1 小時"
"cacheInjectionDescription": "自動在請求關鍵位置注入標準 5 分鐘 Cache 斷點,減少重複 token 計費"
},
"logConfig": {
"title": "日誌管理",
+1 -4
View File
@@ -392,10 +392,7 @@
"thinkingOptimizer": "Thinking 优化",
"thinkingOptimizerDescription": "自动为 Opus/Sonnet 启用 Adaptive Thinking,为旧模型注入 Extended Thinking",
"cacheInjection": "Cache 注入",
"cacheInjectionDescription": "自动在请求关键位置注入 Cache 断点,减少重复 token 计费",
"cacheTtl": "Cache TTL",
"cacheTtl5m": "5 分钟",
"cacheTtl1h": "1 小时"
"cacheInjectionDescription": "自动在请求关键位置注入标准 5 分钟 Cache 断点,减少重复 token 计费"
},
"logConfig": {
"title": "日志管理",
-1
View File
@@ -333,7 +333,6 @@ export interface OptimizerConfig {
enabled: boolean;
thinkingOptimizer: boolean;
cacheInjection: boolean;
cacheTtl: string;
}
export interface LogConfig {