dsh-openrouter-provider-advisor 0.1.2 → 0.1.3

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/CHANGELOG.md CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
  All notable changes to this project are documented here.
4
4
 
5
+ ## [0.1.3] - 2026-08-25
6
+
7
+ ### Changed
8
+
9
+ - Updated npm `repository`, `homepage`, and `bugs` metadata after the GitHub account was renamed from `xuanfengtechx` to `xuan666-lab`, allowing DSH Store to associate the published package with the current repository URL.
10
+
11
+ ### Validation
12
+
13
+ - Automated tests, TypeScript typecheck, and production build passing.
14
+ - `npm audit --omit=dev` reports zero vulnerabilities.
15
+
5
16
  ## [0.1.2] - 2026-08-24
6
17
 
7
18
  ### Added
@@ -51,6 +62,7 @@ All notable changes to this project are documented here.
51
62
 
52
63
  - Initial public release.
53
64
 
54
- [0.1.2]: https://github.com/xuanfengtechx/dsh-openrouter-provider-advisor/compare/v0.1.1...v0.1.2
55
- [0.1.1]: https://github.com/xuanfengtechx/dsh-openrouter-provider-advisor/compare/v0.1.0...v0.1.1
56
- [0.1.0]: https://github.com/xuanfengtechx/dsh-openrouter-provider-advisor/releases/tag/v0.1.0
65
+ [0.1.3]: https://github.com/xuan666-lab/dsh-openrouter-provider-advisor/compare/v0.1.2...v0.1.3
66
+ [0.1.2]: https://github.com/xuan666-lab/dsh-openrouter-provider-advisor/compare/v0.1.1...v0.1.2
67
+ [0.1.1]: https://github.com/xuan666-lab/dsh-openrouter-provider-advisor/compare/v0.1.0...v0.1.1
68
+ [0.1.0]: https://github.com/xuan666-lab/dsh-openrouter-provider-advisor/releases/tag/v0.1.0
package/README.md CHANGED
@@ -6,6 +6,17 @@
6
6
 
7
7
  > **核心价值:在不更换模型的前提下,减少不必要的调用成本,并在价格、速度和可靠性之间找到更适合当前工作负载的线路。**
8
8
 
