fix: 修正 PR #217 合并后的两个细节问题

- user_me usage 接口文档注释补充 summary_by_provider 字段说明
- 导出配置中 internal_priority 为 NULL 时映射为 inf,保持与原 SQL NULLS LAST 一致
This commit is contained in:
fawney19
2026-03-10 23:33:02 +08:00
parent e2ec3f7942
commit 6235c772ac
2 changed files with 2 additions and 1 deletions

View File

@@ -1014,7 +1014,7 @@ class AdminExportConfigAdapter(AdminApiAdapter):
keys = sorted(
provider.api_keys,
key=lambda key: (
key.internal_priority if key.internal_priority is not None else 0,
key.internal_priority if key.internal_priority is not None else float("inf"),
_normalize_created_at_for_sort(key.created_at),
),
)

View File

@@ -231,6 +231,7 @@ async def get_my_usage(
- `total_tokens`: 总 Token 数
- `total_cost`: 总成本USD
- `summary_by_model`: 按模型分组统计
- `summary_by_provider`: 按提供商分组统计
- `records`: 详细使用记录列表
- `pagination`: 分页信息
"""