feat: 多平台 Coding Plan 统一管理系统初始实现

- 支持 MiniMax/OpenAI/Google Gemini/智谱/Kimi 五个平台
- 插件化 Provider 架构,自动发现注册
- 多维度 QuotaRule 额度追踪(固定间隔/自然周期/API同步/手动)
- OpenAI + Anthropic 兼容 API 代理,SSE 流式转发
- Model 路由表 + 额度耗尽自动 fallback
- 多媒体任务队列(图片/语音/视频)
- Vue3 + Tailwind 单文件 Web 仪表盘
- Docker 一键部署

Made-with: Cursor
This commit is contained in:
锦麟 王
2026-03-31 15:50:42 +08:00
commit 61ce809634
28 changed files with 2804 additions and 0 deletions

99
config.yaml Normal file
View File

@@ -0,0 +1,99 @@
server:
host: "0.0.0.0"
port: 8080
proxy_api_key: "sk-plan-manage-change-me"
database:
path: "./data/plan_manage.db"
storage:
path: "./data/files"
plans:
- name: "Kimi Coding Plan"
provider: kimi
api_key: ""
api_base: "https://api.moonshot.cn/v1"
plan_type: coding
supported_models: ["moonshot-v1-8k", "moonshot-v1-32k", "moonshot-v1-128k"]
extra_headers: {}
extra_config: {}
quota_rules:
- rule_name: "周额度"
quota_total: 500
quota_unit: requests
refresh_type: calendar_cycle
calendar_unit: weekly
calendar_anchor: { weekday: 1, hour: 0 }
- rule_name: "5小时滚动窗口"
quota_total: 50
quota_unit: requests
refresh_type: fixed_interval
interval_hours: 5
- name: "MiniMax Token Plan"
provider: minimax
api_key: ""
api_base: "https://api.minimax.chat/v1"
plan_type: token
supported_models: ["MiniMax-Text-01", "abab6.5s-chat"]
extra_headers: {}
extra_config: {}
quota_rules:
- rule_name: "月额度"
quota_total: 10000000
quota_unit: tokens
refresh_type: calendar_cycle
calendar_unit: monthly
calendar_anchor: { day: 1, hour: 0 }
- rule_name: "13小时滚动窗口"
quota_total: 1000000
quota_unit: tokens
refresh_type: fixed_interval
interval_hours: 13
- name: "GPT Go Plan"
provider: openai
api_key: ""
api_base: "https://api.openai.com/v1"
plan_type: coding
supported_models: ["gpt-4o", "gpt-4o-mini", "o3-mini"]
extra_headers: {}
extra_config: {}
quota_rules:
- rule_name: "月额度"
quota_total: 10000000
quota_unit: tokens
refresh_type: calendar_cycle
calendar_unit: monthly
calendar_anchor: { day: 1, hour: 0 }
- name: "Google One AI Premium"
provider: google
api_key: ""
api_base: "https://generativelanguage.googleapis.com/v1beta"
plan_type: subscription
supported_models: ["gemini-2.0-flash", "gemini-2.0-pro"]
extra_headers: {}
extra_config: {}
quota_rules:
- rule_name: "每日请求限制"
quota_total: 1500
quota_unit: requests
refresh_type: calendar_cycle
calendar_unit: daily
calendar_anchor: { hour: 0 }
- name: "智谱 Coding Plan"
provider: zhipu
api_key: ""
api_base: "https://open.bigmodel.cn/api/paas/v4"
plan_type: coding
supported_models: ["glm-4-plus", "glm-4-flash"]
extra_headers: {}
extra_config: {}
quota_rules:
- rule_name: "月额度"
quota_total: 5000000
quota_unit: tokens
refresh_type: api_sync