{"id":43041995,"url":"https://github.com/issueye/open_cc","last_synced_at":"2026-02-02T14:01:16.497Z","repository":{"id":334918687,"uuid":"1143129007","full_name":"issueye/open_cc","owner":"issueye","description":"OpenCC 是一个功能强大的 Anthropic 协议转换代理工具，旨在将 Anthropic API 请求无缝转换为 OpenAI 格式，并提供企业级的令牌管理、使用统计和监控界面","archived":false,"fork":false,"pushed_at":"2026-01-28T03:25:14.000Z","size":995,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-31T20:52:49.101Z","etag":null,"topics":["ai","anthropic","golang","openai","wails"],"latest_commit_sha":null,"homepage":"","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/issueye.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-27T07:50:50.000Z","updated_at":"2026-01-28T03:25:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"d86cfb7c-5ae2-4684-9013-f5c623b95db7","html_url":"https://github.com/issueye/open_cc","commit_stats":null,"previous_names":["issueye/open_cc"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/issueye/open_cc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/issueye%2Fopen_cc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/issueye%2Fopen_cc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/issueye%2Fopen_cc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/issueye%2Fopen_cc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/issueye","download_url":"https://codeload.github.com/issueye/open_cc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/issueye%2Fopen_cc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28978718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T12:13:08.691Z","status":"ssl_error","status_checked_at":"2026-02-01T12:13:08.356Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","anthropic","golang","openai","wails"],"created_at":"2026-01-31T09:15:07.650Z","updated_at":"2026-02-01T13:00:44.982Z","avatar_url":"https://github.com/issueye.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenCC - Anthropic to OpenAI Proxy\n\nOpenCC 是一个功能强大的 Anthropic 协议转换代理工具，旨在将 Anthropic API 请求无缝转换为 OpenAI 格式，并提供企业级的令牌管理、使用统计和监控界面。\n\n![OpenCC](./build/icon.ico)\n\n## 🌟 核心特性\n\n- **协议转换**：完美支持 Anthropic 的 Messages API 和 Legacy Completions API。\n- **深度兼容**：\n  - 支持 **Reasoning Content**（如 DeepSeek R1 的思维过程输出）。\n  - 支持 **工具调用 (Tool Use)**，包括流式模式下的工具调用转换。\n  - 支持 **Token 计数** 接口 (`/v1/messages/count_tokens`)。\n- **企业级令牌系统**：\n  - 多令牌管理：支持创建多个 Access Token。\n  - 额度限制：实时追踪令牌的 Token 使用量和请求次数。\n  - 状态管理：一键启用或禁用特定令牌。\n- **高可用保障**：\n  - **智能重试**：针对网络波动、429 (限流) 及 5xx (服务器错误) 自动进行指数退避重试。\n  - **网络优化**：支持配置 HTTP 代理，优化空闲连接超时设置。\n- **全方位监控**：\n  - **实时日志**：记录每一次请求的详细信息，包括 **请求 Body**、状态码、耗时和模型映射。\n  - **使用统计**：按供应商和模型维度统计 Token 消耗。\n- **桌面级体验**：\n  - 基于 **Wails (Go + Vue 3)** 构建，提供流畅的桌面管理界面。\n  - **系统托盘支持**：点击关闭按钮自动最小化到托盘，后台持续运行；右键托盘菜单可快速显示或彻底退出。\n\n## 📊 界面预览\n\n### 控制台\n\n\u003cimg src=\"docs/images/控制台.png\" width=\"800\" alt=\"控制台界面\"/\u003e\n\n### 供应商管理\n\n\u003cimg src=\"docs/images/供应商.png\" width=\"800\" alt=\"供应商管理界面\"/\u003e\n\u003cimg src=\"docs/images/添加供应商.png\" width=\"800\" alt=\"添加供应商界面\"/\u003e\n\n### 日志监控\n\n\u003cimg src=\"docs/images/日志.png\" width=\"800\" alt=\"日志监控界面\"/\u003e\n\n### 系统设置\n\n\u003cimg src=\"docs/images/设置.png\" width=\"800\" alt=\"系统设置界面\"/\u003e\n\n## 🚀 快速开始\n\n### 依赖要求\n\n- [Go](https://golang.org/dl/) (1.23+)\n- [Node.js](https://nodejs.org/en/download/) (用于前端开发)\n- [Wails CLI](https://wails.io/docs/gettingstarted/installation)\n\n### 开发模式运行\n\n```bash\nwails dev\n```\n\n### 编译打包\n\n```bash\nwails build\n```\n\n## 🛠️ 配置说明\n\n- **数据库**：使用 SQLite 本地数据库，文件默认存储在用户目录下的 `.open_cc/config.db`。\n- **模型映射**：通过管理界面灵活配置源模型（Anthropic 格式）与目标模型（OpenAI 格式）的映射关系。\n- **自动路由**：支持 `provider/model` 格式的自动路由功能。\n\n## 📅 后续开发计划\n\n- [ ] **多端同步**：支持配置云端同步，实现多设备间映射关系与令牌同步。\n- [ ] **增强缓存**：引入 Redis 缓存支持（可选），进一步提升高并发场景下的令牌验证效率。\n- [ ] **更精细的配额管理**：支持设置令牌的过期时间、总配额（按金额或 Token）以及每分钟请求数 (RPM) 限制。\n- [ ] **自定义转换插件**：提供插件机制，允许用户针对特定非标准模型编写自定义的协议转换逻辑。\n- [ ] **多语言支持**：界面国际化 (i18n)，支持英文、日文等更多语言。\n- [ ] **导出/导入功能**：支持将配置、供应商信息及令牌导出为 JSON/CSV 格式，方便备份与迁移。\n\n## 🤝 鸣谢\n\n本项目在开发过程中参考了以下优秀项目：\n\n- [one-api](https://github.com/songquanpeng/one-api)：令牌管理与多渠道分发的设计灵感。\n- [ShakaRover/OpenCC](https://github.com/ShakaRover/OpenCC)：Anthropic 协议转换逻辑与 DeepSeek 兼容性处理。\n\n## 📄 开源协议\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fissueye%2Fopen_cc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fissueye%2Fopen_cc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fissueye%2Fopen_cc/lists"}