fix:修复token不显示
This commit is contained in:
1 parent
9b3a91daae
commit
78e334055a
3 files changed
+10
-1
No files matched your search
@@ -76,6 +76,9 @@ export function parseUsageFromJson(payload: unknown): NormalizedUsage | null {
|
||||
const data = payload as Record<string, unknown>;
|
||||
const usage =
|
||||
data.usage ??
|
||||
(data.response && typeof data.response === "object"
|
||||
? (data.response as Record<string, unknown>).usage
|
||||
: null) ??
|
||||
(data.data && typeof data.data === "object"
|
||||
? (data.data as Record<string, unknown>).usage
|
||||
: null);
|
||||
|
||||
@@ -89,6 +89,12 @@
|
||||
- 类型: 微调(无方案包)
|
||||
- 文件: apps/worker/src/routes/proxy.ts
|
||||
|
||||
## [0.8.2] - 2026-02-23
|
||||
|
||||
### 修复
|
||||
- **[proxy]**: Responses 流式 usage 解析支持 `response.usage`
|
||||
- 方案: [202602230044_usage-parse-fix](archive/2026-02/202602230044_usage-parse-fix/)
|
||||
|
||||
## [0.8.1] - 2026-02-23
|
||||
|
||||
### 变更
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
- 按渠道权重随机排序
|
||||
- 调用令牌按顺序选择,未配置时回退 `channels.api_key`
|
||||
- done-hub 仅使用 `base_url`,不再按多地址切换
|
||||
- 支持从非流式 JSON、响应头与流式 SSE 解析 usage 字段
|
||||
- 支持从非流式 JSON、响应头与流式 SSE(含 `response.usage`)解析 usage 字段
|
||||
- 流式请求自动补 `stream_options.include_usage=true` 以便上游返回 usage
|
||||
- 对 `/v1/responses` 且上游返回 400/404 时回退为 `/responses` 重试一次
|
||||
- 可配置失败重试轮询(响应 5xx/429 时触发)
|
||||
|
||||
Reference in new issue
Block a user