@lynn123411/dsh-a6api 1.5.0 → 1.5.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.
@@ -5,6 +5,13 @@ export declare function cleanBaseUrl(url: string): string;
5
5
  export declare function formatRelativeTime(timestampSec: number): string;
6
6
  /** Format CNY Price */
7
7
  export declare function formatCnyPrice(micros: number, exchangeRate?: number): string;
8
+ /**
9
+ * 混合价估算(¥ / 1亿 tokens,供模型卡片徽标展示,换算与口径同官网标注脚本):
10
+ * 输入类 token 占 99.65%,按 24h 实测缓存命中率分为「命中 × 缓存读价」与「未命中 × 输入价」,
11
+ * 输出固定占 0.35% × 输出价。单价按 micros/1e6 × 汇率折算为 ¥/1M;
12
+ * 三类单价全为 0(按次计费等无 token 单价)时返回 undefined,前端不展示。
13
+ */
14
+ export declare function computeBlendedPrice100m(inMicros: number, cacheReadMicros: number, outMicros: number, cacheHitRatePct: number, exchangeRate: number): number | undefined;
8
15
  export declare function buildWebHeaders(userId?: string, accessToken?: string): Record<string, string>;
9
16
  /** Fetch User Balance (Real Account Balance Only) */
10
17
  export declare function fetchBalance(baseURL: string, apiKey: string, userId?: string, accessToken?: string): Promise<BalanceInfo | null>;
@@ -126,6 +126,8 @@ export interface MerchantChannelInfo {
126
126
  p50_ttft_ms?: number;
127
127
  recent_p50_ms: number;
128
128
  cache_hit_rate_pct: number;
129
+ /** 混合价估算(¥ / 1亿 tokens):输入类 99.65% 按 24h 缓存命中率分为命中(缓存读价)/未命中(输入价),输出固定占 0.35%;无 token 单价时缺省不展示 */
130
+ blended_price_100m_cny?: number;
129
131
  labels: string[];
130
132
  last_success_at: number;
131
133
  last_success_text: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynn123411/dsh-a6api",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "A6API 多模型聚合站接入插件:原生 LLM 提供商注册、账户实时余额与价格波动监控、Token 白名单同步、商户线路探测与全景指标卡片",
5
5
  "license": "MIT",
6
6
  "author": "lynn123411",