dsh-session-fee 0.0.0-stage → 0.4.4
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/LICENSE +21 -0
- package/PRICES.md +79 -0
- package/README.md +205 -2
- package/client.js +379 -0
- package/cordis.patch.yml +5 -0
- package/icon.svg +9 -0
- package/index.js +87 -0
- package/lib/catalog.js +228 -0
- package/lib/config.js +68 -0
- package/lib/pricing.js +405 -0
- package/lib/projection.js +295 -0
- package/lib/reload.js +68 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +64 -4
- package/prices.example.json +71 -0
- package/prices.json +213 -0
package/prices.json
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 2,
|
|
3
|
+
"note": "市面 token 刊例价,每 100 万 token;国产模型用 CNY,美国模型用 USD。只收当前主流在线模型;新模型发布后在这里手动加一条。没写到的模型按 DSH 自带的 pi-ai 目录兜底,再没有就显示 --。来源与口径见 PRICES.md。",
|
|
4
|
+
"timeZone": "Asia/Shanghai",
|
|
5
|
+
"dateSets": {
|
|
6
|
+
"cn-holidays": [
|
|
7
|
+
"2026-01-01..2026-01-03",
|
|
8
|
+
"2026-02-15..2026-02-23",
|
|
9
|
+
"2026-04-04..2026-04-06",
|
|
10
|
+
"2026-05-01..2026-05-05",
|
|
11
|
+
"2026-06-19..2026-06-21",
|
|
12
|
+
"2026-09-25..2026-09-27",
|
|
13
|
+
"2026-10-01..2026-10-07"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"models": [
|
|
17
|
+
{
|
|
18
|
+
"name": "DeepSeek-V4.1-Flash",
|
|
19
|
+
"match": ["dsh-provider-qoder/dfmodel", "*/deepseek-v4.1-flash", "*/deepseek-flash"],
|
|
20
|
+
"rules": [
|
|
21
|
+
{"name": "DeepSeek-V4.1-Flash 高峰", "currency": "CNY", "input": 2, "cacheRead": 0.04, "cacheWrite": 0, "output": 8, "when": {
|
|
22
|
+
"weekdays": [1, 2, 3, 4, 5],
|
|
23
|
+
"excludeDates": ["@cn-holidays"],
|
|
24
|
+
"intervals": [{"start": "09:00", "end": "12:00"}, {"start": "14:00", "end": "18:00"}]
|
|
25
|
+
}},
|
|
26
|
+
{"name": "DeepSeek-V4.1-Flash 闲时", "currency": "CNY", "input": 1, "cacheRead": 0.02, "cacheWrite": 0, "output": 4}
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "DeepSeek-V4-Pro",
|
|
31
|
+
"match": ["dsh-provider-qoder/dmodel", "*/deepseek-v4-pro"],
|
|
32
|
+
"rules": [
|
|
33
|
+
{"name": "DeepSeek-V4-Pro 高峰", "currency": "CNY", "input": 9, "cacheRead": 0.3, "cacheWrite": 0, "output": 27, "when": {
|
|
34
|
+
"weekdays": [1, 2, 3, 4, 5],
|
|
35
|
+
"excludeDates": ["@cn-holidays"],
|
|
36
|
+
"intervals": [{"start": "09:00", "end": "12:00"}, {"start": "14:00", "end": "18:00"}]
|
|
37
|
+
}},
|
|
38
|
+
{"name": "DeepSeek-V4-Pro 闲时", "currency": "CNY", "input": 4.5, "cacheRead": 0.15, "cacheWrite": 0, "output": 13.5}
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"name": "Kimi-K3.1-Pro",
|
|
43
|
+
"match": ["dsh-provider-qoder/kmodel_latest", "*/kimi-k3.1-pro"],
|
|
44
|
+
"rules": [
|
|
45
|
+
{"name": "Kimi-K3.1-Pro", "currency": "CNY", "input": 13, "cacheRead": 1.3, "cacheWrite": 13, "output": 68}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "Kimi-K3",
|
|
50
|
+
"match": ["*/kimi-k3"],
|
|
51
|
+
"rules": [
|
|
52
|
+
{"name": "Kimi-K3", "currency": "CNY", "input": 20, "cacheRead": 2, "cacheWrite": 20, "output": 100}
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "Kimi-K2.8-Preview",
|
|
57
|
+
"match": ["dsh-provider-qoder/kmodel", "*/kimi-k2.8-preview"],
|
|
58
|
+
"rules": [
|
|
59
|
+
{"name": "Kimi-K2.8-Preview", "currency": "CNY", "input": 6.5, "cacheRead": 1.3, "cacheWrite": 0, "output": 27}
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "GLM-5.3",
|
|
64
|
+
"match": ["dsh-provider-qoder/gmodel", "*/glm-5.3"],
|
|
65
|
+
"rules": [
|
|
66
|
+
{"name": "GLM-5.3", "currency": "CNY", "input": 8, "cacheRead": 2, "cacheWrite": 0, "output": 28}
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"name": "GLM-5.3-Flash",
|
|
71
|
+
"match": ["dsh-provider-qoder/gfmodel", "*/glm-5.3-flash"],
|
|
72
|
+
"rules": [
|
|
73
|
+
{"name": "GLM-5.3-Flash", "currency": "CNY", "input": 0.8, "cacheRead": 0.23, "cacheWrite": 0, "output": 2.8}
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "Qwen3.8-Max",
|
|
78
|
+
"match": ["dsh-provider-qoder/qmodel_38max", "*/qwen3.8-max"],
|
|
79
|
+
"rules": [
|
|
80
|
+
{"name": "Qwen3.8-Max", "currency": "CNY", "input": 12, "cacheRead": 1.5, "cacheWrite": 0, "output": 36}
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "Qwen3.8-Flash",
|
|
85
|
+
"match": ["dsh-provider-qoder/qfmodel", "*/qwen3.8-flash"],
|
|
86
|
+
"rules": [
|
|
87
|
+
{"name": "Qwen3.8-Flash", "currency": "CNY", "input": 1, "cacheRead": 0.1, "cacheWrite": 0, "output": 3}
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "MiniMax-M3.1-Flash",
|
|
92
|
+
"match": ["dsh-provider-qoder/mmodel", "*/minimax-m3.1-flash"],
|
|
93
|
+
"rules": [
|
|
94
|
+
{"name": "MiniMax-M3.1-Flash", "currency": "CNY", "input": 1, "cacheRead": 0.1, "cacheWrite": 0, "output": 4}
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"name": "Step-5-Preview",
|
|
99
|
+
"match": ["dsh-provider-qoder/jmodel", "*/step-5-preview"],
|
|
100
|
+
"rules": [
|
|
101
|
+
{"name": "Step-5-Preview", "currency": "CNY", "input": 7, "cacheRead": 0.35, "cacheWrite": 7, "output": 20}
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "MiMo-V2.6-Pro",
|
|
106
|
+
"match": ["*/mimo-v2.6-pro"],
|
|
107
|
+
"rules": [
|
|
108
|
+
{"name": "MiMo-V2.6-Pro", "currency": "CNY", "input": 3, "cacheRead": 0.025, "cacheWrite": 0, "output": 6}
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"name": "MiMo-V2.6-Flash",
|
|
113
|
+
"match": ["*/mimo-v2.6-flash"],
|
|
114
|
+
"rules": [
|
|
115
|
+
{"name": "MiMo-V2.6-Flash", "currency": "CNY", "input": 1, "cacheRead": 0.02, "cacheWrite": 0, "output": 2}
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"name": "Hy4",
|
|
120
|
+
"match": ["*/hy4-preview", "*/hy4"],
|
|
121
|
+
"rules": [
|
|
122
|
+
{"name": "Hy4", "currency": "CNY", "input": 6, "cacheRead": 0.3, "cacheWrite": 0, "output": 18}
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"name": "GPT-6 Astra",
|
|
127
|
+
"match": ["*/gpt-6-astra"],
|
|
128
|
+
"rules": [
|
|
129
|
+
{"name": "GPT-6 Astra", "currency": "USD", "input": 10, "cacheRead": 1, "cacheWrite": 12.5, "output": 50, "tiers": [{"above": 272000, "input": 20, "cacheRead": 2, "cacheWrite": 25, "output": 75}]}
|
|
130
|
+
]
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"name": "GPT-6.1 Sol",
|
|
134
|
+
"match": ["*/gpt-6.1-sol"],
|
|
135
|
+
"rules": [
|
|
136
|
+
{"name": "GPT-6.1 Sol", "currency": "USD", "input": 2, "cacheRead": 0.1, "cacheWrite": 2.5, "output": 10, "tiers": [{"above": 272000, "input": 4, "cacheRead": 0.2, "cacheWrite": 5, "output": 15}]}
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "GPT-6.1 Terra",
|
|
141
|
+
"match": ["*/gpt-6.1-terra"],
|
|
142
|
+
"rules": [
|
|
143
|
+
{"name": "GPT-6.1 Terra", "currency": "USD", "input": 1, "cacheRead": 0.05, "cacheWrite": 1.25, "output": 5, "tiers": [{"above": 272000, "input": 2, "cacheRead": 0.1, "cacheWrite": 2.5, "output": 7.5}]}
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"name": "GPT-6 Luna",
|
|
148
|
+
"match": ["*/gpt-6-luna"],
|
|
149
|
+
"rules": [
|
|
150
|
+
{"name": "GPT-6 Luna", "currency": "USD", "input": 0.1, "cacheRead": 0.01, "cacheWrite": 0.125, "output": 0.5, "tiers": [{"above": 272000, "input": 0.2, "cacheRead": 0.02, "cacheWrite": 0.25, "output": 0.75}]}
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "Claude Fable 5.1",
|
|
155
|
+
"match": ["*/claude-fable-5-1*", "*/claude-fable-5.1*"],
|
|
156
|
+
"rules": [
|
|
157
|
+
{"name": "Claude Fable 5.1", "currency": "USD", "input": 10, "cacheRead": 0.25, "cacheWrite": 12.5, "output": 50}
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"name": "Claude Opus 5.5",
|
|
162
|
+
"match": ["*/claude-opus-5-5*", "*/claude-opus-5.5*"],
|
|
163
|
+
"rules": [
|
|
164
|
+
{"name": "Claude Opus 5.5", "currency": "USD", "input": 4, "cacheRead": 0.2, "cacheWrite": 5, "output": 20}
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"name": "Claude Sonnet 5.5",
|
|
169
|
+
"match": ["*/claude-sonnet-5-5*", "*/claude-sonnet-5.5*"],
|
|
170
|
+
"rules": [
|
|
171
|
+
{"name": "Claude Sonnet 5.5", "currency": "USD", "input": 2, "cacheRead": 0.1, "cacheWrite": 2.5, "output": 10}
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"name": "Claude Haiku 5.5",
|
|
176
|
+
"match": ["*/claude-haiku-5-5*", "*/claude-haiku-5.5*"],
|
|
177
|
+
"rules": [
|
|
178
|
+
{"name": "Claude Haiku 5.5", "currency": "USD", "input": 0.1, "cacheRead": 0.01, "cacheWrite": 0.125, "output": 0.5, "tiers": [{"above": 100000, "input": 0.5, "cacheRead": 0.05, "cacheWrite": 0.625, "output": 2.5}]}
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"name": "Gemini 4 Argon",
|
|
183
|
+
"match": ["*/gemini-4-argon"],
|
|
184
|
+
"rules": [
|
|
185
|
+
{"name": "Gemini 4 Argon 标准价", "currency": "USD", "input": 4, "cacheRead": 0.2, "cacheWrite": 0, "output": 20, "when": {
|
|
186
|
+
"from": "2026-12-01T00:00:00+08:00"
|
|
187
|
+
}},
|
|
188
|
+
{"name": "Gemini 4 Argon 首发价", "currency": "USD", "input": 2, "cacheRead": 0.1, "cacheWrite": 0, "output": 10}
|
|
189
|
+
]
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"name": "Gemini 3.8 Flash",
|
|
193
|
+
"match": ["*/gemini-3.8-flash"],
|
|
194
|
+
"rules": [
|
|
195
|
+
{"name": "Gemini 3.8 Flash", "currency": "USD", "input": 0.75, "cacheRead": 0.075, "cacheWrite": 0, "output": 3.75}
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"name": "Grok 4.7",
|
|
200
|
+
"match": ["*/grok-4.7"],
|
|
201
|
+
"rules": [
|
|
202
|
+
{"name": "Grok 4.7", "currency": "USD", "input": 2, "cacheRead": 0.5, "cacheWrite": 0, "output": 6, "tiers": [{"above": 199999, "input": 4, "cacheRead": 1, "cacheWrite": 0, "output": 12}]}
|
|
203
|
+
]
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"name": "Grok Build 0.1",
|
|
207
|
+
"match": ["*/grok-build-0.1", "*/grok-code-fast-1*"],
|
|
208
|
+
"rules": [
|
|
209
|
+
{"name": "Grok Build 0.1", "currency": "USD", "input": 1, "cacheRead": 0.2, "cacheWrite": 0, "output": 2, "tiers": [{"above": 199999, "input": 2, "cacheRead": 0.4, "output": 4}]}
|
|
210
|
+
]
|
|
211
|
+
}
|
|
212
|
+
]
|
|
213
|
+
}
|