fawney19
1dac4cb156
refactor: optimize provider query and stats aggregation logic
2025-12-17 16:41:10 +08:00
fawney19
50abb55c94
fix(models): clear form state when loading model data for edit
...
Reset model selection, search query, and expanded provider state
when switching to edit mode to prevent stale UI state carrying over
from previous operations. Also ensure tieredPricing is properly set
or reset based on model data.
2025-12-16 18:42:58 +08:00
fawney19
73d3c9d3e4
ui(models): display model ID in global model form dialog
...
Show model ID below model name in the dropdown list for better clarity
when selecting models, with appropriate text styling for selected state.
2025-12-16 18:36:23 +08:00
fawney19
d24c3885ab
feat(admin): add config and user data import/export functionality
...
Add comprehensive import/export endpoints for:
- Provider and model configuration (with key decryption for export)
- User data and API keys (preserving encrypted data)
Includes merge modes (skip/overwrite/error) for conflict handling,
10MB size limit for imports, and automatic cache invalidation.
Also fix optional field in GlobalModelResponse tiered_pricing.
2025-12-16 18:33:14 +08:00
fawney19
46ff5a1a50
refactor(models): enhance model management with official provider marking and extended metadata
...
- Add OFFICIAL_PROVIDERS set to mark first-party vendors in models.dev
- Implement official provider marking function with cache compatibility
- Extend model metadata with family, context_limit, output_limit fields
- Improve frontend model selection UI with wider panel and better search
- Add dark mode support for provider logos
- Optimize scrollbar styling for model lists
- Update deployment documentation with clearer migration steps
2025-12-16 17:28:40 +08:00
fawney19
33265b4b13
refactor(global-model): migrate model metadata to flexible config structure
...
将模型配置从多个固定字段(description, official_url, icon_url, default_supports_* 等)
统一为灵活的 config JSON 字段,提高扩展性。同时优化前端模型创建表单,支持从 models-dev
列表直接选择模型快速填充。
主要变更:
- 后端:模型表迁移,支持 config JSON 存储模型能力和元信息
- 前端:GlobalModelFormDialog 支持两种创建方式(列表选择/手动填写)
- API 类型更新,对齐新的数据结构
2025-12-16 12:21:21 +08:00
fawney19
f1e3c2ab11
feat(frontend-usage): enhance usage UI with first byte latency metrics
...
- Update usage records table to display first_byte_time_ms metrics
- Improve request timeline visualization for latency tracking
- Extend usage types for new timing information
2025-12-16 02:39:54 +08:00
fawney19
3d583b0a8d
refactor(ui): rename alias to mapping terminology for consistency
2025-12-15 20:41:56 +08:00
fawney19
3296d026e3
fix(frontend): only show model mapping when actual model differs from requested model
2025-12-15 15:05:30 +08:00
fawney19
03ee6c16d9
refactor(frontend): refactor model management with aliases, remove mappings UI
2025-12-15 14:30:42 +08:00
fawney19
743f23e640
feat(frontend): add ModelAliasDialog component for alias management
2025-12-15 14:30:31 +08:00
fawney19
9ca845f9d0
refactor(frontend): optimize feature components (models, providers, usage)
2025-12-14 00:16:02 +08:00
fawney19
c55058758b
refactor(frontend): 补充优化剩余组件
...
- 优化 TooltipContent 组件
- 改进 ModelsTab 和 UserModelDetailDrawer 组件
2025-12-14 00:16:02 +08:00
fawney19
113441780e
refactor(frontend): 优化 Users 功能模块
...
- 改进 UserFormDialog 组件
2025-12-14 00:16:02 +08:00
fawney19
a75b983419
refactor(frontend): 优化 Usage 功能模块可组合函数
...
- 改进 useUsageData 和 useUsageFilters composables
2025-12-14 00:16:02 +08:00
fawney19
63e1a0d823
refactor(frontend): 优化 Usage 功能模块组件
...
- 改进 HorizontalRequestTimeline, IntervalTimelineCard, RequestDetailDrawer 等组件
- 优化表格展示组件
2025-12-14 00:16:02 +08:00
fawney19
737ab3b530
refactor(frontend): 优化 Providers 功能模块
...
- 改进 ProviderFormDialog, KeyFormDialog, EndpointFormDialog 等组件
- 优化 ModelsTab 组件
2025-12-14 00:16:02 +08:00
fawney19
730209acc6
refactor(frontend): 优化 Models 功能模块
...
- 改进 ModelDetailDrawer 和 AliasDialog 组件
2025-12-14 00:16:02 +08:00
fawney19
3f82b6d7c6
refactor(frontend): 优化 API Keys 功能模块
...
- 改进 StandaloneKeyFormDialog 组件
2025-12-14 00:16:02 +08:00
fawney19
ca60202636
fix: 修复链路追踪密钥显示和默认选中逻辑
...
1. 修复密钥脱敏显示问题:先解密再脱敏,避免显示加密后的 base64 数据
2. 优化详情默认选中逻辑:优先显示最后一个有效结果(成功/失败),而非未执行/跳过
2025-12-14 00:16:02 +08:00
fawney19
06c0a47b21
refactor(frontend): 优化功能模块组件
...
- 更新 api-keys 模块: StandaloneKeyFormDialog
- 改进 auth 模块: LoginDialog
- 优化 models 模块: AliasDialog, GlobalModelFormDialog, ModelDetailDrawer, TieredPricingEditor
- 重构 providers 模块: 多个表单和对话框组件
- 更新 usage 模块: 时间线、表格和详情组件
- 调整 users 模块: UserFormDialog
2025-12-12 16:15:36 +08:00
fawney19
e902595d58
refactor(frontend): 优化工具函数和 mock handler
...
- 更新 format.ts 工具函数
- 调整 mock handler 和 useDateRange composable
2025-12-12 16:14:49 +08:00
fawney19
06bd178244
fix: TieredPricingEditor 缓存价格处理优化
...
- 缓存价格计算精度从 2 位小数改为 4 位,支持更精细的价格
- 分离 syncToParent 和 getFinalTiers 职责:
- syncToParent: 只同步用户实际输入的值
- getFinalTiers: 提交时获取包含自动计算的最终数据
- GlobalModelFormDialog 和 ProviderModelFormDialog 提交时调用 getFinalTiers
2025-12-12 15:43:00 +08:00
fawney19
93eeedfcfa
fix: 限制散点图图例显示数量,防止溢出
2025-12-11 21:36:39 +08:00
fawney19
0e8bf0a23b
feat: 请求间隔散点图按模型区分颜色
...
- 后端 get_interval_timeline 接口返回数据添加 model 字段
- 前端散点图按模型分组显示不同颜色的数据点
- 横线统计信息支持按模型分别显示统计数据
- 管理员视图保持按用户分组,用户视图按模型分组
- 更新 mock 数据支持模型字段
2025-12-11 21:33:39 +08:00
fawney19
6e8107e340
fix: 修复管理员散点图只显示部分用户的问题
...
- 改为按比例采样,保持各用户数据量比例不变
- 散点图默认时间从7天改为当天(24小时)
- limit 从 2000 提高到 10000
2025-12-11 19:34:56 +08:00
fawney19
cc4e28ad16
feat: 添加使用量统计和数据分析功能
2025-12-11 17:52:32 +08:00
fawney19
ee8614919e
style: 优化前端 UI 布局和样式
...
- MainLayout 增加间距优化,改善页面布局
- ModelDetailDrawer 调整样式细节,提升用户体验
2025-12-11 10:05:53 +08:00
fawney19
6016f08d1c
feat: 前端新增 Demo 模式支持
...
- 新增 demo 配置模块,支持静态托管环境(GitHub Pages/Vercel/Netlify)
- API client 集成自定义 adapter,Demo 模式下自动拦截请求返回 mock 数据
- 登录对话框适配 Demo 模式,显示演示账号提示信息
- 添加完整的 mock 数据处理器(用户、配额、用量、供应商等)
- 同步 token 状态到 mock handler,支持页面刷新后恢复会话
2025-12-11 10:03:10 +08:00
fawney19
f784106826
Initial commit
2025-12-10 20:52:44 +08:00