9
+ 插件推荐有机会找到比模型官网 API 明显更便宜的同模型线路。以 2026-08-25 面板中的 StreamLake `deepseek-v4-flash-0731` 报价为例,按 `1 USD ≈ 6.7225 CNY` 换算,与当时 DeepSeek 官网高峰期 Flash 报价对比如下:
10
+
11
+ | 每百万 tokens | StreamLake | DeepSeek 官网高峰期 | 预计降低 |
12
+ | --- | ---: | ---: | ---: |
13
+ | 输入(缓存命中) | $0.0028 ≈ ¥0.0188 | ¥0.10 | **81.2%** |
14
+ | 输入(缓存未命中) | $0.088 ≈ ¥0.5916 | ¥3.00 | **80.3%** |
15
+ | 输出 | $0.064 ≈ ¥0.4302 | ¥9.00 | **95.2%** |
16
+ | Code Agent 加权估算(2% / 8% / 90%) | ≈ ¥0.0632 | ≈ ¥0.8700 | **92.7%** |
17
+
18
+ > 以上仅是特定时间点的价格示例,不构成持续低价承诺;OpenRouter 供应商报价、DeepSeek 官网定价和汇率都会变化,请以插件实时结果与 [DeepSeek 官方价格页](https://api-docs.deepseek.com/zh-cn/quick_start/pricing/) 为准。汇率参考:[USD/CNY 2026-08-25](https://www.investing.com/currencies/usd-cny-historical-data)。
19
+
9
20
  🌏 **中文** · [English](./README_EN.md)
10
21
 
11
22
  ![OpenRouter 供应商推荐与实时切换](./docs/images/provider-panel.png)
@@ -85,20 +96,21 @@ session.selectModel 切换当前会话
85
96
  价格成本 = 输入价 × 2% + 输出价 × 8% + 缓存读取价 × 90%
86
97
  ```
87
98
 
88
- ### 可用率安全带
99
+ ### 可用率降权
89
100
 
90
- `status != 0` 的 endpoint 直接排除。其余 endpoint 使用温和的通用降权:
101
+ `status != 0` 的 endpoint 直接排除。其余 endpoint 使用连续、温和的通用降权,避免短时小幅波动造成排名断崖:
91
102
 
92
103
  | OpenRouter 近 30 分钟 uptime | 保留分数 |
93
104
  | --- | ---: |
94
105
  | ≥99.5% | 100% |
95
- | 99–99.5% | 85% |
96
- | 97–99% | 60% |
97
- | 90–97% | 30% |
98
- | <90% | 5% |
99
- | 无数据 | 70% |
106
+ | 99–99.5% | 97%–100%(连续插值) |
107
+ | 98–99% | 90%–97%(连续插值) |
108
+ | 95–98% | 75%–90%(连续插值) |
109
+ | 90–95% | 50%–75%(连续插值) |
110
+ | <90% | 10%–50%(连续插值) |
111
+ | 无数据 | 85% |
100
112
 
101
- 用户设置可以让惩罚更严格,但不能绕过安全带。
113
+ 用户设置中的阈值和系数会在阈值以下 5 个百分点内渐进生效,并与通用降权取更严格者。
102
114
 
103
115
  ## Agent 工具
104
116
 
@@ -142,7 +154,7 @@ POST /api/v1/presets/{slug}/chat/completions
142
154
  ## 本地源码开发
143
155
 
144
156
  ```bash
145
- git clone https://github.com/xuanfengtechx/dsh-openrouter-provider-advisor.git
157
+ git clone https://github.com/xuan666-lab/dsh-openrouter-provider-advisor.git
146
158
  cd dsh-openrouter-provider-advisor
147
159
  npm install
148
160
  npm run verify
package/README_EN.md CHANGED
@@ -6,6 +6,17 @@ It combines quantization, speed, cache-heavy pricing, context, and uptime into a
6
6
 
7
7
  > **Core value: reduce avoidable inference spend without changing models, while finding a practical balance between cost, speed, and reliability.**
8
8
 
9
+ The recommendations can surface same-model routes priced well below the model vendor's own API. For example, the StreamLake `deepseek-v4-flash-0731` quote shown on 2026-08-25 compares with DeepSeek's peak-hour Flash pricing as follows, using `1 USD ≈ 6.7225 CNY`:
10
+
11
+ | Per 1M tokens | StreamLake | DeepSeek peak hours | Estimated reduction |
12
+ | --- | ---: | ---: | ---: |
13
+ | Input (cache hit) | $0.0028 ≈ ¥0.0188 | ¥0.10 | **81.2%** |
14
+ | Input (cache miss) | $0.088 ≈ ¥0.5916 | ¥3.00 | **80.3%** |
15
+ | Output | $0.064 ≈ ¥0.4302 | ¥9.00 | **95.2%** |
16
+ | Code Agent weighted estimate (2% / 8% / 90%) | ≈ ¥0.0632 | ≈ ¥0.8700 | **92.7%** |
17
+
18
+ > This is a point-in-time example, not a guarantee of persistent savings. OpenRouter provider quotes, DeepSeek pricing, and FX rates can all change; check the live recommendations and [DeepSeek's official pricing page](https://api-docs.deepseek.com/quick_start/pricing/). FX reference: [USD/CNY on 2026-08-25](https://www.investing.com/currencies/usd-cny-historical-data).
19
+
9
20
  [中文](./README.md) · **English**
10
21
 
11
22
  ![OpenRouter provider ranking](./docs/images/provider-panel.png)
@@ -17,7 +28,7 @@ It combines quantization, speed, cache-heavy pricing, context, and uptime into a
17
28
  - Model-aware ranking without a hard-coded model catalog.
18
29
  - Best overall, price-first, speed-first, and context-first strategies.
19
30
  - Code Agent price blend: 2% input, 8% output, 90% cache-read by default.
20
- - Gentle 30-minute uptime safety bands and hard filtering for unavailable endpoints.
31
+ - Continuous, gentle 30-minute uptime penalties and hard filtering for unavailable endpoints.
21
32
  - One-click switching for the active session and deployment default.
22
33
  - Linked percentage sliders with locks; each group always totals 100%.
23
34
  - Reuses DSH credential references; API keys never reach the browser.
@@ -78,13 +89,14 @@ cost = input price × 2% + output price × 8% + cache-read price × 90%
78
89
  | OpenRouter trailing 30-minute uptime | Score retained |
79
90
  | --- | ---: |
80
91
  | ≥99.5% | 100% |
81
- | 99–99.5% | 85% |
82
- | 97–99% | 60% |
83
- | 90–97% | 30% |
84
- | <90% | 5% |
85
- | Missing | 70% |
92
+ | 99–99.5% | 97%–100% (continuous) |
93
+ | 98–99% | 90%–97% (continuous) |
94
+ | 95–98% | 75%–90% (continuous) |
95
+ | 90–95% | 50%–75% (continuous) |
96
+ | <90% | 10%–50% (continuous) |
97
+ | Missing | 85% |
86
98
 
87
- Endpoints with nonzero status are excluded. User settings may make penalties stricter, never looser.
99
+ Endpoints with nonzero status are excluded. Configured penalties ramp in across five percentage points below the threshold and combine with the stricter general curve.
88
100
 
89
101
  ## Credentials and security
90
102
 
@@ -102,7 +114,7 @@ Only official OpenRouter APIs are used: `/models`, `/models/{id}/endpoints`, and
102
114
  ## Development
103
115
 
104
116
  ```bash
105
- git clone https://github.com/xuanfengtechx/dsh-openrouter-provider-advisor.git
117
+ git clone https://github.com/xuan666-lab/dsh-openrouter-provider-advisor.git
106
118
  cd dsh-openrouter-provider-advisor
107
119
  npm install
108
120
  npm run verify
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-openrouter-provider-advisor",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "DSH web plugin that ranks OpenRouter upstream providers by quality, speed, cache-heavy price, context, and uptime, then safely switches the active route.",
5
5
  "keywords": [
6
6
  "deepseek-harness",
@@ -12,11 +12,11 @@
12
12
  ],
13
13
  "repository": {
14
14
  "type": "git",
15
- "url": "git+https://github.com/xuanfengtechx/dsh-openrouter-provider-advisor.git"
15
+ "url": "git+https://github.com/xuan666-lab/dsh-openrouter-provider-advisor.git"
16
16
  },
17
- "homepage": "https://github.com/xuanfengtechx/dsh-openrouter-provider-advisor#readme",
17
+ "homepage": "https://github.com/xuan666-lab/dsh-openrouter-provider-advisor#readme",
18
18
  "bugs": {
19
- "url": "https://github.com/xuanfengtechx/dsh-openrouter-provider-advisor/issues"
19
+ "url": "https://github.com/xuan666-lab/dsh-openrouter-provider-advisor/issues"
20
20
  },
21
21
  "publishConfig": {
22
22
  "access": "public"