dsh-watcher 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +3 -1
- package/README.md +3 -1
- package/lib/client.js +1448 -41
- package/lib/client.js.map +1 -1
- package/lib/types/client/Insights.d.ts +18 -0
- package/lib/types/client/TimingPanel.d.ts +7 -0
- package/lib/types/client/Watcher.d.ts +9 -0
- package/lib/types/client/disclosure-depth.d.ts +22 -0
- package/lib/types/client/index.d.ts +9 -0
- package/lib/types/client/model-trace-definition.d.ts +11 -0
- package/lib/types/client/step-timeline.d.ts +15 -0
- package/lib/types/dsh-watcher.d.ts +6 -0
- package/lib/types/hub/aggregation.d.ts +40 -0
- package/lib/types/hub/follow.d.ts +27 -0
- package/lib/types/hub/history.d.ts +30 -0
- package/lib/types/hub/overview.d.ts +10 -0
- package/lib/types/hub/watcher.d.ts +4 -0
- package/lib/types/insights/projection.d.ts +367 -0
- package/lib/types/observation/fold.d.ts +207 -0
- package/lib/types/observation/model-trace.d.ts +96 -0
- package/lib/types/observation/performance.d.ts +67 -0
- package/package.json +3 -2
- package/pricing/models.yaml +707 -0
package/lib/client.js
CHANGED
|
@@ -1928,8 +1928,1270 @@ window.__ModuleLoader__.load({
|
|
|
1928
1928
|
return result;
|
|
1929
1929
|
}
|
|
1930
1930
|
//#endregion
|
|
1931
|
+
//#region src/insights/i18n.mjs
|
|
1932
|
+
/** Browser-safe zh + en copy for Watcher cost UI. No network. */
|
|
1933
|
+
const messages = Object.freeze({
|
|
1934
|
+
zh: Object.freeze({
|
|
1935
|
+
estimatedCost: "估算费用",
|
|
1936
|
+
estimateNotBill: "估算,非账单",
|
|
1937
|
+
unknown: "未知",
|
|
1938
|
+
someUnpriced: "含未标价模型",
|
|
1939
|
+
priceOverrideTitle: "估算费用价格表(本地、不联网)",
|
|
1940
|
+
priceOverrideHelp: "当前生效的价格表。改任意行后保存;只有改动过的行会存本机。缺行显示「未知」,不会当成 $0。",
|
|
1941
|
+
priceOverridePlaceholder: "{\n \"currency\": \"USD\",\n \"unit\": \"per_1m_tokens\",\n \"models\": {}\n}",
|
|
1942
|
+
priceOverrideSave: "保存",
|
|
1943
|
+
priceOverrideSaved: "已保存 ✓",
|
|
1944
|
+
priceOverrideReset: "恢复默认",
|
|
1945
|
+
priceOverrideInvalid: "不是合法 JSON 对象。",
|
|
1946
|
+
priceOverridePath: "默认表:仓库 pricing/models.yaml(欢迎 PR)。"
|
|
1947
|
+
}),
|
|
1948
|
+
en: Object.freeze({
|
|
1949
|
+
estimatedCost: "Estimated cost",
|
|
1950
|
+
estimateNotBill: "Estimate, not a bill",
|
|
1951
|
+
unknown: "Unknown",
|
|
1952
|
+
someUnpriced: "Some models unpriced",
|
|
1953
|
+
priceOverrideTitle: "Estimated-cost price table (local, no network)",
|
|
1954
|
+
priceOverrideHelp: "Currently effective table. Edit any row and save; only changed rows are stored on this Host. Missing rates stay Unknown, never $0.",
|
|
1955
|
+
priceOverridePlaceholder: "{\n \"currency\": \"USD\",\n \"unit\": \"per_1m_tokens\",\n \"models\": {}\n}",
|
|
1956
|
+
priceOverrideSave: "Save",
|
|
1957
|
+
priceOverrideSaved: "Saved ✓",
|
|
1958
|
+
priceOverrideReset: "Reset to defaults",
|
|
1959
|
+
priceOverrideInvalid: "Must be a JSON object.",
|
|
1960
|
+
priceOverridePath: "Defaults: repo pricing/models.yaml (PRs welcome)."
|
|
1961
|
+
})
|
|
1962
|
+
});
|
|
1963
|
+
function localeOf(lang) {
|
|
1964
|
+
return String(lang ?? "").trim().toLowerCase().startsWith("en") ? "en" : "zh";
|
|
1965
|
+
}
|
|
1966
|
+
function detectLocale() {
|
|
1967
|
+
if (typeof document !== "undefined") {
|
|
1968
|
+
const lang = document.documentElement?.lang || document.documentElement?.getAttribute?.("lang");
|
|
1969
|
+
if (lang) return localeOf(lang);
|
|
1970
|
+
}
|
|
1971
|
+
if (typeof navigator !== "undefined" && navigator.language) return localeOf(navigator.language);
|
|
1972
|
+
return "zh";
|
|
1973
|
+
}
|
|
1974
|
+
function costCopy(locale) {
|
|
1975
|
+
return messages[locale === "en" ? "en" : "zh"];
|
|
1976
|
+
}
|
|
1977
|
+
//#endregion
|
|
1978
|
+
//#region src/insights/pricing.mjs
|
|
1979
|
+
/** Browser-safe static pricing. No network, no live list-price fetch. */
|
|
1980
|
+
const PRICING_STORAGE_KEY = "dsh-watcher:pricing-override:v1";
|
|
1981
|
+
const PRICING_UNIT = "per_1m_tokens";
|
|
1982
|
+
const PER_MILLION = 1e6;
|
|
1983
|
+
const UNLABELED = /* @__PURE__ */ new Set([
|
|
1984
|
+
"",
|
|
1985
|
+
"unknown",
|
|
1986
|
+
"未标注",
|
|
1987
|
+
"其他模型",
|
|
1988
|
+
"全部模型"
|
|
1989
|
+
]);
|
|
1990
|
+
/**
|
|
1991
|
+
* Bundled defaults. `pricing/models.yaml` is the documented source; tests
|
|
1992
|
+
* require that file to parse to this table.
|
|
1993
|
+
*/
|
|
1994
|
+
const DEFAULT_PRICING_TABLE = Object.freeze({
|
|
1995
|
+
currency: "USD",
|
|
1996
|
+
unit: PRICING_UNIT,
|
|
1997
|
+
models: Object.freeze({
|
|
1998
|
+
"deepseek-flash": Object.freeze({
|
|
1999
|
+
aliases: Object.freeze([
|
|
2000
|
+
"deepseek-v4-flash",
|
|
2001
|
+
"deepseek-v4-flash-vision-exp",
|
|
2002
|
+
"deepseek-v4.1-flash",
|
|
2003
|
+
"deepseek-v4-1-flash",
|
|
2004
|
+
"deepseek-chat",
|
|
2005
|
+
"deepseek-reasoner",
|
|
2006
|
+
"openrouter/deepseek/deepseek-chat",
|
|
2007
|
+
"openrouter/deepseek/deepseek-reasoner",
|
|
2008
|
+
"openrouter/deepseek/deepseek-v4-flash",
|
|
2009
|
+
"openrouter/deepseek/deepseek-v4.1-flash",
|
|
2010
|
+
"deepseek-flash",
|
|
2011
|
+
"DeepSeek V4 Flash",
|
|
2012
|
+
"DeepSeek-V4-Flash",
|
|
2013
|
+
"DeepSeek V4.1 Flash",
|
|
2014
|
+
"DeepSeek-V4.1-Flash",
|
|
2015
|
+
"deepseek/deepseek-flash",
|
|
2016
|
+
"openrouter/deepseek/deepseek-flash",
|
|
2017
|
+
"deepseek/deepseek-v4-flash",
|
|
2018
|
+
"deepseek/deepseek-v4.1-flash",
|
|
2019
|
+
"deepseek/deepseek-chat",
|
|
2020
|
+
"deepseek/deepseek-reasoner"
|
|
2021
|
+
]),
|
|
2022
|
+
currency: "USD",
|
|
2023
|
+
input: .15,
|
|
2024
|
+
output: .6,
|
|
2025
|
+
cache: .003
|
|
2026
|
+
}),
|
|
2027
|
+
"deepseek-v4-pro": Object.freeze({
|
|
2028
|
+
aliases: Object.freeze([
|
|
2029
|
+
"deepseek-pro",
|
|
2030
|
+
"openrouter/deepseek/deepseek-v4-pro",
|
|
2031
|
+
"deepseek-v4-pro",
|
|
2032
|
+
"DeepSeek V4 Pro",
|
|
2033
|
+
"DeepSeek-V4-Pro",
|
|
2034
|
+
"deepseek/deepseek-v4-pro",
|
|
2035
|
+
"deepseek/deepseek-pro",
|
|
2036
|
+
"openrouter/deepseek/deepseek-pro"
|
|
2037
|
+
]),
|
|
2038
|
+
currency: "USD",
|
|
2039
|
+
input: .66,
|
|
2040
|
+
output: 1.98,
|
|
2041
|
+
cache: .022
|
|
2042
|
+
}),
|
|
2043
|
+
"minimax-m2.7": Object.freeze({
|
|
2044
|
+
aliases: Object.freeze([
|
|
2045
|
+
"MiniMax-M2.7",
|
|
2046
|
+
"minimax-m2.7",
|
|
2047
|
+
"openrouter/minimax/minimax-m2.7",
|
|
2048
|
+
"MiniMax M2.7",
|
|
2049
|
+
"minimax/minimax-m2.7"
|
|
2050
|
+
]),
|
|
2051
|
+
currency: "USD",
|
|
2052
|
+
input: .3,
|
|
2053
|
+
output: 1.2,
|
|
2054
|
+
cache: .06,
|
|
2055
|
+
cacheWrite: .375
|
|
2056
|
+
}),
|
|
2057
|
+
"minimax-m2.7-highspeed": Object.freeze({
|
|
2058
|
+
aliases: Object.freeze([
|
|
2059
|
+
"MiniMax-M2.7-highspeed",
|
|
2060
|
+
"minimax-m2.7-highspeed",
|
|
2061
|
+
"openrouter/minimax/minimax-m2.7-highspeed",
|
|
2062
|
+
"MiniMax M2.7 highspeed",
|
|
2063
|
+
"minimax/minimax-m2.7-highspeed"
|
|
2064
|
+
]),
|
|
2065
|
+
currency: "USD",
|
|
2066
|
+
input: .6,
|
|
2067
|
+
output: 2.4,
|
|
2068
|
+
cache: .06,
|
|
2069
|
+
cacheWrite: .375
|
|
2070
|
+
}),
|
|
2071
|
+
"claude-sonnet-5": Object.freeze({
|
|
2072
|
+
aliases: Object.freeze([
|
|
2073
|
+
"claude-sonnet-5",
|
|
2074
|
+
"anthropic/claude-sonnet-5",
|
|
2075
|
+
"Claude Sonnet 5",
|
|
2076
|
+
"Claude-Sonnet-5",
|
|
2077
|
+
"Anthropic: Claude Sonnet 5",
|
|
2078
|
+
"openrouter/anthropic/claude-sonnet-5"
|
|
2079
|
+
]),
|
|
2080
|
+
currency: "USD",
|
|
2081
|
+
input: 2,
|
|
2082
|
+
output: 10,
|
|
2083
|
+
cache: .2,
|
|
2084
|
+
cacheWrite: 2.5
|
|
2085
|
+
}),
|
|
2086
|
+
"claude-opus-5": Object.freeze({
|
|
2087
|
+
aliases: Object.freeze([
|
|
2088
|
+
"claude-opus-5",
|
|
2089
|
+
"anthropic/claude-opus-5",
|
|
2090
|
+
"Claude-Opus-5",
|
|
2091
|
+
"Anthropic: Claude Opus 5",
|
|
2092
|
+
"Claude Opus 5",
|
|
2093
|
+
"openrouter/anthropic/claude-opus-5"
|
|
2094
|
+
]),
|
|
2095
|
+
currency: "USD",
|
|
2096
|
+
input: 5,
|
|
2097
|
+
output: 25,
|
|
2098
|
+
cache: .5,
|
|
2099
|
+
cacheWrite: 6.25
|
|
2100
|
+
}),
|
|
2101
|
+
"claude-haiku-4.5": Object.freeze({
|
|
2102
|
+
aliases: Object.freeze([
|
|
2103
|
+
"claude-haiku-4-5",
|
|
2104
|
+
"claude-haiku-4.5",
|
|
2105
|
+
"anthropic/claude-haiku-4.5",
|
|
2106
|
+
"Claude-Haiku-4.5",
|
|
2107
|
+
"Anthropic: Claude Haiku 4.5",
|
|
2108
|
+
"Claude Haiku 4.5",
|
|
2109
|
+
"openrouter/anthropic/claude-haiku-4.5"
|
|
2110
|
+
]),
|
|
2111
|
+
currency: "USD",
|
|
2112
|
+
input: 1,
|
|
2113
|
+
output: 5,
|
|
2114
|
+
cache: .1,
|
|
2115
|
+
cacheWrite: 1.25
|
|
2116
|
+
}),
|
|
2117
|
+
"claude-sonnet-4.5": Object.freeze({
|
|
2118
|
+
aliases: Object.freeze([
|
|
2119
|
+
"claude-sonnet-4-5",
|
|
2120
|
+
"anthropic/claude-sonnet-4.5",
|
|
2121
|
+
"anthropic/claude-sonnet-4.6",
|
|
2122
|
+
"claude-sonnet-4.6",
|
|
2123
|
+
"claude-sonnet-4-6",
|
|
2124
|
+
"claude-sonnet-4.5",
|
|
2125
|
+
"Anthropic: Claude Sonnet 4.5",
|
|
2126
|
+
"Claude Sonnet 4.5",
|
|
2127
|
+
"Claude-Sonnet-4.5",
|
|
2128
|
+
"Claude Sonnet 4.6",
|
|
2129
|
+
"Claude-Sonnet-4.6",
|
|
2130
|
+
"openrouter/anthropic/claude-sonnet-4.5",
|
|
2131
|
+
"openrouter/anthropic/claude-sonnet-4.6"
|
|
2132
|
+
]),
|
|
2133
|
+
currency: "USD",
|
|
2134
|
+
input: 3,
|
|
2135
|
+
output: 15,
|
|
2136
|
+
cache: .3,
|
|
2137
|
+
cacheWrite: 3.75
|
|
2138
|
+
}),
|
|
2139
|
+
"gpt-5": Object.freeze({
|
|
2140
|
+
aliases: Object.freeze([
|
|
2141
|
+
"GPT-5",
|
|
2142
|
+
"gpt-5",
|
|
2143
|
+
"OpenAI: GPT-5",
|
|
2144
|
+
"openai/gpt-5",
|
|
2145
|
+
"openrouter/openai/gpt-5"
|
|
2146
|
+
]),
|
|
2147
|
+
currency: "USD",
|
|
2148
|
+
input: 1.25,
|
|
2149
|
+
output: 10,
|
|
2150
|
+
cache: .125
|
|
2151
|
+
}),
|
|
2152
|
+
"gpt-5-mini": Object.freeze({
|
|
2153
|
+
aliases: Object.freeze([
|
|
2154
|
+
"GPT-5 Mini",
|
|
2155
|
+
"GPT-5-mini",
|
|
2156
|
+
"gpt-5-mini",
|
|
2157
|
+
"OpenAI: GPT-5 Mini",
|
|
2158
|
+
"GPT-5-Mini",
|
|
2159
|
+
"openai/gpt-5-mini",
|
|
2160
|
+
"openrouter/openai/gpt-5-mini"
|
|
2161
|
+
]),
|
|
2162
|
+
currency: "USD",
|
|
2163
|
+
input: .25,
|
|
2164
|
+
output: 2,
|
|
2165
|
+
cache: .025
|
|
2166
|
+
}),
|
|
2167
|
+
"gpt-5-nano": Object.freeze({
|
|
2168
|
+
aliases: Object.freeze([
|
|
2169
|
+
"GPT-5 Nano",
|
|
2170
|
+
"GPT-5-nano",
|
|
2171
|
+
"gpt-5-nano",
|
|
2172
|
+
"OpenAI: GPT-5 Nano",
|
|
2173
|
+
"GPT-5-Nano",
|
|
2174
|
+
"openai/gpt-5-nano",
|
|
2175
|
+
"openrouter/openai/gpt-5-nano"
|
|
2176
|
+
]),
|
|
2177
|
+
currency: "USD",
|
|
2178
|
+
input: .05,
|
|
2179
|
+
output: .4,
|
|
2180
|
+
cache: .005
|
|
2181
|
+
}),
|
|
2182
|
+
"gpt-5.1": Object.freeze({
|
|
2183
|
+
aliases: Object.freeze([
|
|
2184
|
+
"GPT-5.1",
|
|
2185
|
+
"gpt-5.1",
|
|
2186
|
+
"OpenAI: GPT-5.1",
|
|
2187
|
+
"openai/gpt-5.1",
|
|
2188
|
+
"openrouter/openai/gpt-5.1"
|
|
2189
|
+
]),
|
|
2190
|
+
currency: "USD",
|
|
2191
|
+
input: 1.25,
|
|
2192
|
+
output: 10,
|
|
2193
|
+
cache: .125
|
|
2194
|
+
}),
|
|
2195
|
+
"gpt-4.1": Object.freeze({
|
|
2196
|
+
aliases: Object.freeze([
|
|
2197
|
+
"GPT-4.1",
|
|
2198
|
+
"gpt-4.1",
|
|
2199
|
+
"OpenAI: GPT-4.1",
|
|
2200
|
+
"openai/gpt-4.1",
|
|
2201
|
+
"openrouter/openai/gpt-4.1"
|
|
2202
|
+
]),
|
|
2203
|
+
currency: "USD",
|
|
2204
|
+
input: 2,
|
|
2205
|
+
output: 8,
|
|
2206
|
+
cache: .5
|
|
2207
|
+
}),
|
|
2208
|
+
"gpt-4.1-mini": Object.freeze({
|
|
2209
|
+
aliases: Object.freeze([
|
|
2210
|
+
"gpt-4.1-mini",
|
|
2211
|
+
"OpenAI: GPT-4.1 Mini",
|
|
2212
|
+
"GPT-4.1 Mini",
|
|
2213
|
+
"GPT-4.1-Mini",
|
|
2214
|
+
"openai/gpt-4.1-mini",
|
|
2215
|
+
"openrouter/openai/gpt-4.1-mini"
|
|
2216
|
+
]),
|
|
2217
|
+
currency: "USD",
|
|
2218
|
+
input: .4,
|
|
2219
|
+
output: 1.6,
|
|
2220
|
+
cache: .1
|
|
2221
|
+
}),
|
|
2222
|
+
"gpt-4.1-nano": Object.freeze({
|
|
2223
|
+
aliases: Object.freeze([
|
|
2224
|
+
"gpt-4.1-nano",
|
|
2225
|
+
"OpenAI: GPT-4.1 Nano",
|
|
2226
|
+
"GPT-4.1 Nano",
|
|
2227
|
+
"GPT-4.1-Nano",
|
|
2228
|
+
"openai/gpt-4.1-nano",
|
|
2229
|
+
"openrouter/openai/gpt-4.1-nano"
|
|
2230
|
+
]),
|
|
2231
|
+
currency: "USD",
|
|
2232
|
+
input: .1,
|
|
2233
|
+
output: .4,
|
|
2234
|
+
cache: .025
|
|
2235
|
+
}),
|
|
2236
|
+
"gpt-4o": Object.freeze({
|
|
2237
|
+
aliases: Object.freeze([
|
|
2238
|
+
"GPT-4o",
|
|
2239
|
+
"gpt-4o",
|
|
2240
|
+
"OpenAI: GPT-4o",
|
|
2241
|
+
"openai/gpt-4o",
|
|
2242
|
+
"openrouter/openai/gpt-4o"
|
|
2243
|
+
]),
|
|
2244
|
+
currency: "USD",
|
|
2245
|
+
input: 2.5,
|
|
2246
|
+
output: 10,
|
|
2247
|
+
cache: 1.25
|
|
2248
|
+
}),
|
|
2249
|
+
"gpt-4o-mini": Object.freeze({
|
|
2250
|
+
aliases: Object.freeze([
|
|
2251
|
+
"GPT-4o-mini",
|
|
2252
|
+
"GPT-4o mini",
|
|
2253
|
+
"gpt-4o-mini",
|
|
2254
|
+
"OpenAI: GPT-4o-mini",
|
|
2255
|
+
"openai/gpt-4o-mini",
|
|
2256
|
+
"openrouter/openai/gpt-4o-mini"
|
|
2257
|
+
]),
|
|
2258
|
+
currency: "USD",
|
|
2259
|
+
input: .15,
|
|
2260
|
+
output: .6,
|
|
2261
|
+
cache: .075
|
|
2262
|
+
}),
|
|
2263
|
+
"o3": Object.freeze({
|
|
2264
|
+
aliases: Object.freeze([
|
|
2265
|
+
"o3",
|
|
2266
|
+
"OpenAI: o3",
|
|
2267
|
+
"openai/o3",
|
|
2268
|
+
"openrouter/openai/o3"
|
|
2269
|
+
]),
|
|
2270
|
+
currency: "USD",
|
|
2271
|
+
input: 2,
|
|
2272
|
+
output: 8,
|
|
2273
|
+
cache: .5
|
|
2274
|
+
}),
|
|
2275
|
+
"o4-mini": Object.freeze({
|
|
2276
|
+
aliases: Object.freeze([
|
|
2277
|
+
"o4-mini",
|
|
2278
|
+
"OpenAI: o4 Mini",
|
|
2279
|
+
"o4 Mini",
|
|
2280
|
+
"o4-Mini",
|
|
2281
|
+
"openai/o4-mini",
|
|
2282
|
+
"openrouter/openai/o4-mini"
|
|
2283
|
+
]),
|
|
2284
|
+
currency: "USD",
|
|
2285
|
+
input: 1.1,
|
|
2286
|
+
output: 4.4,
|
|
2287
|
+
cache: .275
|
|
2288
|
+
}),
|
|
2289
|
+
"o3-mini": Object.freeze({
|
|
2290
|
+
aliases: Object.freeze([
|
|
2291
|
+
"o3-mini",
|
|
2292
|
+
"OpenAI: o3 Mini",
|
|
2293
|
+
"o3 Mini",
|
|
2294
|
+
"o3-Mini",
|
|
2295
|
+
"openai/o3-mini",
|
|
2296
|
+
"openrouter/openai/o3-mini"
|
|
2297
|
+
]),
|
|
2298
|
+
currency: "USD",
|
|
2299
|
+
input: 1.1,
|
|
2300
|
+
output: 4.4,
|
|
2301
|
+
cache: .55
|
|
2302
|
+
}),
|
|
2303
|
+
"claude-opus-4.6": Object.freeze({
|
|
2304
|
+
aliases: Object.freeze([
|
|
2305
|
+
"claude-opus-4.6",
|
|
2306
|
+
"Anthropic: Claude Opus 4.6",
|
|
2307
|
+
"Claude Opus 4.6",
|
|
2308
|
+
"Claude-Opus-4.6",
|
|
2309
|
+
"anthropic/claude-opus-4.6",
|
|
2310
|
+
"openrouter/anthropic/claude-opus-4.6"
|
|
2311
|
+
]),
|
|
2312
|
+
currency: "USD",
|
|
2313
|
+
input: 5,
|
|
2314
|
+
output: 25,
|
|
2315
|
+
cache: .5,
|
|
2316
|
+
cacheWrite: 6.25
|
|
2317
|
+
}),
|
|
2318
|
+
"claude-opus-4.5": Object.freeze({
|
|
2319
|
+
aliases: Object.freeze([
|
|
2320
|
+
"claude-opus-4.5",
|
|
2321
|
+
"Anthropic: Claude Opus 4.5",
|
|
2322
|
+
"Claude Opus 4.5",
|
|
2323
|
+
"Claude-Opus-4.5",
|
|
2324
|
+
"anthropic/claude-opus-4.5",
|
|
2325
|
+
"openrouter/anthropic/claude-opus-4.5"
|
|
2326
|
+
]),
|
|
2327
|
+
currency: "USD",
|
|
2328
|
+
input: 5,
|
|
2329
|
+
output: 25,
|
|
2330
|
+
cache: .5,
|
|
2331
|
+
cacheWrite: 6.25
|
|
2332
|
+
}),
|
|
2333
|
+
"claude-sonnet-4": Object.freeze({
|
|
2334
|
+
aliases: Object.freeze([
|
|
2335
|
+
"claude-sonnet-4",
|
|
2336
|
+
"Anthropic: Claude Sonnet 4",
|
|
2337
|
+
"Claude Sonnet 4",
|
|
2338
|
+
"Claude-Sonnet-4",
|
|
2339
|
+
"anthropic/claude-sonnet-4",
|
|
2340
|
+
"openrouter/anthropic/claude-sonnet-4"
|
|
2341
|
+
]),
|
|
2342
|
+
currency: "USD",
|
|
2343
|
+
input: 3,
|
|
2344
|
+
output: 15,
|
|
2345
|
+
cache: .3,
|
|
2346
|
+
cacheWrite: 3.75
|
|
2347
|
+
}),
|
|
2348
|
+
"gemini-2.5-pro": Object.freeze({
|
|
2349
|
+
aliases: Object.freeze([
|
|
2350
|
+
"Gemini 2.5 Pro",
|
|
2351
|
+
"gemini-2.5-pro",
|
|
2352
|
+
"Google: Gemini 2.5 Pro",
|
|
2353
|
+
"Gemini-2.5-Pro",
|
|
2354
|
+
"google/gemini-2.5-pro",
|
|
2355
|
+
"openrouter/google/gemini-2.5-pro"
|
|
2356
|
+
]),
|
|
2357
|
+
currency: "USD",
|
|
2358
|
+
input: 1.25,
|
|
2359
|
+
output: 10,
|
|
2360
|
+
cache: .125,
|
|
2361
|
+
cacheWrite: .375
|
|
2362
|
+
}),
|
|
2363
|
+
"gemini-2.5-flash": Object.freeze({
|
|
2364
|
+
aliases: Object.freeze([
|
|
2365
|
+
"gemini-2.5-flash",
|
|
2366
|
+
"Gemini 2.5 Flash",
|
|
2367
|
+
"Google: Gemini 2.5 Flash",
|
|
2368
|
+
"Gemini-2.5-Flash",
|
|
2369
|
+
"google/gemini-2.5-flash",
|
|
2370
|
+
"openrouter/google/gemini-2.5-flash"
|
|
2371
|
+
]),
|
|
2372
|
+
currency: "USD",
|
|
2373
|
+
input: .3,
|
|
2374
|
+
output: 2.5,
|
|
2375
|
+
cache: .03,
|
|
2376
|
+
cacheWrite: .083333
|
|
2377
|
+
}),
|
|
2378
|
+
"gemini-2.5-flash-lite": Object.freeze({
|
|
2379
|
+
aliases: Object.freeze([
|
|
2380
|
+
"gemini-2.5-flash-lite",
|
|
2381
|
+
"Google: Gemini 2.5 Flash Lite",
|
|
2382
|
+
"Gemini 2.5 Flash Lite",
|
|
2383
|
+
"Gemini-2.5-Flash-Lite",
|
|
2384
|
+
"google/gemini-2.5-flash-lite",
|
|
2385
|
+
"openrouter/google/gemini-2.5-flash-lite"
|
|
2386
|
+
]),
|
|
2387
|
+
currency: "USD",
|
|
2388
|
+
input: .1,
|
|
2389
|
+
output: .4,
|
|
2390
|
+
cache: .01,
|
|
2391
|
+
cacheWrite: .083333
|
|
2392
|
+
}),
|
|
2393
|
+
"gemini-3-flash-preview": Object.freeze({
|
|
2394
|
+
aliases: Object.freeze([
|
|
2395
|
+
"gemini-3-flash-preview",
|
|
2396
|
+
"Google: Gemini 3 Flash Preview",
|
|
2397
|
+
"Gemini 3 Flash Preview",
|
|
2398
|
+
"Gemini-3-Flash-Preview",
|
|
2399
|
+
"google/gemini-3-flash-preview",
|
|
2400
|
+
"openrouter/google/gemini-3-flash-preview"
|
|
2401
|
+
]),
|
|
2402
|
+
currency: "USD",
|
|
2403
|
+
input: .5,
|
|
2404
|
+
output: 3,
|
|
2405
|
+
cache: .05,
|
|
2406
|
+
cacheWrite: .083333
|
|
2407
|
+
}),
|
|
2408
|
+
"gemini-3.1-flash-lite": Object.freeze({
|
|
2409
|
+
aliases: Object.freeze([
|
|
2410
|
+
"gemini-3.1-flash-lite",
|
|
2411
|
+
"Google: Gemini 3.1 Flash Lite",
|
|
2412
|
+
"Gemini 3.1 Flash Lite",
|
|
2413
|
+
"Gemini-3.1-Flash-Lite",
|
|
2414
|
+
"google/gemini-3.1-flash-lite",
|
|
2415
|
+
"openrouter/google/gemini-3.1-flash-lite"
|
|
2416
|
+
]),
|
|
2417
|
+
currency: "USD",
|
|
2418
|
+
input: .25,
|
|
2419
|
+
output: 1.5,
|
|
2420
|
+
cache: .025,
|
|
2421
|
+
cacheWrite: .083333
|
|
2422
|
+
}),
|
|
2423
|
+
"grok-4.6": Object.freeze({
|
|
2424
|
+
aliases: Object.freeze([
|
|
2425
|
+
"grok-4.6",
|
|
2426
|
+
"Grok 4.6",
|
|
2427
|
+
"Grok-4.6",
|
|
2428
|
+
"SpaceXAI: Grok 4.6",
|
|
2429
|
+
"x-ai/grok-4.6",
|
|
2430
|
+
"openrouter/x-ai/grok-4.6",
|
|
2431
|
+
"xai/grok-4.6"
|
|
2432
|
+
]),
|
|
2433
|
+
currency: "USD",
|
|
2434
|
+
input: 2,
|
|
2435
|
+
output: 6,
|
|
2436
|
+
cache: .5
|
|
2437
|
+
}),
|
|
2438
|
+
"grok-4.5": Object.freeze({
|
|
2439
|
+
aliases: Object.freeze([
|
|
2440
|
+
"grok-4.5",
|
|
2441
|
+
"SpaceXAI: Grok 4.5",
|
|
2442
|
+
"Grok 4.5",
|
|
2443
|
+
"Grok-4.5",
|
|
2444
|
+
"x-ai/grok-4.5",
|
|
2445
|
+
"openrouter/x-ai/grok-4.5",
|
|
2446
|
+
"xai/grok-4.5"
|
|
2447
|
+
]),
|
|
2448
|
+
currency: "USD",
|
|
2449
|
+
input: 2,
|
|
2450
|
+
output: 6,
|
|
2451
|
+
cache: .3
|
|
2452
|
+
}),
|
|
2453
|
+
"grok-4.3": Object.freeze({
|
|
2454
|
+
aliases: Object.freeze([
|
|
2455
|
+
"grok-4.3",
|
|
2456
|
+
"SpaceXAI: Grok 4.3",
|
|
2457
|
+
"Grok 4.3",
|
|
2458
|
+
"Grok-4.3",
|
|
2459
|
+
"x-ai/grok-4.3",
|
|
2460
|
+
"openrouter/x-ai/grok-4.3",
|
|
2461
|
+
"xai/grok-4.3"
|
|
2462
|
+
]),
|
|
2463
|
+
currency: "USD",
|
|
2464
|
+
input: 1.25,
|
|
2465
|
+
output: 2.5,
|
|
2466
|
+
cache: .2
|
|
2467
|
+
}),
|
|
2468
|
+
"grok-4.20": Object.freeze({
|
|
2469
|
+
aliases: Object.freeze([
|
|
2470
|
+
"grok-4.20",
|
|
2471
|
+
"SpaceXAI: Grok 4.20",
|
|
2472
|
+
"Grok 4.20",
|
|
2473
|
+
"Grok-4.20",
|
|
2474
|
+
"x-ai/grok-4.20",
|
|
2475
|
+
"openrouter/x-ai/grok-4.20",
|
|
2476
|
+
"xai/grok-4.20"
|
|
2477
|
+
]),
|
|
2478
|
+
currency: "USD",
|
|
2479
|
+
input: 1.25,
|
|
2480
|
+
output: 2.5,
|
|
2481
|
+
cache: .2
|
|
2482
|
+
}),
|
|
2483
|
+
"deepseek-r1": Object.freeze({
|
|
2484
|
+
aliases: Object.freeze([
|
|
2485
|
+
"deepseek-r1",
|
|
2486
|
+
"DeepSeek: R1",
|
|
2487
|
+
"R1",
|
|
2488
|
+
"deepseek/deepseek-r1",
|
|
2489
|
+
"openrouter/deepseek/deepseek-r1"
|
|
2490
|
+
]),
|
|
2491
|
+
currency: "USD",
|
|
2492
|
+
input: .7,
|
|
2493
|
+
output: 2.5
|
|
2494
|
+
}),
|
|
2495
|
+
"minimax-m3": Object.freeze({
|
|
2496
|
+
aliases: Object.freeze([
|
|
2497
|
+
"minimax-m3",
|
|
2498
|
+
"MiniMax: MiniMax M3",
|
|
2499
|
+
"MiniMax M3",
|
|
2500
|
+
"MiniMax-M3",
|
|
2501
|
+
"minimax/minimax-m3",
|
|
2502
|
+
"openrouter/minimax/minimax-m3"
|
|
2503
|
+
]),
|
|
2504
|
+
currency: "USD",
|
|
2505
|
+
input: .3,
|
|
2506
|
+
output: 1.2,
|
|
2507
|
+
cache: .06
|
|
2508
|
+
}),
|
|
2509
|
+
"minimax-m2.5": Object.freeze({
|
|
2510
|
+
aliases: Object.freeze([
|
|
2511
|
+
"minimax-m2.5",
|
|
2512
|
+
"MiniMax: MiniMax M2.5",
|
|
2513
|
+
"MiniMax M2.5",
|
|
2514
|
+
"MiniMax-M2.5",
|
|
2515
|
+
"minimax/minimax-m2.5",
|
|
2516
|
+
"openrouter/minimax/minimax-m2.5"
|
|
2517
|
+
]),
|
|
2518
|
+
currency: "USD",
|
|
2519
|
+
input: .27,
|
|
2520
|
+
output: 1.08,
|
|
2521
|
+
cache: .027
|
|
2522
|
+
}),
|
|
2523
|
+
"minimax-m2.1": Object.freeze({
|
|
2524
|
+
aliases: Object.freeze([
|
|
2525
|
+
"minimax-m2.1",
|
|
2526
|
+
"MiniMax: MiniMax M2.1",
|
|
2527
|
+
"MiniMax M2.1",
|
|
2528
|
+
"MiniMax-M2.1",
|
|
2529
|
+
"minimax/minimax-m2.1",
|
|
2530
|
+
"openrouter/minimax/minimax-m2.1"
|
|
2531
|
+
]),
|
|
2532
|
+
currency: "USD",
|
|
2533
|
+
input: .3,
|
|
2534
|
+
output: 1.2,
|
|
2535
|
+
cache: .03
|
|
2536
|
+
}),
|
|
2537
|
+
"glm-5": Object.freeze({
|
|
2538
|
+
aliases: Object.freeze([
|
|
2539
|
+
"glm-5",
|
|
2540
|
+
"GLM-5",
|
|
2541
|
+
"GLM 5",
|
|
2542
|
+
"Z.ai: GLM 5",
|
|
2543
|
+
"z-ai/glm-5",
|
|
2544
|
+
"openrouter/z-ai/glm-5",
|
|
2545
|
+
"zhipu/glm-5",
|
|
2546
|
+
"zai/glm-5",
|
|
2547
|
+
"glm/glm-5"
|
|
2548
|
+
]),
|
|
2549
|
+
currency: "USD",
|
|
2550
|
+
input: .6,
|
|
2551
|
+
output: 1.92,
|
|
2552
|
+
cache: .12
|
|
2553
|
+
}),
|
|
2554
|
+
"glm-5.3": Object.freeze({
|
|
2555
|
+
aliases: Object.freeze([
|
|
2556
|
+
"glm-5.3",
|
|
2557
|
+
"Z.ai: GLM 5.3",
|
|
2558
|
+
"GLM 5.3",
|
|
2559
|
+
"GLM-5.3",
|
|
2560
|
+
"z-ai/glm-5.3",
|
|
2561
|
+
"openrouter/z-ai/glm-5.3",
|
|
2562
|
+
"zhipu/glm-5.3",
|
|
2563
|
+
"zai/glm-5.3",
|
|
2564
|
+
"glm/glm-5.3"
|
|
2565
|
+
]),
|
|
2566
|
+
currency: "USD",
|
|
2567
|
+
input: .91,
|
|
2568
|
+
output: 2.86,
|
|
2569
|
+
cache: .169
|
|
2570
|
+
}),
|
|
2571
|
+
"glm-5.2": Object.freeze({
|
|
2572
|
+
aliases: Object.freeze([
|
|
2573
|
+
"glm-5.2",
|
|
2574
|
+
"Z.ai: GLM 5.2",
|
|
2575
|
+
"GLM 5.2",
|
|
2576
|
+
"GLM-5.2",
|
|
2577
|
+
"z-ai/glm-5.2",
|
|
2578
|
+
"openrouter/z-ai/glm-5.2",
|
|
2579
|
+
"zhipu/glm-5.2",
|
|
2580
|
+
"zai/glm-5.2",
|
|
2581
|
+
"glm/glm-5.2"
|
|
2582
|
+
]),
|
|
2583
|
+
currency: "USD",
|
|
2584
|
+
input: .5544,
|
|
2585
|
+
output: 1.7424,
|
|
2586
|
+
cache: .10296
|
|
2587
|
+
}),
|
|
2588
|
+
"glm-4.7": Object.freeze({
|
|
2589
|
+
aliases: Object.freeze([
|
|
2590
|
+
"glm-4.7",
|
|
2591
|
+
"Z.ai: GLM 4.7",
|
|
2592
|
+
"GLM 4.7",
|
|
2593
|
+
"GLM-4.7",
|
|
2594
|
+
"z-ai/glm-4.7",
|
|
2595
|
+
"openrouter/z-ai/glm-4.7",
|
|
2596
|
+
"zhipu/glm-4.7",
|
|
2597
|
+
"zai/glm-4.7",
|
|
2598
|
+
"glm/glm-4.7"
|
|
2599
|
+
]),
|
|
2600
|
+
currency: "USD",
|
|
2601
|
+
input: .4,
|
|
2602
|
+
output: 1.75,
|
|
2603
|
+
cache: .08
|
|
2604
|
+
}),
|
|
2605
|
+
"glm-4.6": Object.freeze({
|
|
2606
|
+
aliases: Object.freeze([
|
|
2607
|
+
"glm-4.6",
|
|
2608
|
+
"Z.ai: GLM 4.6",
|
|
2609
|
+
"GLM 4.6",
|
|
2610
|
+
"GLM-4.6",
|
|
2611
|
+
"z-ai/glm-4.6",
|
|
2612
|
+
"openrouter/z-ai/glm-4.6",
|
|
2613
|
+
"zhipu/glm-4.6",
|
|
2614
|
+
"zai/glm-4.6",
|
|
2615
|
+
"glm/glm-4.6"
|
|
2616
|
+
]),
|
|
2617
|
+
currency: "USD",
|
|
2618
|
+
input: .43,
|
|
2619
|
+
output: 1.75,
|
|
2620
|
+
cache: .08
|
|
2621
|
+
}),
|
|
2622
|
+
"glm-4.5": Object.freeze({
|
|
2623
|
+
aliases: Object.freeze([
|
|
2624
|
+
"glm-4.5",
|
|
2625
|
+
"Z.ai: GLM 4.5",
|
|
2626
|
+
"GLM 4.5",
|
|
2627
|
+
"GLM-4.5",
|
|
2628
|
+
"z-ai/glm-4.5",
|
|
2629
|
+
"openrouter/z-ai/glm-4.5",
|
|
2630
|
+
"zhipu/glm-4.5",
|
|
2631
|
+
"zai/glm-4.5",
|
|
2632
|
+
"glm/glm-4.5"
|
|
2633
|
+
]),
|
|
2634
|
+
currency: "USD",
|
|
2635
|
+
input: .6,
|
|
2636
|
+
output: 2.2,
|
|
2637
|
+
cache: .11
|
|
2638
|
+
}),
|
|
2639
|
+
"glm-4.7-flash": Object.freeze({
|
|
2640
|
+
aliases: Object.freeze([
|
|
2641
|
+
"glm-4.7-flash",
|
|
2642
|
+
"Z.ai: GLM 4.7 Flash",
|
|
2643
|
+
"GLM 4.7 Flash",
|
|
2644
|
+
"GLM-4.7-Flash",
|
|
2645
|
+
"z-ai/glm-4.7-flash",
|
|
2646
|
+
"openrouter/z-ai/glm-4.7-flash",
|
|
2647
|
+
"zhipu/glm-4.7-flash",
|
|
2648
|
+
"zai/glm-4.7-flash",
|
|
2649
|
+
"glm/glm-4.7-flash"
|
|
2650
|
+
]),
|
|
2651
|
+
currency: "USD",
|
|
2652
|
+
input: .0605,
|
|
2653
|
+
output: .4
|
|
2654
|
+
}),
|
|
2655
|
+
"glm-5.3-flash": Object.freeze({
|
|
2656
|
+
aliases: Object.freeze([
|
|
2657
|
+
"glm-5.3-flash",
|
|
2658
|
+
"Z.ai: GLM 5.3 Flash",
|
|
2659
|
+
"GLM 5.3 Flash",
|
|
2660
|
+
"GLM-5.3-Flash",
|
|
2661
|
+
"z-ai/glm-5.3-flash",
|
|
2662
|
+
"openrouter/z-ai/glm-5.3-flash",
|
|
2663
|
+
"zhipu/glm-5.3-flash",
|
|
2664
|
+
"zai/glm-5.3-flash",
|
|
2665
|
+
"glm/glm-5.3-flash"
|
|
2666
|
+
]),
|
|
2667
|
+
currency: "USD",
|
|
2668
|
+
input: .09,
|
|
2669
|
+
output: .3,
|
|
2670
|
+
cache: .018
|
|
2671
|
+
}),
|
|
2672
|
+
"qwen3.8-flash": Object.freeze({
|
|
2673
|
+
aliases: Object.freeze([
|
|
2674
|
+
"qwen3.8-flash",
|
|
2675
|
+
"Qwen3.8 Flash",
|
|
2676
|
+
"Qwen3.8-Flash",
|
|
2677
|
+
"Qwen: Qwen3.8 Flash",
|
|
2678
|
+
"qwen/qwen3.8-flash",
|
|
2679
|
+
"openrouter/qwen/qwen3.8-flash"
|
|
2680
|
+
]),
|
|
2681
|
+
currency: "USD",
|
|
2682
|
+
input: .15,
|
|
2683
|
+
output: .47,
|
|
2684
|
+
cache: .016,
|
|
2685
|
+
cacheWrite: .2
|
|
2686
|
+
}),
|
|
2687
|
+
"qwen3.7-flash": Object.freeze({
|
|
2688
|
+
aliases: Object.freeze([
|
|
2689
|
+
"qwen3.7-flash",
|
|
2690
|
+
"Qwen: Qwen3.7 Flash",
|
|
2691
|
+
"Qwen3.7 Flash",
|
|
2692
|
+
"Qwen3.7-Flash",
|
|
2693
|
+
"qwen/qwen3.7-flash",
|
|
2694
|
+
"openrouter/qwen/qwen3.7-flash"
|
|
2695
|
+
]),
|
|
2696
|
+
currency: "USD",
|
|
2697
|
+
input: .03,
|
|
2698
|
+
output: .13,
|
|
2699
|
+
cache: .006,
|
|
2700
|
+
cacheWrite: .038
|
|
2701
|
+
}),
|
|
2702
|
+
"qwen3-coder-flash": Object.freeze({
|
|
2703
|
+
aliases: Object.freeze([
|
|
2704
|
+
"qwen3-coder-flash",
|
|
2705
|
+
"Qwen: Qwen3 Coder Flash",
|
|
2706
|
+
"Qwen3 Coder Flash",
|
|
2707
|
+
"Qwen3-Coder-Flash",
|
|
2708
|
+
"qwen/qwen3-coder-flash",
|
|
2709
|
+
"openrouter/qwen/qwen3-coder-flash"
|
|
2710
|
+
]),
|
|
2711
|
+
currency: "USD",
|
|
2712
|
+
input: .195,
|
|
2713
|
+
output: .975,
|
|
2714
|
+
cache: .039,
|
|
2715
|
+
cacheWrite: .24375
|
|
2716
|
+
}),
|
|
2717
|
+
"qwen3-coder-next": Object.freeze({
|
|
2718
|
+
aliases: Object.freeze([
|
|
2719
|
+
"qwen3-coder-next",
|
|
2720
|
+
"Qwen: Qwen3 Coder Next",
|
|
2721
|
+
"Qwen3 Coder Next",
|
|
2722
|
+
"Qwen3-Coder-Next",
|
|
2723
|
+
"qwen/qwen3-coder-next",
|
|
2724
|
+
"openrouter/qwen/qwen3-coder-next"
|
|
2725
|
+
]),
|
|
2726
|
+
currency: "USD",
|
|
2727
|
+
input: .12,
|
|
2728
|
+
output: .8,
|
|
2729
|
+
cache: .07
|
|
2730
|
+
}),
|
|
2731
|
+
"qwen3-235b-a22b-2507": Object.freeze({
|
|
2732
|
+
aliases: Object.freeze([
|
|
2733
|
+
"qwen3-235b-a22b-2507",
|
|
2734
|
+
"Qwen: Qwen3 235B A22B Instruct 2507",
|
|
2735
|
+
"Qwen3 235B A22B Instruct 2507",
|
|
2736
|
+
"Qwen3-235B-A22B-Instruct-2507",
|
|
2737
|
+
"qwen/qwen3-235b-a22b-2507",
|
|
2738
|
+
"openrouter/qwen/qwen3-235b-a22b-2507"
|
|
2739
|
+
]),
|
|
2740
|
+
currency: "USD",
|
|
2741
|
+
input: .0875,
|
|
2742
|
+
output: .35,
|
|
2743
|
+
cache: .0175
|
|
2744
|
+
}),
|
|
2745
|
+
"qwen3-next-80b-a3b-instruct": Object.freeze({
|
|
2746
|
+
aliases: Object.freeze([
|
|
2747
|
+
"qwen3-next-80b-a3b-instruct",
|
|
2748
|
+
"Qwen: Qwen3 Next 80B A3B Instruct",
|
|
2749
|
+
"Qwen3 Next 80B A3B Instruct",
|
|
2750
|
+
"Qwen3-Next-80B-A3B-Instruct",
|
|
2751
|
+
"qwen/qwen3-next-80b-a3b-instruct",
|
|
2752
|
+
"openrouter/qwen/qwen3-next-80b-a3b-instruct"
|
|
2753
|
+
]),
|
|
2754
|
+
currency: "USD",
|
|
2755
|
+
input: .09,
|
|
2756
|
+
output: 1.1
|
|
2757
|
+
})
|
|
2758
|
+
})
|
|
2759
|
+
});
|
|
2760
|
+
function defaultPricing() {
|
|
2761
|
+
return cloneTable(DEFAULT_PRICING_TABLE);
|
|
2762
|
+
}
|
|
2763
|
+
function cloneTable(table) {
|
|
2764
|
+
const models = {};
|
|
2765
|
+
for (const [id, row] of Object.entries(table?.models ?? {})) models[id] = {
|
|
2766
|
+
aliases: [...row.aliases ?? []],
|
|
2767
|
+
currency: row.currency ?? table.currency ?? "USD",
|
|
2768
|
+
input: row.input,
|
|
2769
|
+
output: row.output,
|
|
2770
|
+
cache: row.cache,
|
|
2771
|
+
cacheWrite: row.cacheWrite
|
|
2772
|
+
};
|
|
2773
|
+
return {
|
|
2774
|
+
currency: table?.currency ?? "USD",
|
|
2775
|
+
unit: table?.unit ?? "per_1m_tokens",
|
|
2776
|
+
models
|
|
2777
|
+
};
|
|
2778
|
+
}
|
|
2779
|
+
function tokensOf(value) {
|
|
2780
|
+
const n = typeof value === "number" ? value : Number(value);
|
|
2781
|
+
return Number.isFinite(n) && n > 0 ? n : 0;
|
|
2782
|
+
}
|
|
2783
|
+
/** Finite rate ≥ 0, including an explicit $0/1M. Missing / NaN / negative → undefined (unknown, not $0). */
|
|
2784
|
+
function rateOf(value) {
|
|
2785
|
+
if (value === void 0 || value === null || value === "") return void 0;
|
|
2786
|
+
const n = typeof value === "number" ? value : Number(value);
|
|
2787
|
+
return Number.isFinite(n) && n >= 0 ? n : void 0;
|
|
2788
|
+
}
|
|
2789
|
+
function normalizeModelId(id) {
|
|
2790
|
+
return String(id ?? "").trim().toLowerCase();
|
|
2791
|
+
}
|
|
2792
|
+
function parseScalar(raw) {
|
|
2793
|
+
const s = String(raw ?? "").trim();
|
|
2794
|
+
if (!s) return "";
|
|
2795
|
+
if (s.startsWith("\"") && s.endsWith("\"") || s.startsWith("'") && s.endsWith("'")) return s.slice(1, -1);
|
|
2796
|
+
if (s === "true") return true;
|
|
2797
|
+
if (s === "false") return false;
|
|
2798
|
+
if (s === "null" || s === "~") return null;
|
|
2799
|
+
if (/^-?\d+(\.\d+)?$/.test(s)) return Number(s);
|
|
2800
|
+
return s;
|
|
2801
|
+
}
|
|
2802
|
+
/**
|
|
2803
|
+
* Minimal YAML subset: comments, maps, string/number scalars, and `- item` lists.
|
|
2804
|
+
* Enough for `pricing/models.yaml` and simple overlays.
|
|
2805
|
+
*/
|
|
2806
|
+
function parsePricingYaml(text) {
|
|
2807
|
+
const lines = String(text ?? "").replace(/\t/g, " ").split(/\r?\n/);
|
|
2808
|
+
const root = {};
|
|
2809
|
+
const stack = [{
|
|
2810
|
+
indent: -1,
|
|
2811
|
+
parent: null,
|
|
2812
|
+
key: null,
|
|
2813
|
+
value: root
|
|
2814
|
+
}];
|
|
2815
|
+
for (const raw of lines) {
|
|
2816
|
+
const trimmed = raw.trim();
|
|
2817
|
+
if (!trimmed || trimmed.startsWith("#")) continue;
|
|
2818
|
+
const indent = raw.match(/^ */)[0].length;
|
|
2819
|
+
const body = raw.slice(indent);
|
|
2820
|
+
while (stack.length > 1 && indent <= stack[stack.length - 1].indent) stack.pop();
|
|
2821
|
+
const frame = stack[stack.length - 1];
|
|
2822
|
+
if (body.startsWith("- ")) {
|
|
2823
|
+
const item = parseScalar(body.slice(2).replace(/\s+#.*$/, "").trim());
|
|
2824
|
+
if (frame.parent == null || frame.key == null) continue;
|
|
2825
|
+
if (!Array.isArray(frame.parent[frame.key])) {
|
|
2826
|
+
frame.parent[frame.key] = [];
|
|
2827
|
+
frame.value = frame.parent[frame.key];
|
|
2828
|
+
}
|
|
2829
|
+
frame.parent[frame.key].push(item);
|
|
2830
|
+
continue;
|
|
2831
|
+
}
|
|
2832
|
+
const colon = body.indexOf(":");
|
|
2833
|
+
if (colon < 0) continue;
|
|
2834
|
+
const key = body.slice(0, colon).trim();
|
|
2835
|
+
const rest = body.slice(colon + 1).replace(/\s+#.*$/, "").trim();
|
|
2836
|
+
const parent = frame.value && typeof frame.value === "object" && !Array.isArray(frame.value) ? frame.value : root;
|
|
2837
|
+
if (rest === "") {
|
|
2838
|
+
const next = {};
|
|
2839
|
+
parent[key] = next;
|
|
2840
|
+
stack.push({
|
|
2841
|
+
indent,
|
|
2842
|
+
parent,
|
|
2843
|
+
key,
|
|
2844
|
+
value: next
|
|
2845
|
+
});
|
|
2846
|
+
continue;
|
|
2847
|
+
}
|
|
2848
|
+
parent[key] = parseScalar(rest);
|
|
2849
|
+
}
|
|
2850
|
+
return root;
|
|
2851
|
+
}
|
|
2852
|
+
function buildRateIndex(table) {
|
|
2853
|
+
const map = /* @__PURE__ */ new Map();
|
|
2854
|
+
for (const [id, row] of Object.entries(table?.models ?? {})) {
|
|
2855
|
+
const rates = {
|
|
2856
|
+
id,
|
|
2857
|
+
currency: row.currency ?? table.currency ?? "USD",
|
|
2858
|
+
input: rateOf(row.input),
|
|
2859
|
+
output: rateOf(row.output),
|
|
2860
|
+
cache: rateOf(row.cache),
|
|
2861
|
+
cacheWrite: rateOf(row.cacheWrite)
|
|
2862
|
+
};
|
|
2863
|
+
for (const key of [id, ...row.aliases ?? []]) {
|
|
2864
|
+
const normalized = normalizeModelId(key);
|
|
2865
|
+
if (normalized && !UNLABELED.has(normalized)) map.set(normalized, rates);
|
|
2866
|
+
}
|
|
2867
|
+
}
|
|
2868
|
+
return map;
|
|
2869
|
+
}
|
|
2870
|
+
function lookupRates(model, table) {
|
|
2871
|
+
const index = table?._index instanceof Map ? table._index : buildRateIndex(table);
|
|
2872
|
+
const raw = normalizeModelId(model);
|
|
2873
|
+
if (!raw || UNLABELED.has(raw)) return null;
|
|
2874
|
+
if (index.has(raw)) return index.get(raw);
|
|
2875
|
+
const slash = raw.includes("/") ? raw.slice(raw.lastIndexOf("/") + 1) : "";
|
|
2876
|
+
if (slash && !UNLABELED.has(slash) && index.has(slash)) return index.get(slash);
|
|
2877
|
+
return null;
|
|
2878
|
+
}
|
|
2879
|
+
function mergePricing(base, overlay) {
|
|
2880
|
+
const next = cloneTable(base ?? defaultPricing());
|
|
2881
|
+
if (overlay == null) return indexTable(next);
|
|
2882
|
+
if (typeof overlay !== "object" || Array.isArray(overlay)) return indexTable(next);
|
|
2883
|
+
const incoming = overlay.models && typeof overlay.models === "object" && !Array.isArray(overlay.models) ? overlay.models : overlay;
|
|
2884
|
+
if (typeof overlay.currency === "string" && overlay.currency.trim()) next.currency = overlay.currency.trim();
|
|
2885
|
+
if (typeof overlay.unit === "string" && overlay.unit.trim()) next.unit = overlay.unit.trim();
|
|
2886
|
+
for (const [id, row] of Object.entries(incoming ?? {})) {
|
|
2887
|
+
if (!id || !row || typeof row !== "object" || Array.isArray(row)) continue;
|
|
2888
|
+
const prev = next.models[id] ?? {
|
|
2889
|
+
aliases: [],
|
|
2890
|
+
currency: next.currency
|
|
2891
|
+
};
|
|
2892
|
+
const aliases = [.../* @__PURE__ */ new Set([...prev.aliases ?? [], ...(row.aliases ?? []).filter((a) => typeof a === "string")])];
|
|
2893
|
+
next.models[id] = {
|
|
2894
|
+
aliases,
|
|
2895
|
+
currency: typeof row.currency === "string" && row.currency.trim() ? row.currency.trim() : prev.currency,
|
|
2896
|
+
input: row.input !== void 0 ? rateOf(row.input) : prev.input,
|
|
2897
|
+
output: row.output !== void 0 ? rateOf(row.output) : prev.output,
|
|
2898
|
+
cache: row.cache !== void 0 ? rateOf(row.cache) : prev.cache,
|
|
2899
|
+
cacheWrite: row.cacheWrite !== void 0 ? rateOf(row.cacheWrite) : prev.cacheWrite
|
|
2900
|
+
};
|
|
2901
|
+
}
|
|
2902
|
+
return indexTable(next);
|
|
2903
|
+
}
|
|
2904
|
+
function indexTable(table) {
|
|
2905
|
+
table._index = buildRateIndex(table);
|
|
2906
|
+
return table;
|
|
2907
|
+
}
|
|
2908
|
+
function bucketCost(tokens, rate) {
|
|
2909
|
+
if (tokens <= 0) return {
|
|
2910
|
+
tokens: 0,
|
|
2911
|
+
usd: 0,
|
|
2912
|
+
unknown: false
|
|
2913
|
+
};
|
|
2914
|
+
if (rate === void 0) return {
|
|
2915
|
+
tokens,
|
|
2916
|
+
usd: null,
|
|
2917
|
+
unknown: true
|
|
2918
|
+
};
|
|
2919
|
+
return {
|
|
2920
|
+
tokens,
|
|
2921
|
+
usd: tokens / PER_MILLION * rate,
|
|
2922
|
+
unknown: false
|
|
2923
|
+
};
|
|
2924
|
+
}
|
|
2925
|
+
/**
|
|
2926
|
+
* Price one model usage row.
|
|
2927
|
+
* $0 only when every token count is actually 0. Missing model or missing
|
|
2928
|
+
* bucket rate is Unknown — never coerced to $0.
|
|
2929
|
+
*/
|
|
2930
|
+
function estimateModelUsage(usage, table) {
|
|
2931
|
+
const input = tokensOf(usage?.input);
|
|
2932
|
+
const output = tokensOf(usage?.output);
|
|
2933
|
+
const cacheRead = tokensOf(usage?.cacheRead ?? usage?.cache);
|
|
2934
|
+
const cacheWrite = tokensOf(usage?.cacheWrite);
|
|
2935
|
+
const reported = tokensOf(usage?.tokens);
|
|
2936
|
+
const bucketSum = input + output + cacheRead + cacheWrite;
|
|
2937
|
+
const totalTokens = Math.max(reported, bucketSum);
|
|
2938
|
+
if (totalTokens === 0) return {
|
|
2939
|
+
status: "zero",
|
|
2940
|
+
usd: 0,
|
|
2941
|
+
unknown: false,
|
|
2942
|
+
totalTokens: 0,
|
|
2943
|
+
parts: []
|
|
2944
|
+
};
|
|
2945
|
+
const rates = lookupRates(usage?.model ?? usage?.modelId, table);
|
|
2946
|
+
if (!rates) return {
|
|
2947
|
+
status: "unknown",
|
|
2948
|
+
usd: null,
|
|
2949
|
+
unknown: true,
|
|
2950
|
+
totalTokens,
|
|
2951
|
+
reason: "missing-model",
|
|
2952
|
+
parts: []
|
|
2953
|
+
};
|
|
2954
|
+
if (bucketSum === 0 && reported > 0) return {
|
|
2955
|
+
status: "unknown",
|
|
2956
|
+
usd: null,
|
|
2957
|
+
unknown: true,
|
|
2958
|
+
totalTokens,
|
|
2959
|
+
reason: "unsplit-tokens",
|
|
2960
|
+
parts: []
|
|
2961
|
+
};
|
|
2962
|
+
const parts = {
|
|
2963
|
+
input: bucketCost(input, rates.input),
|
|
2964
|
+
output: bucketCost(output, rates.output),
|
|
2965
|
+
cache: bucketCost(cacheRead, rates.cache),
|
|
2966
|
+
cacheWrite: bucketCost(cacheWrite, rates.cacheWrite)
|
|
2967
|
+
};
|
|
2968
|
+
let usd = 0;
|
|
2969
|
+
let unknown = false;
|
|
2970
|
+
for (const part of Object.values(parts)) {
|
|
2971
|
+
if (part.tokens <= 0) continue;
|
|
2972
|
+
if (part.unknown) unknown = true;
|
|
2973
|
+
else usd += part.usd;
|
|
2974
|
+
}
|
|
2975
|
+
if (reported > bucketSum) {
|
|
2976
|
+
unknown = true;
|
|
2977
|
+
parts.unallocated = {
|
|
2978
|
+
tokens: reported - bucketSum,
|
|
2979
|
+
usd: null,
|
|
2980
|
+
unknown: true
|
|
2981
|
+
};
|
|
2982
|
+
}
|
|
2983
|
+
if (unknown && usd === 0) return {
|
|
2984
|
+
status: "unknown",
|
|
2985
|
+
usd: null,
|
|
2986
|
+
unknown: true,
|
|
2987
|
+
totalTokens,
|
|
2988
|
+
reason: "missing-rate",
|
|
2989
|
+
parts
|
|
2990
|
+
};
|
|
2991
|
+
if (unknown) return {
|
|
2992
|
+
status: "partial",
|
|
2993
|
+
usd,
|
|
2994
|
+
unknown: true,
|
|
2995
|
+
totalTokens,
|
|
2996
|
+
parts
|
|
2997
|
+
};
|
|
2998
|
+
return {
|
|
2999
|
+
status: "priced",
|
|
3000
|
+
usd,
|
|
3001
|
+
unknown: false,
|
|
3002
|
+
totalTokens,
|
|
3003
|
+
parts
|
|
3004
|
+
};
|
|
3005
|
+
}
|
|
3006
|
+
function estimateUsageRows(rows, table) {
|
|
3007
|
+
const list = Array.isArray(rows) ? rows : [];
|
|
3008
|
+
if (list.length === 0) return {
|
|
3009
|
+
status: "zero",
|
|
3010
|
+
usd: 0,
|
|
3011
|
+
unknown: false,
|
|
3012
|
+
totalTokens: 0,
|
|
3013
|
+
rows: []
|
|
3014
|
+
};
|
|
3015
|
+
let usd = 0;
|
|
3016
|
+
let unknown = false;
|
|
3017
|
+
let totalTokens = 0;
|
|
3018
|
+
let anyPositive = false;
|
|
3019
|
+
const estimated = list.map((row) => {
|
|
3020
|
+
const result = estimateModelUsage(row, table);
|
|
3021
|
+
totalTokens += result.totalTokens ?? 0;
|
|
3022
|
+
if (result.status !== "zero") anyPositive = true;
|
|
3023
|
+
if (result.unknown) unknown = true;
|
|
3024
|
+
if (result.usd != null) usd += result.usd;
|
|
3025
|
+
return result;
|
|
3026
|
+
});
|
|
3027
|
+
if (!anyPositive) return {
|
|
3028
|
+
status: "zero",
|
|
3029
|
+
usd: 0,
|
|
3030
|
+
unknown: false,
|
|
3031
|
+
totalTokens: 0,
|
|
3032
|
+
rows: estimated
|
|
3033
|
+
};
|
|
3034
|
+
if (unknown && usd === 0) return {
|
|
3035
|
+
status: "unknown",
|
|
3036
|
+
usd: null,
|
|
3037
|
+
unknown: true,
|
|
3038
|
+
totalTokens,
|
|
3039
|
+
rows: estimated
|
|
3040
|
+
};
|
|
3041
|
+
if (unknown) return {
|
|
3042
|
+
status: "partial",
|
|
3043
|
+
usd,
|
|
3044
|
+
unknown: true,
|
|
3045
|
+
totalTokens,
|
|
3046
|
+
rows: estimated
|
|
3047
|
+
};
|
|
3048
|
+
return {
|
|
3049
|
+
status: "priced",
|
|
3050
|
+
usd,
|
|
3051
|
+
unknown: false,
|
|
3052
|
+
totalTokens,
|
|
3053
|
+
rows: estimated
|
|
3054
|
+
};
|
|
3055
|
+
}
|
|
3056
|
+
function estimateFromInsights(view, stats, scope, selectedModel, currentRoute, table) {
|
|
3057
|
+
if (selectedModel) return estimateModelUsage(selectedModel, table);
|
|
3058
|
+
if (scope === "turn") return estimateModelUsage({
|
|
3059
|
+
...stats,
|
|
3060
|
+
model: view?.turn?.route?.model ?? currentRoute?.model
|
|
3061
|
+
}, table);
|
|
3062
|
+
if (Array.isArray(view?.models) && view.models.length > 0) return estimateUsageRows(view.models, table);
|
|
3063
|
+
return estimateModelUsage({
|
|
3064
|
+
...stats,
|
|
3065
|
+
model: currentRoute?.model
|
|
3066
|
+
}, table);
|
|
3067
|
+
}
|
|
3068
|
+
function formatUsd(amount) {
|
|
3069
|
+
if (!Number.isFinite(amount)) return null;
|
|
3070
|
+
if (amount === 0) return "$0.00";
|
|
3071
|
+
const abs = Math.abs(amount);
|
|
3072
|
+
if (abs < 1e-4) return `$${amount.toFixed(6)}`.replace(/(\.\d*?)0+$/, "$1").replace(/\.$/, "");
|
|
3073
|
+
if (abs < .01) return `$${amount.toFixed(4)}`;
|
|
3074
|
+
if (abs < 1) return `$${amount.toFixed(3)}`;
|
|
3075
|
+
return `$${amount.toFixed(2)}`;
|
|
3076
|
+
}
|
|
3077
|
+
function formatEstimate(result, locale = "zh") {
|
|
3078
|
+
const copy = costCopy(locale);
|
|
3079
|
+
if (!result || result.status === "unknown") return copy.unknown;
|
|
3080
|
+
if (result.status === "zero") return formatUsd(0);
|
|
3081
|
+
const money = formatUsd(result.usd);
|
|
3082
|
+
if (money == null) return copy.unknown;
|
|
3083
|
+
return money;
|
|
3084
|
+
}
|
|
3085
|
+
/** Quiet footnote for partial rows. Never embed this in the bold main number. */
|
|
3086
|
+
function formatEstimateNote(result, locale = "zh") {
|
|
3087
|
+
const copy = costCopy(locale);
|
|
3088
|
+
return result?.status === "partial" ? copy.someUnpriced : "";
|
|
3089
|
+
}
|
|
3090
|
+
function estimateDisclaimer(locale = "zh") {
|
|
3091
|
+
const copy = costCopy(locale);
|
|
3092
|
+
return locale === "en" ? `${copy.estimateNotBill} / 估算,非账单` : `${copy.estimateNotBill} / Estimate, not a bill`;
|
|
3093
|
+
}
|
|
3094
|
+
function parseOverride(raw) {
|
|
3095
|
+
if (raw == null || raw === "") return null;
|
|
3096
|
+
if (typeof raw === "object" && !Array.isArray(raw)) return raw;
|
|
3097
|
+
const text = String(raw).trim();
|
|
3098
|
+
if (!text) return null;
|
|
3099
|
+
if (text.startsWith("{") || text.startsWith("[")) {
|
|
3100
|
+
const parsed = JSON.parse(text);
|
|
3101
|
+
if (parsed == null || typeof parsed !== "object" || Array.isArray(parsed)) throw new TypeError("override must be a JSON object");
|
|
3102
|
+
return parsed;
|
|
3103
|
+
}
|
|
3104
|
+
return parsePricingYaml(text);
|
|
3105
|
+
}
|
|
3106
|
+
function readStoredOverride(storage) {
|
|
3107
|
+
try {
|
|
3108
|
+
const raw = storage?.getItem?.(PRICING_STORAGE_KEY);
|
|
3109
|
+
return raw ? parseOverride(raw) : null;
|
|
3110
|
+
} catch {
|
|
3111
|
+
return null;
|
|
3112
|
+
}
|
|
3113
|
+
}
|
|
3114
|
+
function sameAliasSet(a, b) {
|
|
3115
|
+
const left = [...new Set((a ?? []).map((x) => String(x)))].sort();
|
|
3116
|
+
const right = [...new Set((b ?? []).map((x) => String(x)))].sort();
|
|
3117
|
+
if (left.length !== right.length) return false;
|
|
3118
|
+
return left.every((value, i) => value === right[i]);
|
|
3119
|
+
}
|
|
3120
|
+
function serializeModelRow(row) {
|
|
3121
|
+
const out = {};
|
|
3122
|
+
if (Array.isArray(row?.aliases) && row.aliases.length) out.aliases = [...row.aliases];
|
|
3123
|
+
if (typeof row?.currency === "string" && row.currency.trim()) out.currency = row.currency.trim();
|
|
3124
|
+
if (row?.input !== void 0) out.input = row.input;
|
|
3125
|
+
if (row?.output !== void 0) out.output = row.output;
|
|
3126
|
+
if (row?.cache !== void 0) out.cache = row.cache;
|
|
3127
|
+
if (row?.cacheWrite !== void 0) out.cacheWrite = row.cacheWrite;
|
|
3128
|
+
return out;
|
|
3129
|
+
}
|
|
3130
|
+
/** Stable pretty JSON of the effective table (no `_index`). Model keys sorted. */
|
|
3131
|
+
function serializeEffectivePricing(table) {
|
|
3132
|
+
const models = {};
|
|
3133
|
+
for (const id of Object.keys(table?.models ?? {}).sort()) models[id] = serializeModelRow(table.models[id]);
|
|
3134
|
+
return JSON.stringify({
|
|
3135
|
+
currency: table?.currency ?? "USD",
|
|
3136
|
+
unit: table?.unit ?? "per_1m_tokens",
|
|
3137
|
+
models
|
|
3138
|
+
}, null, 2);
|
|
3139
|
+
}
|
|
3140
|
+
function effectivePricingText(storage) {
|
|
3141
|
+
return serializeEffectivePricing(mergePricing(defaultPricing(), readStoredOverride(storage)));
|
|
3142
|
+
}
|
|
3143
|
+
/**
|
|
3144
|
+
* Overlay of only models/fields that differ from `base`.
|
|
3145
|
+
* Missing edited models are ignored (defaults stay). Empty → null.
|
|
3146
|
+
*/
|
|
3147
|
+
function diffPricing(base, edited) {
|
|
3148
|
+
if (edited == null || typeof edited !== "object" || Array.isArray(edited)) return null;
|
|
3149
|
+
const baseTable = base?.models && typeof base.models === "object" ? base : {
|
|
3150
|
+
models: {},
|
|
3151
|
+
currency: "USD",
|
|
3152
|
+
unit: PRICING_UNIT
|
|
3153
|
+
};
|
|
3154
|
+
const incoming = edited.models && typeof edited.models === "object" && !Array.isArray(edited.models) ? edited.models : edited;
|
|
3155
|
+
const overlay = {};
|
|
3156
|
+
if (typeof edited.currency === "string" && edited.currency.trim() && edited.currency.trim() !== (baseTable.currency ?? "USD")) overlay.currency = edited.currency.trim();
|
|
3157
|
+
if (typeof edited.unit === "string" && edited.unit.trim() && edited.unit.trim() !== (baseTable.unit ?? "per_1m_tokens")) overlay.unit = edited.unit.trim();
|
|
3158
|
+
const models = {};
|
|
3159
|
+
for (const [id, row] of Object.entries(incoming ?? {})) {
|
|
3160
|
+
if (!id || !row || typeof row !== "object" || Array.isArray(row)) continue;
|
|
3161
|
+
const prev = baseTable.models?.[id];
|
|
3162
|
+
const next = {};
|
|
3163
|
+
if (Array.isArray(row.aliases) && !sameAliasSet(row.aliases, prev?.aliases)) next.aliases = [...row.aliases];
|
|
3164
|
+
if (typeof row.currency === "string" && row.currency.trim() && row.currency.trim() !== (prev?.currency ?? baseTable.currency ?? "USD")) next.currency = row.currency.trim();
|
|
3165
|
+
for (const field of [
|
|
3166
|
+
"input",
|
|
3167
|
+
"output",
|
|
3168
|
+
"cache",
|
|
3169
|
+
"cacheWrite"
|
|
3170
|
+
]) {
|
|
3171
|
+
if (row[field] === void 0) continue;
|
|
3172
|
+
const value = rateOf(row[field]);
|
|
3173
|
+
if (value !== rateOf(prev?.[field])) next[field] = value;
|
|
3174
|
+
}
|
|
3175
|
+
if (Object.keys(next).length) models[id] = next;
|
|
3176
|
+
}
|
|
3177
|
+
if (Object.keys(models).length) overlay.models = models;
|
|
3178
|
+
return Object.keys(overlay).length ? overlay : null;
|
|
3179
|
+
}
|
|
3180
|
+
function persistPricingEditor(raw, storage) {
|
|
3181
|
+
const parsed = raw == null || String(raw).trim() === "" ? null : parseOverride(raw);
|
|
3182
|
+
if (parsed != null && (typeof parsed !== "object" || Array.isArray(parsed))) throw new TypeError("override must be a JSON object");
|
|
3183
|
+
const overlay = parsed == null ? null : diffPricing(defaultPricing(), parsed);
|
|
3184
|
+
if (!overlay) storage?.removeItem?.(PRICING_STORAGE_KEY);
|
|
3185
|
+
else storage?.setItem?.(PRICING_STORAGE_KEY, JSON.stringify(overlay));
|
|
3186
|
+
return serializeEffectivePricing(mergePricing(defaultPricing(), overlay));
|
|
3187
|
+
}
|
|
3188
|
+
function clearPricingEditor(storage) {
|
|
3189
|
+
storage?.removeItem?.(PRICING_STORAGE_KEY);
|
|
3190
|
+
return serializeEffectivePricing(defaultPricing());
|
|
3191
|
+
}
|
|
3192
|
+
//#endregion
|
|
1931
3193
|
//#region \0dshx-css-module:/Users/wu/Documents/DeepSeekHarness/plugins/dsh-watcher/src/client/Insights.module.css.mjs
|
|
1932
|
-
const css$1 = ".o55MTq_hudBox{box-sizing:border-box;border-bottom:1px solid var(--dsw-alias-border-l2);background:var(--dsw-specific-menu);width:100%;font-family:var(--dsw-font-family);flex:none}.o55MTq_hudTop{background:var(--dsw-alias-bg-layer-2);border-bottom:1px solid var(--dsw-alias-border-l2);flex-wrap:nowrap;justify-content:space-between;align-items:center;gap:12px;padding:8px 14px;display:flex}.o55MTq_hudTopLeft{flex-wrap:nowrap;align-items:center;gap:8px;min-width:0;display:flex}.o55MTq_hudHeading{color:var(--dsw-alias-label-secondary);white-space:nowrap;font-size:11px;font-weight:600}.o55MTq_currentModelTag{background:var(--dsw-alias-interactive-bg-hover);white-space:nowrap;border-radius:4px;flex-shrink:1;align-items:center;gap:5px;min-width:0;max-width:100%;padding:1px 6px;font-size:11px;display:inline-flex}.o55MTq_modelTagText{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;min-width:0;font-weight:600;overflow:hidden}.o55MTq_effortTag{color:var(--dsw-static-deepseek-450,#5686fe);white-space:nowrap;background:#5686fe1f;border-radius:3px;flex-shrink:0;padding:0 5px;font-size:10px;font-weight:600;line-height:14px}.o55MTq_contextTag{color:var(--dsw-alias-label-secondary,#5f636d);background:var(--dsw-alias-bg-layer-1,#fff);border:1px solid var(--dsw-alias-border-l2,#e2e8f0);font-variant-numeric:tabular-nums;white-space:nowrap;border-radius:4px;flex-shrink:0;padding:1px 7px;font-size:11px}.o55MTq_hudTopRight{flex-shrink:0;align-items:center;gap:10px;display:flex}.o55MTq_tokenStat{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;white-space:nowrap;font-size:11px}.o55MTq_tokenStat strong{color:var(--dsw-alias-label-primary)}.o55MTq_scopeGroup{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);border-radius:5px;gap:1px;padding:1px;display:inline-flex}.o55MTq_scopeBtn{color:var(--dsw-alias-label-tertiary);cursor:pointer;white-space:nowrap;background:0 0;border:0;border-radius:3px;padding:2px 7px;font-size:11px;line-height:14px;transition:all .12s}.o55MTq_scopeBtn[data-active]{background:var(--dsw-specific-menu);color:var(--dsw-alias-label-primary);box-shadow:var(--dsw-shadow-lv1);font-weight:600}.o55MTq_modelTabBar{background:var(--dsw-alias-bg-layer-1);border-bottom:1px solid var(--dsw-alias-border-l2);gap:4px;padding:6px 14px;display:flex;overflow-x:auto}.o55MTq_modelTabBtn{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-specific-menu);color:var(--dsw-alias-label-secondary);cursor:pointer;white-space:nowrap;border-radius:4px;padding:2px 8px;font-size:11px;transition:all .12s}.o55MTq_modelTabBtn[data-active]{background:var(--dsw-static-deepseek-450,#5686fe);color:#fff;border-color:var(--dsw-static-deepseek-450,#5686fe);font-weight:600}.o55MTq_hudBody{padding:10px 14px}.o55MTq_alertSection{flex-direction:column;gap:6px;margin-top:8px;display:flex}.o55MTq_alertCard{border-radius:6px;justify-content:space-between;align-items:center;gap:8px;padding:8px 10px;display:flex}.o55MTq_alertCardDanger{background:#e5484d14;border:1px solid #e5484d40}.o55MTq_alertCardWarn{background:#f59e0b14;border:1px solid #f59e0b40}.o55MTq_alertLeft{align-items:center;gap:8px;min-width:0;display:flex}.o55MTq_alertTag{color:#fff;border-radius:3px;flex:none;padding:1px 5px;font-size:10px;font-weight:600}.o55MTq_tagDanger{background:var(--dsw-alias-state-error-primary,#e5484d)}.o55MTq_tagWarn{background:#f59e0b}.o55MTq_alertTexts{flex-direction:column;min-width:0;display:flex}.o55MTq_alertMainText{color:var(--dsw-alias-label-primary);font-size:12px;font-weight:600}.o55MTq_alertSubText{color:var(--dsw-alias-label-secondary);font-size:11px}.o55MTq_alertActionBtn{color:var(--dsw-static-deepseek-450,#5686fe);cursor:pointer;white-space:nowrap;background:0 0;border:none;padding:2px 6px;font-size:11px;font-weight:600}.o55MTq_settingsContainer{width:100%;min-width:0;max-width:100%;color:var(--dsw-alias-label-primary);box-sizing:border-box;flex-direction:column;gap:14px;padding:0 0 24px;display:flex;overflow-x:hidden}.o55MTq_cockpitHeader{flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:10px;display:flex}.o55MTq_cockpitTitleArea h2{color:var(--dsw-alias-label-primary);letter-spacing:-.3px;margin:0;font-size:17px;font-weight:700}.o55MTq_cockpitSubTitle{color:var(--dsw-alias-label-tertiary);margin:3px 0 0;font-size:12px}.o55MTq_headerRightControls{align-items:center;gap:8px;display:flex}.o55MTq_rangeSwitchGroup{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:6px;padding:2px;display:flex}.o55MTq_rangeBtn{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;padding:3px 10px;font-size:11px;font-weight:600;transition:all .12s}.o55MTq_rangeBtn[data-active]{background:var(--dsw-specific-menu);color:var(--dsw-alias-label-primary);box-shadow:var(--dsw-shadow-lv1)}.o55MTq_settingsScanBtn{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;padding:4px 10px;font-size:11px;font-weight:500;transition:all .12s}.o55MTq_heroStatsRow{border-bottom:1px solid var(--dsw-alias-border-l2);flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:10px;padding-bottom:10px;display:flex}.o55MTq_heroBigNum{letter-spacing:-.5px;color:var(--dsw-alias-label-primary);font-variant-numeric:tabular-nums;align-items:baseline;gap:6px;font-size:26px;font-weight:800;display:flex}.o55MTq_heroUnit{color:var(--dsw-alias-label-secondary);font-size:13px;font-weight:500}.o55MTq_heroMetaCol{color:var(--dsw-alias-label-secondary);white-space:nowrap;flex-wrap:nowrap;gap:14px;font-size:12px;display:flex}.o55MTq_heroMetaCol strong{color:var(--dsw-alias-label-primary)}.o55MTq_roastGrid{box-sizing:border-box;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%;display:grid}@media (width<=440px){.o55MTq_roastGrid{grid-template-columns:1fr}}.o55MTq_roastItem{background:var(--dsw-specific-menu);border:1px solid var(--dsw-alias-border-l2);min-height:136px;box-shadow:var(--dsw-shadow-lv1);cursor:pointer;user-select:none;box-sizing:border-box;border-radius:8px;flex-direction:column;justify-content:space-between;padding:12px 14px;transition:all .12s;display:flex}.o55MTq_roastItem:hover{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-border-l3);transform:translateY(-1px)}.o55MTq_roastItemActive{background:var(--dsw-alias-bg-layer-2);box-shadow:0 0 0 1px var(--dsw-static-deepseek-450,#5686fe);border-color:var(--dsw-static-deepseek-450,#5686fe)!important}.o55MTq_roastHead{justify-content:space-between;align-items:center;margin-bottom:4px;display:flex}.o55MTq_roastTag{letter-spacing:.3px;font-size:11px;font-weight:700}.o55MTq_roastCategoryBadge{color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1,#0000000f);border-radius:3px;padding:1px 4px;font-size:9px;line-height:1.2}.o55MTq_roastTitle{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:700;line-height:18px;overflow:hidden}.o55MTq_roastDesc{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;margin-top:2px;font-size:10px;line-height:15px;overflow:hidden}.o55MTq_roastVal{font-variant-numeric:tabular-nums;text-overflow:ellipsis;white-space:nowrap;margin-top:6px;font-size:12px;font-weight:700;overflow:hidden}.o55MTq_roastFooter{border-top:1px dashed var(--dsw-alias-border-l2);color:var(--dsw-alias-label-tertiary);justify-content:space-between;align-items:center;margin-top:10px;padding-top:8px;font-size:10px;line-height:1;display:flex}.o55MTq_roastFooterLeft{text-overflow:ellipsis;white-space:nowrap;max-width:110px;overflow:hidden}.o55MTq_roastAction{color:var(--dsw-alias-label-secondary);flex-shrink:0;font-weight:600;transition:color .12s}.o55MTq_roastItem:hover .o55MTq_roastAction,.o55MTq_roastItemActive .o55MTq_roastAction{color:var(--dsw-static-deepseek-450,#5686fe)}.o55MTq_drilldownPanel{background:var(--dsw-specific-menu);border:1px solid var(--dsw-static-deepseek-450,#5686fe);box-shadow:var(--dsw-shadow-lv2,0 4px 12px #00000014);border-radius:10px;flex-direction:column;gap:12px;min-width:0;padding:14px 16px;animation:.15s ease-out o55MTq_slideDown;display:flex}@keyframes o55MTq_slideDown{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.o55MTq_drilldownHead{border-bottom:1px solid var(--dsw-alias-border-l2);justify-content:space-between;align-items:center;gap:12px;min-width:0;padding-bottom:8px;display:flex}.o55MTq_drilldownTitleGroup{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.o55MTq_drilldownTitle{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:700;overflow:hidden}.o55MTq_drilldownSub{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:11px;overflow:hidden}.o55MTq_drilldownCloseBtn{border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border-radius:4px;flex-shrink:0;padding:3px 8px;font-size:11px;transition:all .12s}.o55MTq_drilldownCloseBtn:hover{background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-border-l3)}.o55MTq_drilldownEmpty{text-align:center;color:var(--dsw-alias-label-tertiary);padding:16px;font-size:12px}.o55MTq_rankList{flex-direction:column;gap:8px;display:flex}.o55MTq_rankItem{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1,#0000000f);border-radius:6px;flex-direction:column;gap:6px;min-width:0;padding:8px 12px;display:flex}.o55MTq_rankItemTop{justify-content:space-between;align-items:center;gap:8px;min-width:0;display:flex}.o55MTq_rankItemLeft{flex:1;align-items:center;gap:8px;min-width:0;display:flex}.o55MTq_rankBadge{color:var(--dsw-alias-label-secondary);background:var(--dsw-specific-menu);border:1px solid var(--dsw-alias-border-l2);font-variant-numeric:tabular-nums;border-radius:3px;flex-shrink:0;padding:1px 5px;font-size:10px;font-weight:700;line-height:1.2}.o55MTq_rankBadgeGold{color:#d97706;background:#f59e0b1f;border-color:#f59e0b66}.o55MTq_rankName{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:600;overflow:hidden}.o55MTq_rankValMain{color:var(--dsw-alias-label-primary);font-variant-numeric:tabular-nums;white-space:nowrap;flex-shrink:0;font-size:12px;font-weight:700}.o55MTq_rankTrack{background:var(--dsw-specific-menu);border-radius:3px;width:100%;height:6px;overflow:hidden}.o55MTq_rankBar{border-radius:3px;height:100%;transition:width .2s}.o55MTq_rankSubText{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;justify-content:space-between;align-items:center;gap:8px;font-size:10px;line-height:1.2;display:flex;overflow:hidden}.o55MTq_rankSubText strong{color:var(--dsw-alias-label-primary)}.o55MTq_toolDrillSection{flex-direction:column;gap:12px;min-width:0;display:flex}.o55MTq_toolCompoundBox{flex-direction:column;gap:6px;display:flex}.o55MTq_toolCompoundTrack{background:var(--dsw-alias-bg-layer-2);border-radius:4px;gap:1px;height:10px;display:flex;overflow:hidden}.o55MTq_toolSliceBash{background:var(--dsw-static-green-500,#10b981);height:100%}.o55MTq_toolSliceFile{background:#0ea5e9;height:100%}.o55MTq_toolCompoundLegend{color:var(--dsw-alias-label-secondary);flex-wrap:wrap;gap:16px;font-size:11px;display:flex}.o55MTq_toolCompoundLegend span{align-items:center;gap:6px;display:flex}.o55MTq_toolCompoundLegend strong{color:var(--dsw-alias-label-primary)}.o55MTq_toolGridCards{grid-template-columns:1fr 1fr;gap:10px;display:grid}@media (width<=600px){.o55MTq_toolGridCards{grid-template-columns:1fr}}.o55MTq_toolMiniCard{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:6px;flex-direction:column;gap:4px;min-width:0;padding:10px 12px;display:flex}.o55MTq_toolMiniTitle{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;align-items:center;gap:6px;font-size:11px;font-weight:600;display:flex;overflow:hidden}.o55MTq_toolMiniNum{color:var(--dsw-alias-label-primary);font-variant-numeric:tabular-nums;margin:2px 0;font-size:15px;font-weight:700}.o55MTq_toolMiniDesc{color:var(--dsw-alias-label-tertiary);font-size:10px;line-height:14px}.o55MTq_toolTopList{border-top:1px dashed var(--dsw-alias-border-l2);flex-direction:column;gap:6px;padding-top:8px;display:flex}.o55MTq_toolTopListTitle{color:var(--dsw-alias-label-secondary);margin-bottom:2px;font-size:11px;font-weight:600}.o55MTq_errorDrillSection{flex-direction:column;gap:8px;display:flex}.o55MTq_errorAllGoodBox{color:var(--dsw-static-green-500,#10b981);text-align:center;background:#10b98114;border:1px solid #10b9814d;border-radius:6px;padding:16px;font-size:12px;font-weight:600}.o55MTq_errorSessionList{flex-direction:column;gap:6px;display:flex}.o55MTq_errorSessionRow{background:var(--dsw-alias-bg-layer-2);font-variant-numeric:tabular-nums;border-radius:4px;grid-template-columns:28px 110px 1fr 75px 75px;align-items:center;gap:8px;min-width:0;padding:6px 10px;font-size:11px;display:grid}.o55MTq_vizSplitGrid{box-sizing:border-box;grid-template-columns:1fr;gap:12px;width:100%;display:grid}.o55MTq_vizPanel{background:var(--dsw-specific-menu);border:1px solid var(--dsw-alias-border-l2);box-shadow:var(--dsw-shadow-lv1);box-sizing:border-box;border-radius:10px;flex-direction:column;gap:10px;width:100%;min-width:0;padding:12px 14px;display:flex;overflow:hidden}.o55MTq_vizHead{justify-content:space-between;align-items:center;font-size:12px;display:flex}.o55MTq_vizTitle{color:var(--dsw-alias-label-primary);font-weight:700}.o55MTq_vizSub{color:var(--dsw-alias-label-secondary);font-size:10px}.o55MTq_donutWrap{box-sizing:border-box;flex-direction:row;align-items:center;gap:20px;width:100%;display:flex}@media (width<=480px){.o55MTq_donutWrap{flex-direction:column;align-items:center}}.o55MTq_donutSvgBox{width:140px;height:140px;position:relative}.o55MTq_donutSvg{width:100%;height:100%}.o55MTq_donutCenterText{text-align:center;pointer-events:none;flex-direction:column;justify-content:center;align-items:center;width:68px;display:flex;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.o55MTq_donutCenterNum{color:var(--dsw-alias-label-primary);font-variant-numeric:tabular-nums;font-size:17px;font-weight:800;line-height:1.1}.o55MTq_donutCenterSub{color:var(--dsw-alias-label-tertiary);white-space:nowrap;margin-top:2px;font-size:10px;font-weight:500;line-height:1}.o55MTq_donutLegendList{flex-direction:column;flex:1;gap:3px;width:100%;min-width:0;display:flex}.o55MTq_donutLegendRow{cursor:pointer;border-radius:4px;justify-content:space-between;align-items:center;min-width:0;padding:3px 6px;font-size:11px;transition:background .12s;display:flex}.o55MTq_donutLegendRow:hover,.o55MTq_donutLegendRowActive{background:var(--dsw-alias-bg-layer-2)}.o55MTq_dlLeft{flex:1;align-items:center;gap:6px;min-width:0;margin-right:8px;display:flex}.o55MTq_dlDot{border-radius:2px;flex-shrink:0;width:8px;height:8px}.o55MTq_dlName{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);min-width:0;overflow:hidden}.o55MTq_dlRight{font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-secondary);white-space:nowrap;flex-shrink:0;font-weight:600}.o55MTq_donutInspectBar{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:6px;align-items:center;gap:8px;min-width:0;margin-top:2px;padding:6px 10px;font-size:11px;display:flex}.o55MTq_donutInspectName{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;font-weight:600;overflow:hidden}.o55MTq_donutInspectTag{color:var(--dsw-static-deepseek-450,#5686fe);background:#5686fe1f;border-radius:3px;flex-shrink:0;padding:1px 5px;font-size:9px;font-weight:600;line-height:1.2}.o55MTq_donutInspectVal{font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-secondary);white-space:nowrap;flex-shrink:0;font-size:11px;font-weight:600}.o55MTq_dayStack{align-items:stretch;gap:3px;min-width:0;height:160px;display:flex}.o55MTq_dayStackWeek{justify-content:center;gap:12px}.o55MTq_dayStackWeek .o55MTq_dayCol{max-width:48px}.o55MTq_dayCol{flex-direction:column;flex:1 1 0;align-items:stretch;gap:4px;min-width:0;display:flex}.o55MTq_dayColFill{background:var(--dsw-alias-bg-layer-2);border-radius:4px;flex-direction:column-reverse;flex:1;justify-content:flex-start;min-height:0;transition:filter .12s;display:flex;overflow:hidden}.o55MTq_dayColFill:hover{filter:brightness(1.1)}.o55MTq_daySeg{flex:none;width:100%;min-height:0}.o55MTq_dayEmptyDot{background:var(--dsw-alias-border-l2);border-radius:2px;width:100%;height:3px;margin-top:auto}.o55MTq_dayLabel{color:var(--dsw-alias-label-tertiary);text-align:center;white-space:nowrap;font-size:10px;line-height:1;overflow:hidden}.o55MTq_chartAreaBox{width:100%;height:180px;position:relative}.o55MTq_chartSvg{width:100%;height:100%;overflow:visible}.o55MTq_chartAxisLabel{fill:var(--dsw-alias-label-tertiary);font-size:9px}.o55MTq_chartGridLine{stroke:var(--dsw-alias-border-l2);stroke-dasharray:2 3}.o55MTq_chartFoot{color:var(--dsw-alias-label-tertiary);border-top:1px solid var(--dsw-alias-border-l2);padding-top:6px;font-size:10px}.o55MTq_tableTitleGroup{flex-direction:column;gap:2px;min-width:0;display:flex}.o55MTq_tableSortGroup{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:6px;flex-shrink:0;gap:2px;padding:2px;display:flex}.o55MTq_sortBtn{color:var(--dsw-alias-label-tertiary);cursor:pointer;white-space:nowrap;background:0 0;border:none;border-radius:4px;padding:2px 7px;font-size:10px;line-height:16px;transition:all .12s}.o55MTq_sortBtn:hover{color:var(--dsw-alias-label-primary)}.o55MTq_sortBtn[data-active]{background:var(--dsw-specific-menu);color:var(--dsw-alias-label-primary);box-shadow:var(--dsw-shadow-lv1);font-weight:600}.o55MTq_sessionTableBox{box-sizing:border-box;flex-direction:column;gap:4px;width:100%;display:flex}.o55MTq_sessionTableHeader{color:var(--dsw-alias-label-tertiary);border-bottom:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);box-sizing:border-box;border-radius:6px;grid-template-columns:minmax(0,1.2fr) minmax(0,1.3fr) minmax(0,1fr) minmax(0,.7fr) minmax(0,.7fr) 14px;align-items:center;gap:6px;padding:6px 10px;font-size:10px;font-weight:600;display:grid}.o55MTq_sessionItemRow{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);border-radius:6px;transition:border-color .12s;overflow:hidden}.o55MTq_sessionItemRow:hover{border-color:var(--dsw-alias-border-l3)}.o55MTq_tableRankNum{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;margin-right:4px;font-size:10px}.o55MTq_sessionItemHead{width:100%;color:inherit;text-align:left;cursor:pointer;font-variant-numeric:tabular-nums;box-sizing:border-box;background:0 0;border:0;grid-template-columns:minmax(0,1.2fr) minmax(0,1.3fr) minmax(0,1fr) minmax(0,.7fr) minmax(0,.7fr) 14px;align-items:center;gap:6px;padding:8px 10px;font-size:11px;display:grid}.o55MTq_sessionTokenCell{flex-direction:column;align-items:flex-end;gap:2px;min-width:0;display:flex}.o55MTq_sessionTokenBar{background:var(--dsw-static-deepseek-450,#5686fe);border-radius:1px;max-width:100%;height:2px}.o55MTq_sessionModelCell{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.o55MTq_statusOk{color:var(--dsw-static-green-500,#10b981)}.o55MTq_statusWarn{color:#b45309}.o55MTq_statusBad{color:var(--dsw-alias-state-error-primary,#ef4444);font-weight:600}.o55MTq_sessionIdTag{color:var(--dsw-alias-label-primary);font-family:ui-monospace,monospace;font-size:11px;font-weight:600}.o55MTq_arrowIcon{color:var(--dsw-alias-label-tertiary);transition:transform .12s}.o55MTq_sessionItemOpen .o55MTq_arrowIcon{transform:rotate(90deg)}.o55MTq_sessionItemDrawer{background:var(--dsw-specific-menu);border-top:1px dashed var(--dsw-alias-border-l2);padding:10px 12px;font-size:11px}.o55MTq_drawerTitle{color:var(--dsw-alias-label-primary);margin-bottom:6px;font-weight:600}.o55MTq_drawerBarTrack{background:var(--dsw-alias-bg-layer-2);border-radius:4px;gap:1px;height:8px;margin-bottom:6px;display:flex;overflow:hidden}.o55MTq_drawerSliceModel{background:var(--dsw-static-deepseek-450,#5686fe);height:100%}.o55MTq_drawerSliceTool{background:var(--dsw-static-green-500,#10b981);height:100%}.o55MTq_drawerMetaRow{color:var(--dsw-alias-label-secondary);flex-wrap:wrap;justify-content:space-between;gap:6px;font-size:10px;display:flex}.o55MTq_settingsDrawer{border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-tertiary);background:var(--dsw-specific-menu);border-radius:8px;padding:8px 12px;font-size:11px}.o55MTq_settingsSummary{cursor:pointer;color:var(--dsw-alias-label-secondary);font-weight:500}.o55MTq_settingsDrawerContent{flex-wrap:wrap;align-items:center;gap:14px;padding-top:10px;display:flex}.o55MTq_settingInlineItem{align-items:center;gap:6px;display:flex}.o55MTq_settingsMiniInput{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);width:50px;color:var(--dsw-alias-label-primary);text-align:right;border-radius:4px;outline:none;padding:3px 6px;font-size:11px}.o55MTq_settingsMiniSaveBtn{background:var(--dsw-static-deepseek-450,#5686fe);color:#fff;cursor:pointer;border:none;border-radius:4px;padding:3px 10px;font-size:11px}.o55MTq_emptyScan{text-align:center;color:var(--dsw-alias-label-tertiary);padding:20px;font-size:12px}.o55MTq_chartLegend{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:6px;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:8px;padding:5px 8px;display:flex}.o55MTq_chartLegendItem{color:var(--dsw-alias-label-secondary);align-items:center;gap:5px;min-width:0;font-size:11px;display:flex}.o55MTq_chartLegendDot{border-radius:50%;flex-shrink:0;width:7px;height:7px}.o55MTq_chartLegendName{text-overflow:ellipsis;white-space:nowrap;max-width:130px;color:var(--dsw-alias-label-primary);font-weight:500;overflow:hidden}.o55MTq_chartLegendVal{font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-secondary);font-size:10px;font-weight:600}.o55MTq_chartInteractiveWrap{width:100%;position:relative}.o55MTq_dayBarTopLabel{font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-secondary);text-align:center;white-space:nowrap;text-overflow:ellipsis;min-height:14px;font-size:9px;font-weight:600;line-height:14px;overflow:hidden}.o55MTq_dayColFillActive{box-shadow:0 0 0 2px var(--dsw-static-deepseek-450,#5686fe);filter:brightness(1.2)!important}.o55MTq_dayLabelToday{font-weight:700;color:var(--dsw-static-deepseek-450,#5686fe)!important}.o55MTq_chartTooltipBox{z-index:50;pointer-events:none;background:var(--dsw-specific-menu);border:1px solid var(--dsw-alias-border-l1);backdrop-filter:blur(8px);border-radius:8px;min-width:150px;max-width:260px;padding:8px 10px;transition:opacity .12s,transform .12s;position:absolute;box-shadow:0 6px 20px #00000047}.o55MTq_chartTooltipBox.o55MTq_chartTooltipPortal{z-index:1200;visibility:hidden;position:fixed;top:0;left:0}.o55MTq_chartTooltipDate{color:var(--dsw-alias-label-primary);justify-content:space-between;align-items:center;gap:6px;margin-bottom:4px;font-size:11px;font-weight:700;display:flex}.o55MTq_chartTooltipDateBadge{color:var(--dsw-static-deepseek-450,#5686fe);background:#5686fe26;border-radius:3px;flex-shrink:0;padding:1px 5px;font-size:9px;font-weight:600}.o55MTq_chartTooltipTotal{color:var(--dsw-alias-label-primary);font-variant-numeric:tabular-nums;align-items:baseline;gap:5px;margin-bottom:4px;font-size:13px;font-weight:800;display:flex}.o55MTq_chartTooltipSessions{color:var(--dsw-alias-label-tertiary);font-size:10px;font-weight:500}.o55MTq_chartTooltipDivider{background:var(--dsw-alias-border-l2);height:1px;margin:5px 0}.o55MTq_chartTooltipModelList{flex-direction:column;gap:3px;display:flex}.o55MTq_chartTooltipModelRow{justify-content:space-between;align-items:center;gap:8px;font-size:10px;display:flex}.o55MTq_chartTooltipModelLeft{flex:1;align-items:center;gap:5px;min-width:0;display:flex}.o55MTq_chartTooltipModelDot{border-radius:50%;flex-shrink:0;width:6px;height:6px}.o55MTq_chartTooltipModelName{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-secondary);overflow:hidden}.o55MTq_chartTooltipModelRight{font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-primary);white-space:nowrap;flex-shrink:0;font-weight:600}.o55MTq_lineChartWrap{user-select:none;width:100%;min-width:0;height:170px;position:relative}.o55MTq_lineChartSvg{width:100%;height:100%;display:block;overflow:visible}.o55MTq_lineGrid{stroke:var(--dsw-alias-border-l2);stroke-dasharray:2 3}.o55MTq_lineAxisText{fill:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;font-size:9px}.o55MTq_lineCursor{stroke:var(--dsw-static-deepseek-450,#5686fe);stroke-dasharray:3 3;stroke-width:1.5px;pointer-events:none}.o55MTq_lineActiveOuter{fill:#5686fe40;pointer-events:none;animation:1.5s ease-in-out infinite o55MTq_linePulse}@keyframes o55MTq_linePulse{0%,to{opacity:.8;transform:scale(1)}50%{opacity:.4;transform:scale(1.3)}}.o55MTq_lineActiveInner{fill:var(--dsw-static-deepseek-450,#5686fe);stroke:#fff;stroke-width:1.5px;pointer-events:none}.o55MTq_viewSwitchGroup{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:5px;gap:2px;padding:2px;display:flex}.o55MTq_viewSwitchBtn{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:3px;padding:2px 7px;font-size:10px;font-weight:600;transition:all .12s}.o55MTq_viewSwitchBtn[data-active]{background:var(--dsw-specific-menu);color:var(--dsw-alias-label-primary);box-shadow:var(--dsw-shadow-lv1)}.o55MTq_heatmapPanel{background:var(--dsw-specific-menu);border:1px solid var(--dsw-alias-border-l2);box-shadow:var(--dsw-shadow-lv1);box-sizing:border-box;border-radius:10px;flex-direction:column;gap:10px;width:100%;min-width:0;margin-top:12px;padding:14px 16px;display:flex}.o55MTq_heatmapHead{flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:8px;display:flex}.o55MTq_heatmapTitleGroup{flex-direction:column;gap:2px;display:flex}.o55MTq_heatmapTitle{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:700}.o55MTq_heatmapSub{color:var(--dsw-alias-label-secondary);font-size:11px}.o55MTq_heatmapStatsRow{color:var(--dsw-alias-label-secondary);flex-wrap:wrap;gap:14px;font-size:11px;display:flex}.o55MTq_heatmapStatsRow strong{color:var(--dsw-alias-label-primary);font-variant-numeric:tabular-nums;font-weight:700}.o55MTq_heatmapScrollArea{box-sizing:border-box;width:100%;padding:8px 4px 14px;overflow:auto visible}.o55MTq_heatmapContainer{flex-direction:column;gap:6px;width:max-content;display:flex;position:relative}.o55MTq_heatmapMonthsRow{height:16px;margin-left:32px;display:block;position:relative}.o55MTq_heatmapMonthLabel{color:var(--dsw-alias-label-tertiary);white-space:nowrap;font-size:10px;font-weight:600;position:absolute}.o55MTq_heatmapGrid{gap:8px;display:flex}.o55MTq_heatmapWeekdaysCol{width:24px;height:109px;color:var(--dsw-alias-label-tertiary);user-select:none;flex-direction:column;flex-shrink:0;justify-content:space-between;padding:0;font-size:9px;display:flex}.o55MTq_heatmapWeeksRow{gap:3px;display:flex}.o55MTq_heatmapWeekCol{flex-direction:column;gap:3px;display:flex}.o55MTq_heatmapCell{box-sizing:border-box;cursor:pointer;border-radius:2px;width:13px;height:13px;transition:outline .1s,box-shadow .1s,filter .1s;position:relative}.o55MTq_heatmapCellToday{outline-offset:1px;z-index:5;outline:1.5px solid var(--dsw-static-deepseek-450,#5686fe)!important}.o55MTq_heatmapCell[data-level=\"0\"]{background:var(--dsw-alias-bg-layer-2,#ffffff09);border:1px solid var(--dsw-alias-border-l2,#ffffff14)}.o55MTq_heatmapCell[data-level=\"1\"]{background:#5686fe38;border:1px solid #5686fe59}.o55MTq_heatmapCell[data-level=\"2\"]{background:#5686fe73;border:1px solid #5686fe99}.o55MTq_heatmapCell[data-level=\"3\"]{background:#5686feb8;border:1px solid #5686fee0;box-shadow:0 0 6px #5686fe40}.o55MTq_heatmapCell[data-level=\"4\"]{background:var(--dsw-static-deepseek-450,#5686fe);border:1px solid #9bb8ff;box-shadow:0 0 10px #5686fe8c}.o55MTq_heatmapCell[data-future=true]{opacity:.28;cursor:default;background:0 0!important;border:1px dashed #ffffff26!important}.o55MTq_heatmapCell:hover:not([data-future=true]),.o55MTq_heatmapCellActive{outline-offset:1px;filter:brightness(1.25);z-index:10;transform:none;outline:2px solid #fff!important;box-shadow:0 0 12px #5686fed9!important}.o55MTq_heatmapLiveHud{color:var(--dsw-alias-label-primary);background:#5686fe1f;border:1px solid #5686fe47;border-radius:6px;align-items:center;gap:8px;padding:3px 8px;font-size:11px;display:flex}.o55MTq_heatmapLiveDate{color:var(--dsw-static-deepseek-450,#5686fe);font-weight:700}.o55MTq_heatmapLiveTokens{font-variant-numeric:tabular-nums;font-weight:700}.o55MTq_heatmapLiveModel{color:var(--dsw-alias-label-secondary);font-size:10px}.o55MTq_heatmapFoot{color:var(--dsw-alias-label-tertiary);border-top:1px solid var(--dsw-alias-border-l2);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;margin-top:4px;padding-top:8px;font-size:10px;display:flex}.o55MTq_heatmapLegend{color:var(--dsw-alias-label-tertiary);align-items:center;gap:4px;font-size:10px;display:flex}.o55MTq_heatmapLegendCell{border-radius:2px;width:10px;height:10px}";
|
|
3194
|
+
const css$1 = ".o55MTq_hudBox{box-sizing:border-box;border-bottom:1px solid var(--dsw-alias-border-l2);background:var(--dsw-specific-menu);width:100%;font-family:var(--dsw-font-family);flex:none}.o55MTq_hudTop{background:var(--dsw-alias-bg-layer-2);border-bottom:1px solid var(--dsw-alias-border-l2);flex-wrap:nowrap;justify-content:space-between;align-items:center;gap:12px;padding:8px 14px;display:flex}.o55MTq_hudTopLeft{flex-wrap:nowrap;align-items:center;gap:8px;min-width:0;display:flex}.o55MTq_hudHeading{color:var(--dsw-alias-label-secondary);white-space:nowrap;font-size:11px;font-weight:600}.o55MTq_currentModelTag{background:var(--dsw-alias-interactive-bg-hover);white-space:nowrap;border-radius:4px;flex-shrink:1;align-items:center;gap:5px;min-width:0;max-width:100%;padding:1px 6px;font-size:11px;display:inline-flex}.o55MTq_modelTagText{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;min-width:0;font-weight:600;overflow:hidden}.o55MTq_effortTag{color:var(--dsw-static-deepseek-450,#5686fe);white-space:nowrap;background:#5686fe1f;border-radius:3px;flex-shrink:0;padding:0 5px;font-size:10px;font-weight:600;line-height:14px}.o55MTq_contextTag{color:var(--dsw-alias-label-secondary,#5f636d);background:var(--dsw-alias-bg-layer-1,#fff);border:1px solid var(--dsw-alias-border-l2,#e2e8f0);font-variant-numeric:tabular-nums;white-space:nowrap;border-radius:4px;flex-shrink:0;padding:1px 7px;font-size:11px}.o55MTq_hudTopRight{flex-shrink:0;align-items:center;gap:10px;display:flex}.o55MTq_tokenStat{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;white-space:nowrap;font-size:11px}.o55MTq_tokenStat strong{color:var(--dsw-alias-label-primary)}.o55MTq_costStat{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;white-space:nowrap;font-size:11px}.o55MTq_costStat strong{color:var(--dsw-alias-label-primary)}.o55MTq_scopeGroup{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);border-radius:5px;gap:1px;padding:1px;display:inline-flex}.o55MTq_scopeBtn{color:var(--dsw-alias-label-tertiary);cursor:pointer;white-space:nowrap;background:0 0;border:0;border-radius:3px;padding:2px 7px;font-size:11px;line-height:14px;transition:all .12s}.o55MTq_scopeBtn[data-active]{background:var(--dsw-specific-menu);color:var(--dsw-alias-label-primary);box-shadow:var(--dsw-shadow-lv1);font-weight:600}.o55MTq_modelTabBar{background:var(--dsw-alias-bg-layer-1);border-bottom:1px solid var(--dsw-alias-border-l2);gap:4px;padding:6px 14px;display:flex;overflow-x:auto}.o55MTq_modelTabBtn{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-specific-menu);color:var(--dsw-alias-label-secondary);cursor:pointer;white-space:nowrap;border-radius:4px;padding:2px 8px;font-size:11px;transition:all .12s}.o55MTq_modelTabBtn[data-active]{background:var(--dsw-static-deepseek-450,#5686fe);color:#fff;border-color:var(--dsw-static-deepseek-450,#5686fe);font-weight:600}.o55MTq_hudBody{padding:10px 14px}.o55MTq_alertSection{flex-direction:column;gap:6px;margin-top:8px;display:flex}.o55MTq_alertCard{border-radius:6px;justify-content:space-between;align-items:center;gap:8px;padding:8px 10px;display:flex}.o55MTq_alertCardDanger{background:#e5484d14;border:1px solid #e5484d40}.o55MTq_alertCardWarn{background:#f59e0b14;border:1px solid #f59e0b40}.o55MTq_alertLeft{align-items:center;gap:8px;min-width:0;display:flex}.o55MTq_alertTag{color:#fff;border-radius:3px;flex:none;padding:1px 5px;font-size:10px;font-weight:600}.o55MTq_tagDanger{background:var(--dsw-alias-state-error-primary,#e5484d)}.o55MTq_tagWarn{background:#f59e0b}.o55MTq_alertTexts{flex-direction:column;min-width:0;display:flex}.o55MTq_alertMainText{color:var(--dsw-alias-label-primary);font-size:12px;font-weight:600}.o55MTq_alertSubText{color:var(--dsw-alias-label-secondary);font-size:11px}.o55MTq_alertActionBtn{color:var(--dsw-static-deepseek-450,#5686fe);cursor:pointer;white-space:nowrap;background:0 0;border:none;padding:2px 6px;font-size:11px;font-weight:600}.o55MTq_settingsContainer{width:100%;min-width:0;max-width:100%;color:var(--dsw-alias-label-primary);box-sizing:border-box;flex-direction:column;gap:14px;padding:0 0 24px;display:flex;overflow-x:hidden}.o55MTq_cockpitHeader{flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:10px;display:flex}.o55MTq_cockpitTitleArea h2{color:var(--dsw-alias-label-primary);letter-spacing:-.3px;margin:0;font-size:17px;font-weight:700}.o55MTq_cockpitSubTitle{color:var(--dsw-alias-label-tertiary);margin:3px 0 0;font-size:12px}.o55MTq_headerRightControls{align-items:center;gap:8px;display:flex}.o55MTq_rangeSwitchGroup{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:6px;padding:2px;display:flex}.o55MTq_rangeBtn{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;padding:3px 10px;font-size:11px;font-weight:600;transition:all .12s}.o55MTq_rangeBtn[data-active]{background:var(--dsw-specific-menu);color:var(--dsw-alias-label-primary);box-shadow:var(--dsw-shadow-lv1)}.o55MTq_settingsScanBtn{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;padding:4px 10px;font-size:11px;font-weight:500;transition:all .12s}.o55MTq_heroStatsRow{border-bottom:1px solid var(--dsw-alias-border-l2);flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:10px;padding-bottom:10px;display:flex}.o55MTq_heroPair{flex-wrap:wrap;align-items:flex-start;gap:40px;min-width:0;display:flex}.o55MTq_heroMetric{flex-direction:column;align-items:flex-start;gap:2px;min-width:0;display:flex}.o55MTq_heroCaption{color:var(--dsw-alias-label-secondary);font-size:11px;font-weight:600;line-height:1.2}.o55MTq_heroValue{letter-spacing:-.5px;color:var(--dsw-alias-label-primary);font-variant-numeric:tabular-nums;font-size:26px;font-weight:800;line-height:1.15}.o55MTq_heroFootnote{color:var(--dsw-alias-label-tertiary);font-size:10px;line-height:1.3}.o55MTq_heroMetaCol{color:var(--dsw-alias-label-secondary);white-space:nowrap;flex-wrap:nowrap;gap:14px;font-size:12px;display:flex}.o55MTq_heroMetaCol strong{color:var(--dsw-alias-label-primary)}.o55MTq_roastGrid{box-sizing:border-box;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%;display:grid}@media (width<=440px){.o55MTq_roastGrid{grid-template-columns:1fr}}.o55MTq_roastItem{background:var(--dsw-specific-menu);border:1px solid var(--dsw-alias-border-l2);min-height:136px;box-shadow:var(--dsw-shadow-lv1);cursor:pointer;user-select:none;box-sizing:border-box;border-radius:8px;flex-direction:column;justify-content:space-between;padding:12px 14px;transition:all .12s;display:flex}.o55MTq_roastItem:hover{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-border-l3);transform:translateY(-1px)}.o55MTq_roastItemActive{background:var(--dsw-alias-bg-layer-2);box-shadow:0 0 0 1px var(--dsw-static-deepseek-450,#5686fe);border-color:var(--dsw-static-deepseek-450,#5686fe)!important}.o55MTq_roastHead{justify-content:space-between;align-items:center;margin-bottom:4px;display:flex}.o55MTq_roastTag{letter-spacing:.3px;font-size:11px;font-weight:700}.o55MTq_roastCategoryBadge{color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1,#0000000f);border-radius:3px;padding:1px 4px;font-size:9px;line-height:1.2}.o55MTq_roastTitle{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:700;line-height:18px;overflow:hidden}.o55MTq_roastDesc{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;margin-top:2px;font-size:10px;line-height:15px;overflow:hidden}.o55MTq_roastVal{font-variant-numeric:tabular-nums;text-overflow:ellipsis;white-space:nowrap;margin-top:6px;font-size:12px;font-weight:700;overflow:hidden}.o55MTq_roastFooter{border-top:1px dashed var(--dsw-alias-border-l2);color:var(--dsw-alias-label-tertiary);justify-content:space-between;align-items:center;margin-top:10px;padding-top:8px;font-size:10px;line-height:1;display:flex}.o55MTq_roastFooterLeft{text-overflow:ellipsis;white-space:nowrap;max-width:110px;overflow:hidden}.o55MTq_roastAction{color:var(--dsw-alias-label-secondary);flex-shrink:0;font-weight:600;transition:color .12s}.o55MTq_roastItem:hover .o55MTq_roastAction,.o55MTq_roastItemActive .o55MTq_roastAction{color:var(--dsw-static-deepseek-450,#5686fe)}.o55MTq_drilldownPanel{background:var(--dsw-specific-menu);border:1px solid var(--dsw-static-deepseek-450,#5686fe);box-shadow:var(--dsw-shadow-lv2,0 4px 12px #00000014);border-radius:10px;flex-direction:column;gap:12px;min-width:0;padding:14px 16px;animation:.15s ease-out o55MTq_slideDown;display:flex}@keyframes o55MTq_slideDown{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.o55MTq_drilldownHead{border-bottom:1px solid var(--dsw-alias-border-l2);justify-content:space-between;align-items:center;gap:12px;min-width:0;padding-bottom:8px;display:flex}.o55MTq_drilldownTitleGroup{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.o55MTq_drilldownTitle{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:700;overflow:hidden}.o55MTq_drilldownSub{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:11px;overflow:hidden}.o55MTq_drilldownCloseBtn{border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border-radius:4px;flex-shrink:0;padding:3px 8px;font-size:11px;transition:all .12s}.o55MTq_drilldownCloseBtn:hover{background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-border-l3)}.o55MTq_drilldownEmpty{text-align:center;color:var(--dsw-alias-label-tertiary);padding:16px;font-size:12px}.o55MTq_rankList{flex-direction:column;gap:8px;display:flex}.o55MTq_rankItem{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1,#0000000f);border-radius:6px;flex-direction:column;gap:6px;min-width:0;padding:8px 12px;display:flex}.o55MTq_rankItemTop{justify-content:space-between;align-items:center;gap:8px;min-width:0;display:flex}.o55MTq_rankItemLeft{flex:1;align-items:center;gap:8px;min-width:0;display:flex}.o55MTq_rankBadge{color:var(--dsw-alias-label-secondary);background:var(--dsw-specific-menu);border:1px solid var(--dsw-alias-border-l2);font-variant-numeric:tabular-nums;border-radius:3px;flex-shrink:0;padding:1px 5px;font-size:10px;font-weight:700;line-height:1.2}.o55MTq_rankBadgeGold{color:#d97706;background:#f59e0b1f;border-color:#f59e0b66}.o55MTq_rankName{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:600;overflow:hidden}.o55MTq_rankValMain{color:var(--dsw-alias-label-primary);font-variant-numeric:tabular-nums;white-space:nowrap;flex-shrink:0;font-size:12px;font-weight:700}.o55MTq_rankTrack{background:var(--dsw-specific-menu);border-radius:3px;width:100%;height:6px;overflow:hidden}.o55MTq_rankBar{border-radius:3px;height:100%;transition:width .2s}.o55MTq_rankSubText{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;justify-content:space-between;align-items:center;gap:8px;font-size:10px;line-height:1.2;display:flex;overflow:hidden}.o55MTq_rankSubText strong{color:var(--dsw-alias-label-primary)}.o55MTq_toolDrillSection{flex-direction:column;gap:12px;min-width:0;display:flex}.o55MTq_toolCompoundBox{flex-direction:column;gap:6px;display:flex}.o55MTq_toolCompoundTrack{background:var(--dsw-alias-bg-layer-2);border-radius:4px;gap:1px;height:10px;display:flex;overflow:hidden}.o55MTq_toolSliceBash{background:var(--dsw-static-green-500,#10b981);height:100%}.o55MTq_toolSliceFile{background:#0ea5e9;height:100%}.o55MTq_toolCompoundLegend{color:var(--dsw-alias-label-secondary);flex-wrap:wrap;gap:16px;font-size:11px;display:flex}.o55MTq_toolCompoundLegend span{align-items:center;gap:6px;display:flex}.o55MTq_toolCompoundLegend strong{color:var(--dsw-alias-label-primary)}.o55MTq_toolGridCards{grid-template-columns:1fr 1fr;gap:10px;display:grid}@media (width<=600px){.o55MTq_toolGridCards{grid-template-columns:1fr}}.o55MTq_toolMiniCard{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:6px;flex-direction:column;gap:4px;min-width:0;padding:10px 12px;display:flex}.o55MTq_toolMiniTitle{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;align-items:center;gap:6px;font-size:11px;font-weight:600;display:flex;overflow:hidden}.o55MTq_toolMiniNum{color:var(--dsw-alias-label-primary);font-variant-numeric:tabular-nums;margin:2px 0;font-size:15px;font-weight:700}.o55MTq_toolMiniDesc{color:var(--dsw-alias-label-tertiary);font-size:10px;line-height:14px}.o55MTq_toolTopList{border-top:1px dashed var(--dsw-alias-border-l2);flex-direction:column;gap:6px;padding-top:8px;display:flex}.o55MTq_toolTopListTitle{color:var(--dsw-alias-label-secondary);margin-bottom:2px;font-size:11px;font-weight:600}.o55MTq_errorDrillSection{flex-direction:column;gap:8px;display:flex}.o55MTq_errorAllGoodBox{color:var(--dsw-static-green-500,#10b981);text-align:center;background:#10b98114;border:1px solid #10b9814d;border-radius:6px;padding:16px;font-size:12px;font-weight:600}.o55MTq_errorSessionList{flex-direction:column;gap:6px;display:flex}.o55MTq_errorSessionRow{background:var(--dsw-alias-bg-layer-2);font-variant-numeric:tabular-nums;border-radius:4px;grid-template-columns:28px 110px 1fr 75px 75px;align-items:center;gap:8px;min-width:0;padding:6px 10px;font-size:11px;display:grid}.o55MTq_vizSplitGrid{box-sizing:border-box;grid-template-columns:1fr;gap:12px;width:100%;display:grid}.o55MTq_vizPanel{background:var(--dsw-specific-menu);border:1px solid var(--dsw-alias-border-l2);box-shadow:var(--dsw-shadow-lv1);box-sizing:border-box;border-radius:10px;flex-direction:column;gap:10px;width:100%;min-width:0;padding:12px 14px;display:flex;overflow:hidden}.o55MTq_vizHead{justify-content:space-between;align-items:center;font-size:12px;display:flex}.o55MTq_vizTitle{color:var(--dsw-alias-label-primary);font-weight:700}.o55MTq_vizSub{color:var(--dsw-alias-label-secondary);font-size:10px}.o55MTq_donutWrap{box-sizing:border-box;flex-direction:row;align-items:center;gap:20px;width:100%;display:flex}@media (width<=480px){.o55MTq_donutWrap{flex-direction:column;align-items:center}}.o55MTq_donutSvgBox{width:140px;height:140px;position:relative}.o55MTq_donutSvg{width:100%;height:100%}.o55MTq_donutCenterText{text-align:center;pointer-events:none;flex-direction:column;justify-content:center;align-items:center;width:68px;display:flex;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.o55MTq_donutCenterNum{color:var(--dsw-alias-label-primary);font-variant-numeric:tabular-nums;font-size:17px;font-weight:800;line-height:1.1}.o55MTq_donutCenterSub{color:var(--dsw-alias-label-tertiary);white-space:nowrap;margin-top:2px;font-size:10px;font-weight:500;line-height:1}.o55MTq_donutLegendList{flex-direction:column;flex:1;gap:3px;width:100%;min-width:0;display:flex}.o55MTq_donutLegendRow{cursor:pointer;border-radius:4px;justify-content:space-between;align-items:center;min-width:0;padding:3px 6px;font-size:11px;transition:background .12s;display:flex}.o55MTq_donutLegendRow:hover,.o55MTq_donutLegendRowActive{background:var(--dsw-alias-bg-layer-2)}.o55MTq_dlLeft{flex:1;align-items:center;gap:6px;min-width:0;margin-right:8px;display:flex}.o55MTq_dlDot{border-radius:2px;flex-shrink:0;width:8px;height:8px}.o55MTq_dlName{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);min-width:0;overflow:hidden}.o55MTq_dlRight{font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-secondary);white-space:nowrap;flex-shrink:0;font-weight:600}.o55MTq_donutInspectBar{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:6px;align-items:center;gap:8px;min-width:0;margin-top:2px;padding:6px 10px;font-size:11px;display:flex}.o55MTq_donutInspectName{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;font-weight:600;overflow:hidden}.o55MTq_donutInspectTag{color:var(--dsw-static-deepseek-450,#5686fe);background:#5686fe1f;border-radius:3px;flex-shrink:0;padding:1px 5px;font-size:9px;font-weight:600;line-height:1.2}.o55MTq_donutInspectVal{font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-secondary);white-space:nowrap;flex-shrink:0;font-size:11px;font-weight:600}.o55MTq_dayStack{align-items:stretch;gap:3px;min-width:0;height:160px;display:flex}.o55MTq_dayStackWeek{justify-content:center;gap:12px}.o55MTq_dayStackWeek .o55MTq_dayCol{max-width:48px}.o55MTq_dayCol{flex-direction:column;flex:1 1 0;align-items:stretch;gap:4px;min-width:0;display:flex}.o55MTq_dayColFill{background:var(--dsw-alias-bg-layer-2);border-radius:4px;flex-direction:column-reverse;flex:1;justify-content:flex-start;min-height:0;transition:filter .12s;display:flex;overflow:hidden}.o55MTq_dayColFill:hover{filter:brightness(1.1)}.o55MTq_daySeg{flex:none;width:100%;min-height:0}.o55MTq_dayEmptyDot{background:var(--dsw-alias-border-l2);border-radius:2px;width:100%;height:3px;margin-top:auto}.o55MTq_dayLabel{color:var(--dsw-alias-label-tertiary);text-align:center;white-space:nowrap;font-size:10px;line-height:1;overflow:hidden}.o55MTq_chartAreaBox{width:100%;height:180px;position:relative}.o55MTq_chartSvg{width:100%;height:100%;overflow:visible}.o55MTq_chartAxisLabel{fill:var(--dsw-alias-label-tertiary);font-size:9px}.o55MTq_chartGridLine{stroke:var(--dsw-alias-border-l2);stroke-dasharray:2 3}.o55MTq_chartFoot{color:var(--dsw-alias-label-tertiary);border-top:1px solid var(--dsw-alias-border-l2);padding-top:6px;font-size:10px}.o55MTq_tableTitleGroup{flex-direction:column;gap:2px;min-width:0;display:flex}.o55MTq_tableSortGroup{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:6px;flex-shrink:0;gap:2px;padding:2px;display:flex}.o55MTq_sortBtn{color:var(--dsw-alias-label-tertiary);cursor:pointer;white-space:nowrap;background:0 0;border:none;border-radius:4px;padding:2px 7px;font-size:10px;line-height:16px;transition:all .12s}.o55MTq_sortBtn:hover{color:var(--dsw-alias-label-primary)}.o55MTq_sortBtn[data-active]{background:var(--dsw-specific-menu);color:var(--dsw-alias-label-primary);box-shadow:var(--dsw-shadow-lv1);font-weight:600}.o55MTq_sessionTableBox{box-sizing:border-box;flex-direction:column;gap:4px;width:100%;display:flex}.o55MTq_sessionTableHeader{color:var(--dsw-alias-label-tertiary);border-bottom:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);box-sizing:border-box;border-radius:6px;grid-template-columns:minmax(0,1.2fr) minmax(0,1.3fr) minmax(0,1fr) minmax(0,.7fr) minmax(0,.7fr) 14px;align-items:center;gap:6px;padding:6px 10px;font-size:10px;font-weight:600;display:grid}.o55MTq_sessionItemRow{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);border-radius:6px;transition:border-color .12s;overflow:hidden}.o55MTq_sessionItemRow:hover{border-color:var(--dsw-alias-border-l3)}.o55MTq_tableRankNum{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;margin-right:4px;font-size:10px}.o55MTq_sessionItemHead{width:100%;color:inherit;text-align:left;cursor:pointer;font-variant-numeric:tabular-nums;box-sizing:border-box;background:0 0;border:0;grid-template-columns:minmax(0,1.2fr) minmax(0,1.3fr) minmax(0,1fr) minmax(0,.7fr) minmax(0,.7fr) 14px;align-items:center;gap:6px;padding:8px 10px;font-size:11px;display:grid}.o55MTq_sessionTokenCell{flex-direction:column;align-items:flex-end;gap:2px;min-width:0;display:flex}.o55MTq_sessionTokenBar{background:var(--dsw-static-deepseek-450,#5686fe);border-radius:1px;max-width:100%;height:2px}.o55MTq_sessionModelCell{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.o55MTq_statusOk{color:var(--dsw-static-green-500,#10b981)}.o55MTq_statusWarn{color:#b45309}.o55MTq_statusBad{color:var(--dsw-alias-state-error-primary,#ef4444);font-weight:600}.o55MTq_sessionIdTag{color:var(--dsw-alias-label-primary);font-family:ui-monospace,monospace;font-size:11px;font-weight:600}.o55MTq_arrowIcon{color:var(--dsw-alias-label-tertiary);transition:transform .12s}.o55MTq_sessionItemOpen .o55MTq_arrowIcon{transform:rotate(90deg)}.o55MTq_sessionItemDrawer{background:var(--dsw-specific-menu);border-top:1px dashed var(--dsw-alias-border-l2);padding:10px 12px;font-size:11px}.o55MTq_drawerTitle{color:var(--dsw-alias-label-primary);margin-bottom:6px;font-weight:600}.o55MTq_drawerBarTrack{background:var(--dsw-alias-bg-layer-2);border-radius:4px;gap:1px;height:8px;margin-bottom:6px;display:flex;overflow:hidden}.o55MTq_drawerSliceModel{background:var(--dsw-static-deepseek-450,#5686fe);height:100%}.o55MTq_drawerSliceTool{background:var(--dsw-static-green-500,#10b981);height:100%}.o55MTq_drawerMetaRow{color:var(--dsw-alias-label-secondary);flex-wrap:wrap;justify-content:space-between;gap:6px;font-size:10px;display:flex}.o55MTq_settingsDrawer{border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-tertiary);background:var(--dsw-specific-menu);border-radius:8px;padding:8px 12px;font-size:11px}.o55MTq_settingsSummary{cursor:pointer;color:var(--dsw-alias-label-secondary);font-weight:500}.o55MTq_settingsDrawerContent{flex-wrap:wrap;align-items:center;gap:14px;padding-top:10px;display:flex}.o55MTq_priceOverrideHelp,.o55MTq_priceOverridePath{width:100%;color:var(--dsw-alias-label-secondary);margin:0;font-size:11px;line-height:1.45}.o55MTq_priceOverrideInput{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);width:100%;min-height:120px;color:var(--dsw-alias-label-primary);resize:vertical;border-radius:6px;padding:8px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px}.o55MTq_priceOverrideError{width:100%;color:var(--dsw-alias-state-error-primary,#e5484d);margin:0;font-size:11px}.o55MTq_priceOverrideActions{align-items:center;gap:8px;display:flex}.o55MTq_settingsResetBtn{color:var(--dsw-alias-label-secondary);border:1px solid var(--dsw-alias-border-l2);cursor:pointer;background:0 0;border-radius:4px;padding:3px 10px;font-size:11px}.o55MTq_settingInlineItem{align-items:center;gap:6px;display:flex}.o55MTq_settingsMiniInput{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);width:50px;color:var(--dsw-alias-label-primary);text-align:right;border-radius:4px;outline:none;padding:3px 6px;font-size:11px}.o55MTq_settingsMiniSaveBtn{background:var(--dsw-static-deepseek-450,#5686fe);color:#fff;cursor:pointer;border:none;border-radius:4px;padding:3px 10px;font-size:11px}.o55MTq_emptyScan{text-align:center;color:var(--dsw-alias-label-tertiary);padding:20px;font-size:12px}.o55MTq_chartLegend{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:6px;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:8px;padding:5px 8px;display:flex}.o55MTq_chartLegendItem{color:var(--dsw-alias-label-secondary);align-items:center;gap:5px;min-width:0;font-size:11px;display:flex}.o55MTq_chartLegendDot{border-radius:50%;flex-shrink:0;width:7px;height:7px}.o55MTq_chartLegendName{text-overflow:ellipsis;white-space:nowrap;max-width:130px;color:var(--dsw-alias-label-primary);font-weight:500;overflow:hidden}.o55MTq_chartLegendVal{font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-secondary);font-size:10px;font-weight:600}.o55MTq_chartInteractiveWrap{width:100%;position:relative}.o55MTq_dayBarTopLabel{font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-secondary);text-align:center;white-space:nowrap;text-overflow:ellipsis;min-height:14px;font-size:9px;font-weight:600;line-height:14px;overflow:hidden}.o55MTq_dayColFillActive{box-shadow:0 0 0 2px var(--dsw-static-deepseek-450,#5686fe);filter:brightness(1.2)!important}.o55MTq_dayLabelToday{font-weight:700;color:var(--dsw-static-deepseek-450,#5686fe)!important}.o55MTq_chartTooltipBox{z-index:50;pointer-events:none;background:var(--dsw-specific-menu);border:1px solid var(--dsw-alias-border-l1);backdrop-filter:blur(8px);border-radius:8px;min-width:150px;max-width:260px;padding:8px 10px;transition:opacity .12s,transform .12s;position:absolute;box-shadow:0 6px 20px #00000047}.o55MTq_chartTooltipBox.o55MTq_chartTooltipPortal{z-index:1200;visibility:hidden;position:fixed;top:0;left:0}.o55MTq_chartTooltipDate{color:var(--dsw-alias-label-primary);justify-content:space-between;align-items:center;gap:6px;margin-bottom:4px;font-size:11px;font-weight:700;display:flex}.o55MTq_chartTooltipDateBadge{color:var(--dsw-static-deepseek-450,#5686fe);background:#5686fe26;border-radius:3px;flex-shrink:0;padding:1px 5px;font-size:9px;font-weight:600}.o55MTq_chartTooltipTotal{color:var(--dsw-alias-label-primary);font-variant-numeric:tabular-nums;align-items:baseline;gap:5px;margin-bottom:4px;font-size:13px;font-weight:800;display:flex}.o55MTq_chartTooltipSessions{color:var(--dsw-alias-label-tertiary);font-size:10px;font-weight:500}.o55MTq_chartTooltipDivider{background:var(--dsw-alias-border-l2);height:1px;margin:5px 0}.o55MTq_chartTooltipModelList{flex-direction:column;gap:3px;display:flex}.o55MTq_chartTooltipModelRow{justify-content:space-between;align-items:center;gap:8px;font-size:10px;display:flex}.o55MTq_chartTooltipModelLeft{flex:1;align-items:center;gap:5px;min-width:0;display:flex}.o55MTq_chartTooltipModelDot{border-radius:50%;flex-shrink:0;width:6px;height:6px}.o55MTq_chartTooltipModelName{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-secondary);overflow:hidden}.o55MTq_chartTooltipModelRight{font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-primary);white-space:nowrap;flex-shrink:0;font-weight:600}.o55MTq_lineChartWrap{user-select:none;width:100%;min-width:0;height:170px;position:relative}.o55MTq_lineChartSvg{width:100%;height:100%;display:block;overflow:visible}.o55MTq_lineGrid{stroke:var(--dsw-alias-border-l2);stroke-dasharray:2 3}.o55MTq_lineAxisText{fill:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;font-size:9px}.o55MTq_lineCursor{stroke:var(--dsw-static-deepseek-450,#5686fe);stroke-dasharray:3 3;stroke-width:1.5px;pointer-events:none}.o55MTq_lineActiveOuter{fill:#5686fe40;pointer-events:none;animation:1.5s ease-in-out infinite o55MTq_linePulse}@keyframes o55MTq_linePulse{0%,to{opacity:.8;transform:scale(1)}50%{opacity:.4;transform:scale(1.3)}}.o55MTq_lineActiveInner{fill:var(--dsw-static-deepseek-450,#5686fe);stroke:#fff;stroke-width:1.5px;pointer-events:none}.o55MTq_viewSwitchGroup{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:5px;gap:2px;padding:2px;display:flex}.o55MTq_viewSwitchBtn{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:3px;padding:2px 7px;font-size:10px;font-weight:600;transition:all .12s}.o55MTq_viewSwitchBtn[data-active]{background:var(--dsw-specific-menu);color:var(--dsw-alias-label-primary);box-shadow:var(--dsw-shadow-lv1)}.o55MTq_heatmapPanel{background:var(--dsw-specific-menu);border:1px solid var(--dsw-alias-border-l2);box-shadow:var(--dsw-shadow-lv1);box-sizing:border-box;border-radius:10px;flex-direction:column;gap:10px;width:100%;min-width:0;margin-top:12px;padding:14px 16px;display:flex}.o55MTq_heatmapHead{flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:8px;display:flex}.o55MTq_heatmapTitleGroup{flex-direction:column;gap:2px;display:flex}.o55MTq_heatmapTitle{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:700}.o55MTq_heatmapSub{color:var(--dsw-alias-label-secondary);font-size:11px}.o55MTq_heatmapStatsRow{color:var(--dsw-alias-label-secondary);flex-wrap:wrap;gap:14px;font-size:11px;display:flex}.o55MTq_heatmapStatsRow strong{color:var(--dsw-alias-label-primary);font-variant-numeric:tabular-nums;font-weight:700}.o55MTq_heatmapScrollArea{box-sizing:border-box;width:100%;padding:8px 4px 14px;overflow:auto visible}.o55MTq_heatmapContainer{flex-direction:column;gap:6px;width:max-content;display:flex;position:relative}.o55MTq_heatmapMonthsRow{height:16px;margin-left:32px;display:block;position:relative}.o55MTq_heatmapMonthLabel{color:var(--dsw-alias-label-tertiary);white-space:nowrap;font-size:10px;font-weight:600;position:absolute}.o55MTq_heatmapGrid{gap:8px;display:flex}.o55MTq_heatmapWeekdaysCol{width:24px;height:109px;color:var(--dsw-alias-label-tertiary);user-select:none;flex-direction:column;flex-shrink:0;justify-content:space-between;padding:0;font-size:9px;display:flex}.o55MTq_heatmapWeeksRow{gap:3px;display:flex}.o55MTq_heatmapWeekCol{flex-direction:column;gap:3px;display:flex}.o55MTq_heatmapCell{box-sizing:border-box;cursor:pointer;border-radius:2px;width:13px;height:13px;transition:outline .1s,box-shadow .1s,filter .1s;position:relative}.o55MTq_heatmapCellToday{outline-offset:1px;z-index:5;outline:1.5px solid var(--dsw-static-deepseek-450,#5686fe)!important}.o55MTq_heatmapCell[data-level=\"0\"]{background:var(--dsw-alias-bg-layer-2,#ffffff09);border:1px solid var(--dsw-alias-border-l2,#ffffff14)}.o55MTq_heatmapCell[data-level=\"1\"]{background:#5686fe38;border:1px solid #5686fe59}.o55MTq_heatmapCell[data-level=\"2\"]{background:#5686fe73;border:1px solid #5686fe99}.o55MTq_heatmapCell[data-level=\"3\"]{background:#5686feb8;border:1px solid #5686fee0;box-shadow:0 0 6px #5686fe40}.o55MTq_heatmapCell[data-level=\"4\"]{background:var(--dsw-static-deepseek-450,#5686fe);border:1px solid #9bb8ff;box-shadow:0 0 10px #5686fe8c}.o55MTq_heatmapCell[data-future=true]{opacity:.28;cursor:default;background:0 0!important;border:1px dashed #ffffff26!important}.o55MTq_heatmapCell:hover:not([data-future=true]),.o55MTq_heatmapCellActive{outline-offset:1px;filter:brightness(1.25);z-index:10;transform:none;outline:2px solid #fff!important;box-shadow:0 0 12px #5686fed9!important}.o55MTq_heatmapLiveHud{color:var(--dsw-alias-label-primary);background:#5686fe1f;border:1px solid #5686fe47;border-radius:6px;align-items:center;gap:8px;padding:3px 8px;font-size:11px;display:flex}.o55MTq_heatmapLiveDate{color:var(--dsw-static-deepseek-450,#5686fe);font-weight:700}.o55MTq_heatmapLiveTokens{font-variant-numeric:tabular-nums;font-weight:700}.o55MTq_heatmapLiveModel{color:var(--dsw-alias-label-secondary);font-size:10px}.o55MTq_heatmapFoot{color:var(--dsw-alias-label-tertiary);border-top:1px solid var(--dsw-alias-border-l2);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;margin-top:4px;padding-top:8px;font-size:10px;display:flex}.o55MTq_heatmapLegend{color:var(--dsw-alias-label-tertiary);align-items:center;gap:4px;font-size:10px;display:flex}.o55MTq_heatmapLegendCell{border-radius:2px;width:10px;height:10px}";
|
|
1933
3195
|
const tagId$1 = "dsh-watcher/Insights.module.css";
|
|
1934
3196
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
1935
3197
|
const tag = document.createElement("style");
|
|
@@ -1978,6 +3240,7 @@ window.__ModuleLoader__.load({
|
|
|
1978
3240
|
"cockpitSubTitle": "o55MTq_cockpitSubTitle",
|
|
1979
3241
|
"cockpitTitleArea": "o55MTq_cockpitTitleArea",
|
|
1980
3242
|
"contextTag": "o55MTq_contextTag",
|
|
3243
|
+
"costStat": "o55MTq_costStat",
|
|
1981
3244
|
"currentModelTag": "o55MTq_currentModelTag",
|
|
1982
3245
|
"dayBarTopLabel": "o55MTq_dayBarTopLabel",
|
|
1983
3246
|
"dayCol": "o55MTq_dayCol",
|
|
@@ -2049,10 +3312,13 @@ window.__ModuleLoader__.load({
|
|
|
2049
3312
|
"heatmapWeekCol": "o55MTq_heatmapWeekCol",
|
|
2050
3313
|
"heatmapWeekdaysCol": "o55MTq_heatmapWeekdaysCol",
|
|
2051
3314
|
"heatmapWeeksRow": "o55MTq_heatmapWeeksRow",
|
|
2052
|
-
"
|
|
3315
|
+
"heroCaption": "o55MTq_heroCaption",
|
|
3316
|
+
"heroFootnote": "o55MTq_heroFootnote",
|
|
2053
3317
|
"heroMetaCol": "o55MTq_heroMetaCol",
|
|
3318
|
+
"heroMetric": "o55MTq_heroMetric",
|
|
3319
|
+
"heroPair": "o55MTq_heroPair",
|
|
2054
3320
|
"heroStatsRow": "o55MTq_heroStatsRow",
|
|
2055
|
-
"
|
|
3321
|
+
"heroValue": "o55MTq_heroValue",
|
|
2056
3322
|
"hudBody": "o55MTq_hudBody",
|
|
2057
3323
|
"hudBox": "o55MTq_hudBox",
|
|
2058
3324
|
"hudHeading": "o55MTq_hudHeading",
|
|
@@ -2070,6 +3336,11 @@ window.__ModuleLoader__.load({
|
|
|
2070
3336
|
"modelTabBar": "o55MTq_modelTabBar",
|
|
2071
3337
|
"modelTabBtn": "o55MTq_modelTabBtn",
|
|
2072
3338
|
"modelTagText": "o55MTq_modelTagText",
|
|
3339
|
+
"priceOverrideActions": "o55MTq_priceOverrideActions",
|
|
3340
|
+
"priceOverrideError": "o55MTq_priceOverrideError",
|
|
3341
|
+
"priceOverrideHelp": "o55MTq_priceOverrideHelp",
|
|
3342
|
+
"priceOverrideInput": "o55MTq_priceOverrideInput",
|
|
3343
|
+
"priceOverridePath": "o55MTq_priceOverridePath",
|
|
2073
3344
|
"rangeBtn": "o55MTq_rangeBtn",
|
|
2074
3345
|
"rangeSwitchGroup": "o55MTq_rangeSwitchGroup",
|
|
2075
3346
|
"rankBadge": "o55MTq_rankBadge",
|
|
@@ -2113,6 +3384,7 @@ window.__ModuleLoader__.load({
|
|
|
2113
3384
|
"settingsDrawerContent": "o55MTq_settingsDrawerContent",
|
|
2114
3385
|
"settingsMiniInput": "o55MTq_settingsMiniInput",
|
|
2115
3386
|
"settingsMiniSaveBtn": "o55MTq_settingsMiniSaveBtn",
|
|
3387
|
+
"settingsResetBtn": "o55MTq_settingsResetBtn",
|
|
2116
3388
|
"settingsScanBtn": "o55MTq_settingsScanBtn",
|
|
2117
3389
|
"settingsSummary": "o55MTq_settingsSummary",
|
|
2118
3390
|
"slideDown": "o55MTq_slideDown",
|
|
@@ -2710,6 +3982,22 @@ window.__ModuleLoader__.load({
|
|
|
2710
3982
|
}, []);
|
|
2711
3983
|
return limits;
|
|
2712
3984
|
}
|
|
3985
|
+
function useUiLocale() {
|
|
3986
|
+
const [locale, setLocale] = (0, react.useState)(detectLocale);
|
|
3987
|
+
(0, react.useEffect)(() => {
|
|
3988
|
+
setLocale(detectLocale());
|
|
3989
|
+
}, []);
|
|
3990
|
+
return locale;
|
|
3991
|
+
}
|
|
3992
|
+
function usePricingTable() {
|
|
3993
|
+
const [table, setTable] = (0, react.useState)(() => mergePricing(defaultPricing(), readStoredOverride(globalThis.localStorage)));
|
|
3994
|
+
(0, react.useEffect)(() => {
|
|
3995
|
+
const update = () => setTable(mergePricing(defaultPricing(), readStoredOverride(globalThis.localStorage)));
|
|
3996
|
+
window.addEventListener("watcher-pricing-settings", update);
|
|
3997
|
+
return () => window.removeEventListener("watcher-pricing-settings", update);
|
|
3998
|
+
}, []);
|
|
3999
|
+
return table;
|
|
4000
|
+
}
|
|
2713
4001
|
const fmt = (n) => new Intl.NumberFormat("zh-CN", { maximumFractionDigits: 0 }).format(n);
|
|
2714
4002
|
const fmtCompact = (n) => {
|
|
2715
4003
|
if (!Number.isFinite(n) || n <= 0) return "0";
|
|
@@ -2908,6 +4196,9 @@ window.__ModuleLoader__.load({
|
|
|
2908
4196
|
}
|
|
2909
4197
|
function SessionInsights({ value, now, running, waiting, onEvidence }) {
|
|
2910
4198
|
const limits = useLimits();
|
|
4199
|
+
const pricing = usePricingTable();
|
|
4200
|
+
const locale = useUiLocale();
|
|
4201
|
+
const copy = costCopy(locale);
|
|
2911
4202
|
const [scope, setScope] = (0, react.useState)("turn");
|
|
2912
4203
|
const [modelFilter, setModelFilter] = (0, react.useState)("all");
|
|
2913
4204
|
if (!value) return null;
|
|
@@ -2922,6 +4213,10 @@ window.__ModuleLoader__.load({
|
|
|
2922
4213
|
const currentRoute = value.turn?.route ?? (value.models && value.models.length > 0 ? value.models[0] : void 0);
|
|
2923
4214
|
const totalIn = (stats.input ?? 0) + (stats.cacheRead ?? 0);
|
|
2924
4215
|
const cachePct = totalIn > 0 ? Math.round((stats.cacheRead ?? 0) / totalIn * 100) : 0;
|
|
4216
|
+
const estimate = estimateFromInsights(value, stats, scope, selectedModel, currentRoute, pricing);
|
|
4217
|
+
const costText = formatEstimate(estimate, locale);
|
|
4218
|
+
const costNote = formatEstimateNote(estimate, locale);
|
|
4219
|
+
const costTitle = costNote ? `${copy.estimatedCost}: ${costText} · ${costNote}` : `${copy.estimatedCost}: ${costText}`;
|
|
2925
4220
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
2926
4221
|
className: Insights_module_css_default.hudBox,
|
|
2927
4222
|
"aria-label": "耗时分布与运行健康度",
|
|
@@ -2957,35 +4252,48 @@ window.__ModuleLoader__.load({
|
|
|
2957
4252
|
]
|
|
2958
4253
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2959
4254
|
className: Insights_module_css_default.hudTopRight,
|
|
2960
|
-
children: [
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
4255
|
+
children: [
|
|
4256
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
4257
|
+
className: Insights_module_css_default.tokenStat,
|
|
4258
|
+
children: [
|
|
4259
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: fmt(stats.tokens ?? 0) }),
|
|
4260
|
+
" Token (",
|
|
4261
|
+
cachePct,
|
|
4262
|
+
"% 命中)"
|
|
4263
|
+
]
|
|
4264
|
+
}),
|
|
4265
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
4266
|
+
className: Insights_module_css_default.costStat,
|
|
4267
|
+
title: costTitle,
|
|
4268
|
+
"aria-label": `${copy.estimatedCost}: ${costText}`,
|
|
4269
|
+
children: [
|
|
4270
|
+
copy.estimatedCost,
|
|
4271
|
+
" ",
|
|
4272
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: costText })
|
|
4273
|
+
]
|
|
4274
|
+
}),
|
|
4275
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4276
|
+
className: Insights_module_css_default.scopeGroup,
|
|
4277
|
+
role: "group",
|
|
4278
|
+
"aria-label": "统计范围切换",
|
|
4279
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
4280
|
+
type: "button",
|
|
4281
|
+
className: Insights_module_css_default.scopeBtn,
|
|
4282
|
+
"data-active": scope === "turn" ? "" : void 0,
|
|
4283
|
+
onClick: () => {
|
|
4284
|
+
setScope("turn");
|
|
4285
|
+
setModelFilter("all");
|
|
4286
|
+
},
|
|
4287
|
+
children: "本轮"
|
|
4288
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
4289
|
+
type: "button",
|
|
4290
|
+
className: Insights_module_css_default.scopeBtn,
|
|
4291
|
+
"data-active": scope === "session" ? "" : void 0,
|
|
4292
|
+
onClick: () => setScope("session"),
|
|
4293
|
+
children: "全会话"
|
|
4294
|
+
})]
|
|
4295
|
+
})
|
|
4296
|
+
]
|
|
2989
4297
|
})]
|
|
2990
4298
|
}),
|
|
2991
4299
|
scope === "session" && isMultiModel ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -3060,9 +4368,15 @@ window.__ModuleLoader__.load({
|
|
|
3060
4368
|
}
|
|
3061
4369
|
function InsightsSettings(props) {
|
|
3062
4370
|
const limits = useLimits();
|
|
4371
|
+
const pricing = usePricingTable();
|
|
4372
|
+
const locale = useUiLocale();
|
|
4373
|
+
const copy = costCopy(locale);
|
|
3063
4374
|
const [silence, setSilence] = (0, react.useState)(limits.silenceSeconds);
|
|
3064
4375
|
const [reasoning, setReasoning] = (0, react.useState)(limits.reasoningSeconds);
|
|
3065
4376
|
const [saved, setSaved] = (0, react.useState)(false);
|
|
4377
|
+
const [overrideText, setOverrideText] = (0, react.useState)(() => effectivePricingText(globalThis.localStorage));
|
|
4378
|
+
const [overrideError, setOverrideError] = (0, react.useState)("");
|
|
4379
|
+
const [overrideSaved, setOverrideSaved] = (0, react.useState)(false);
|
|
3066
4380
|
const [userPickedRange, setUserPickedRange] = (0, react.useState)(false);
|
|
3067
4381
|
const [range, setRange] = (0, react.useState)("7");
|
|
3068
4382
|
const [customViewMode, setCustomViewMode] = (0, react.useState)(null);
|
|
@@ -3126,7 +4440,9 @@ window.__ModuleLoader__.load({
|
|
|
3126
4440
|
let totalBashMs = 0;
|
|
3127
4441
|
let totalTools = 0;
|
|
3128
4442
|
let totalCacheRead = 0;
|
|
4443
|
+
let totalCacheWrite = 0;
|
|
3129
4444
|
let totalInput = 0;
|
|
4445
|
+
let totalOutput = 0;
|
|
3130
4446
|
let totalErrors = 0;
|
|
3131
4447
|
let totalRetries = 0;
|
|
3132
4448
|
validViews.forEach((v) => {
|
|
@@ -3136,7 +4452,9 @@ window.__ModuleLoader__.load({
|
|
|
3136
4452
|
totalBashMs += v.totals.bashMs ?? 0;
|
|
3137
4453
|
totalTools += v.totals.tools ?? 0;
|
|
3138
4454
|
totalCacheRead += v.totals.cacheRead ?? 0;
|
|
4455
|
+
totalCacheWrite += v.totals.cacheWrite ?? 0;
|
|
3139
4456
|
totalInput += v.totals.input ?? 0;
|
|
4457
|
+
totalOutput += v.totals.output ?? 0;
|
|
3140
4458
|
totalErrors += v.totals.toolErrors ?? 0;
|
|
3141
4459
|
totalRetries += v.totals.retries ?? 0;
|
|
3142
4460
|
});
|
|
@@ -3396,10 +4714,19 @@ window.__ModuleLoader__.load({
|
|
|
3396
4714
|
}
|
|
3397
4715
|
const totalHeatmapTokens = nonZeroTokenDays.reduce((acc, v) => acc + v, 0);
|
|
3398
4716
|
const totalHeatmapSessions = allHistoricalRows.length;
|
|
4717
|
+
const estimatedCost = estimateUsageRows(uniqueModels.length > 0 ? uniqueModels : [{
|
|
4718
|
+
model: "未标注",
|
|
4719
|
+
tokens: totalTokens,
|
|
4720
|
+
input: totalInput,
|
|
4721
|
+
output: totalOutput,
|
|
4722
|
+
cacheRead: totalCacheRead,
|
|
4723
|
+
cacheWrite: totalCacheWrite
|
|
4724
|
+
}], pricing);
|
|
3399
4725
|
return {
|
|
3400
4726
|
validCount: validRows.length,
|
|
3401
4727
|
listed: sessions.total,
|
|
3402
4728
|
totalTokens,
|
|
4729
|
+
estimatedCost,
|
|
3403
4730
|
totalTimeHours: ((totalModelMs + totalToolMs) / 36e5).toFixed(1),
|
|
3404
4731
|
cacheHitPct,
|
|
3405
4732
|
totalCacheRead,
|
|
@@ -3442,11 +4769,15 @@ window.__ModuleLoader__.load({
|
|
|
3442
4769
|
}, [
|
|
3443
4770
|
sessions,
|
|
3444
4771
|
range,
|
|
3445
|
-
sessionSort
|
|
4772
|
+
sessionSort,
|
|
4773
|
+
pricing
|
|
3446
4774
|
]);
|
|
3447
4775
|
const cacheNote = !analytics ? "" : analytics.cacheHitPct >= 70 ? "命中较高" : analytics.cacheHitPct >= 40 ? "一般" : "命中偏低";
|
|
3448
4776
|
const activeSeg = hoveredIdx !== null && analytics?.donutSegments[hoveredIdx] ? analytics.donutSegments[hoveredIdx] : null;
|
|
3449
4777
|
const topModel = analytics?.donutSegments[0];
|
|
4778
|
+
const heroCostText = analytics ? formatEstimate(analytics.estimatedCost, locale) : "-";
|
|
4779
|
+
const heroCostNote = analytics ? formatEstimateNote(analytics.estimatedCost, locale) : "";
|
|
4780
|
+
const heroCostTitle = [estimateDisclaimer(locale), heroCostNote].filter(Boolean).join(" · ");
|
|
3450
4781
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3451
4782
|
className: Insights_module_css_default.settingsContainer,
|
|
3452
4783
|
children: [
|
|
@@ -3512,15 +4843,35 @@ window.__ModuleLoader__.load({
|
|
|
3512
4843
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3513
4844
|
className: Insights_module_css_default.heroStatsRow,
|
|
3514
4845
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3515
|
-
className: Insights_module_css_default.
|
|
3516
|
-
children: [
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
className: Insights_module_css_default.heroUnit,
|
|
4846
|
+
className: Insights_module_css_default.heroPair,
|
|
4847
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4848
|
+
className: Insights_module_css_default.heroMetric,
|
|
4849
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4850
|
+
className: Insights_module_css_default.heroCaption,
|
|
3521
4851
|
children: "Token"
|
|
3522
|
-
})
|
|
3523
|
-
|
|
4852
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", {
|
|
4853
|
+
className: Insights_module_css_default.heroValue,
|
|
4854
|
+
children: analytics ? fmtCompact(analytics.totalTokens) : "-"
|
|
4855
|
+
})]
|
|
4856
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4857
|
+
className: Insights_module_css_default.heroMetric,
|
|
4858
|
+
title: heroCostTitle,
|
|
4859
|
+
"aria-label": `${copy.estimatedCost}: ${heroCostText}`,
|
|
4860
|
+
children: [
|
|
4861
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4862
|
+
className: Insights_module_css_default.heroCaption,
|
|
4863
|
+
children: copy.estimatedCost
|
|
4864
|
+
}),
|
|
4865
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", {
|
|
4866
|
+
className: Insights_module_css_default.heroValue,
|
|
4867
|
+
children: heroCostText
|
|
4868
|
+
}),
|
|
4869
|
+
heroCostNote ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4870
|
+
className: Insights_module_css_default.heroFootnote,
|
|
4871
|
+
children: heroCostNote
|
|
4872
|
+
}) : null
|
|
4873
|
+
]
|
|
4874
|
+
})]
|
|
3524
4875
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3525
4876
|
className: Insights_module_css_default.heroMetaCol,
|
|
3526
4877
|
children: [
|
|
@@ -5196,6 +6547,62 @@ window.__ModuleLoader__.load({
|
|
|
5196
6547
|
children: "暂无已缓存的对话统计。"
|
|
5197
6548
|
})]
|
|
5198
6549
|
}),
|
|
6550
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
|
|
6551
|
+
className: Insights_module_css_default.settingsDrawer,
|
|
6552
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", {
|
|
6553
|
+
className: Insights_module_css_default.settingsSummary,
|
|
6554
|
+
children: copy.priceOverrideTitle
|
|
6555
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6556
|
+
className: Insights_module_css_default.settingsDrawerContent,
|
|
6557
|
+
children: [
|
|
6558
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
6559
|
+
className: Insights_module_css_default.priceOverrideHelp,
|
|
6560
|
+
children: copy.priceOverrideHelp
|
|
6561
|
+
}),
|
|
6562
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
6563
|
+
className: Insights_module_css_default.priceOverrideInput,
|
|
6564
|
+
rows: 8,
|
|
6565
|
+
spellCheck: false,
|
|
6566
|
+
placeholder: copy.priceOverridePlaceholder,
|
|
6567
|
+
value: overrideText,
|
|
6568
|
+
onChange: (e) => setOverrideText(e.target.value),
|
|
6569
|
+
"aria-label": copy.priceOverrideTitle
|
|
6570
|
+
}),
|
|
6571
|
+
overrideError ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
6572
|
+
className: Insights_module_css_default.priceOverrideError,
|
|
6573
|
+
children: overrideError
|
|
6574
|
+
}) : null,
|
|
6575
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6576
|
+
className: Insights_module_css_default.priceOverrideActions,
|
|
6577
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
6578
|
+
type: "button",
|
|
6579
|
+
className: Insights_module_css_default.settingsMiniSaveBtn,
|
|
6580
|
+
onClick: () => {
|
|
6581
|
+
try {
|
|
6582
|
+
setOverrideText(persistPricingEditor(overrideText, globalThis.localStorage));
|
|
6583
|
+
window.dispatchEvent(new CustomEvent("watcher-pricing-settings"));
|
|
6584
|
+
setOverrideError("");
|
|
6585
|
+
setOverrideSaved(true);
|
|
6586
|
+
setTimeout(() => setOverrideSaved(false), 2e3);
|
|
6587
|
+
} catch {
|
|
6588
|
+
setOverrideError(copy.priceOverrideInvalid);
|
|
6589
|
+
}
|
|
6590
|
+
},
|
|
6591
|
+
children: overrideSaved ? copy.priceOverrideSaved : copy.priceOverrideSave
|
|
6592
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
6593
|
+
type: "button",
|
|
6594
|
+
className: Insights_module_css_default.settingsResetBtn,
|
|
6595
|
+
onClick: () => {
|
|
6596
|
+
setOverrideText(clearPricingEditor(globalThis.localStorage));
|
|
6597
|
+
window.dispatchEvent(new CustomEvent("watcher-pricing-settings"));
|
|
6598
|
+
setOverrideError("");
|
|
6599
|
+
},
|
|
6600
|
+
children: copy.priceOverrideReset
|
|
6601
|
+
})]
|
|
6602
|
+
})
|
|
6603
|
+
]
|
|
6604
|
+
})]
|
|
6605
|
+
}),
|
|
5199
6606
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
|
|
5200
6607
|
className: Insights_module_css_default.settingsDrawer,
|
|
5201
6608
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", {
|