[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-justlovemaki--AIClient-2-API":3,"tool-justlovemaki--AIClient-2-API":64},[4,17,26,36,44,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",143909,2,"2026-04-07T11:33:18",[13,14,15],"开发框架","Agent","语言模型","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":10,"last_commit_at":23,"category_tags":24,"status":16},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[25,13],"插件",{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":16},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,3,"2026-04-06T11:19:32",[15,35,14,13],"图像",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":10,"last_commit_at":42,"category_tags":43,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,15],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":10,"last_commit_at":50,"category_tags":51,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",85013,"2026-04-06T11:09:19",[35,52,53,25,14,54,15,13,55],"数据工具","视频","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":32,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[14,35,13,15,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":70,"readme_en":71,"readme_zh":72,"quickstart_zh":73,"use_case_zh":74,"hero_image_url":75,"owner_login":76,"owner_name":77,"owner_avatar_url":78,"owner_bio":79,"owner_company":80,"owner_location":81,"owner_email":82,"owner_twitter":83,"owner_website":84,"owner_url":85,"languages":86,"stars":117,"forks":118,"last_commit_at":119,"license":120,"difficulty_score":10,"env_os":121,"env_gpu":122,"env_ram":122,"env_deps":123,"category_tags":128,"github_topics":129,"view_count":10,"oss_zip_url":83,"oss_zip_packed_at":83,"status":16,"created_at":132,"updated_at":133,"faqs":134,"releases":164},5222,"justlovemaki\u002FAIClient-2-API","AIClient-2-API","Simulates Gemini CLI, Antigravity, Codex, Grok, and Kiro client requests, compatible with the OpenAI API. It supports thousands of Gemini model requests per day and offers free use of the built-in Claude model in Kiro. Easily connect to any client via the API, making AI development more efficient!","AIClient-2-API 是一款强大的代理工具，旨在将 Gemini CLI、Antigravity、Codex、Grok 和 Kiro 等仅支持特定客户端的大模型服务，统一封装为标准的 OpenAI API 接口。它通过模拟各类客户端的请求行为，让用户能够轻松连接原本难以直接调用的模型资源。\n\n这一工具主要解决了大模型生态中接口标准不统一、部分优质模型缺乏通用 API 支持的痛点。开发者无需再为适配不同平台的私有协议而耗费精力，即可在一个统一的框架下调用多种模型。特别值得一提的是，它不仅支持每日数千次的 Gemini 模型请求，还允许用户免费使用 Kiro 内置的 Claude 模型，极大降低了测试与开发成本。\n\nAIClient-2-API 非常适合 AI 应用开发者、研究人员以及需要快速集成多模型能力的技术团队。无论是构建聊天机器人、代码辅助工具，还是进行模型效果对比研究，它都能提供高效、稳定的后端支持。其基于 Node.js 开发，支持 Docker 部署，具备开箱即用的便利性，同时遵循 GPL v3 开源协议，社区活跃且文档完善。通过该工具，用户可以更专注于业务逻辑创新，","AIClient-2-API 是一款强大的代理工具，旨在将 Gemini CLI、Antigravity、Codex、Grok 和 Kiro 等仅支持特定客户端的大模型服务，统一封装为标准的 OpenAI API 接口。它通过模拟各类客户端的请求行为，让用户能够轻松连接原本难以直接调用的模型资源。\n\n这一工具主要解决了大模型生态中接口标准不统一、部分优质模型缺乏通用 API 支持的痛点。开发者无需再为适配不同平台的私有协议而耗费精力，即可在一个统一的框架下调用多种模型。特别值得一提的是，它不仅支持每日数千次的 Gemini 模型请求，还允许用户免费使用 Kiro 内置的 Claude 模型，极大降低了测试与开发成本。\n\nAIClient-2-API 非常适合 AI 应用开发者、研究人员以及需要快速集成多模型能力的技术团队。无论是构建聊天机器人、代码辅助工具，还是进行模型效果对比研究，它都能提供高效、稳定的后端支持。其基于 Node.js 开发，支持 Docker 部署，具备开箱即用的便利性，同时遵循 GPL v3 开源协议，社区活跃且文档完善。通过该工具，用户可以更专注于业务逻辑创新，而非繁琐的接口对接工作，从而显著提升 AI 开发效率。","\u003Cdiv align=\"center\">\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjustlovemaki_AIClient-2-API_readme_2489e50ec12c.webp\" alt=\"logo\"  style=\"width: 128px; height: 128px;margin-bottom: 3px;\">\n\n# AIClient-2-API 🚀\n\n**A powerful proxy that can unify the requests of various client-only large model APIs (Gemini CLI, Antigravity, Codex, Grok, Kiro ...), simulate requests, and encapsulate them into a local OpenAI-compatible interface.**\n\n\u003Ca href=\"https:\u002F\u002Ftrendshift.io\u002Frepositories\u002F15832\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjustlovemaki_AIClient-2-API_readme_4cc089988f35.png\" alt=\"justlovemaki%2FAIClient-2-API | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"\u002F>\u003C\u002Fa>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\n\u003Cdiv align=\"center\">\n\n\u003Ca href=\"https:\u002F\u002Fdeepwiki.com\u002Fjustlovemaki\u002FAIClient-2-API\">\u003Cimg src=\"https:\u002F\u002Fdeepwiki.com\u002Fbadge.svg\" alt=\"Ask DeepWiki\"  style=\"width: 134px; height: 23px;margin-bottom: 3px;\">\u003C\u002Fa>\n\n[![License: GPL v3](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-GPLv3-blue.svg)](https:\u002F\u002Fwww.gnu.org\u002Flicenses\u002Fgpl-3.0)\n[![Node.js](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FNode.js-≥20.0.0-green.svg)](https:\u002F\u002Fnodejs.org\u002F)\n[![Docker](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdocker-≥20.0.0-blue.svg)](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fjustlikemaki\u002Faiclient-2-api)\n[![GitHub stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fjustlovemaki\u002FAIClient-2-API.svg?style=flat&label=Star)](https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fstargazers)\n[![GitHub issues](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fissues\u002Fjustlovemaki\u002FAIClient-2-API.svg)](https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fissues)\n\n[**🔧 OpenClaw Config**](.\u002Fdocs\u002FOPENCLAW_CONFIG_GUIDE.md) | [中文](.\u002FREADME-ZH.md) | [**👉 English**](.\u002FREADME.md) | [日本語](.\u002FREADME-JA.md) | [**📚 Documentation**](https:\u002F\u002Faiproxy.justlikemaki.vip\u002Fen\u002F)\n\n\u003C\u002Fdiv>\n\n## 💎 Sponsors\n\n\u003Ctable width=\"100%\">\n  \u003Ctr>\n    \u003Ctd width=\"25%\" align=\"center\" valign=\"middle\">\n      \u003Ca href=\"https:\u002F\u002Fwww.packyapi.com\u002Fregister?aff=AIClient2API\">\n        \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjustlovemaki_AIClient-2-API_readme_566804b8936a.png\" alt=\"PackyCode Sponsor\" width=\"180\">\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd width=\"75%\" align=\"left\" valign=\"middle\">\n      PackyCode is a reliable and efficient API relay service provider, offering relay services for Claude Code, Codex, Gemini, and more. PackyCode provides special discounts for our software users: \u003Ca href=\"https:\u002F\u002Fwww.packyapi.com\u002Fregister?aff=AIClient2API\">register using this link\u003C\u002Fa> and enter the \u003Cstrong>AIClient2API\u003C\u002Fstrong> promo code during recharge to get \u003Cstrong>10% off\u003C\u002Fstrong>.\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd width=\"25%\" align=\"center\" valign=\"middle\">\n      \u003Ca href=\"https:\u002F\u002Fwww.aicodemirror.com\u002Fregister?invitecode=5BUE62\">\n        \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjustlovemaki_AIClient-2-API_readme_6558e7c7e39c.jpg\" alt=\"AICodeMirror Sponsor\" width=\"180\">\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd width=\"75%\" align=\"left\" valign=\"middle\">\n      Thanks to AICodeMirror for sponsoring this project! AICodeMirror provides official high-stability relay services for Claude Code \u002F Codex \u002F Gemini CLI, with enterprise-grade concurrency, fast invoicing, and 24\u002F7 dedicated technical support. Claude Code \u002F Codex \u002F Gemini official channels at 38% \u002F 2% \u002F 9% of original price, with extra discounts on top-ups! AICodeMirror offers special benefits for AIClient-2-API users: \u003Ca href=\"https:\u002F\u002Fwww.aicodemirror.com\u002Fregister?invitecode=5BUE62\">register via this link\u003C\u002Fa> to enjoy \u003Cstrong>20% off\u003C\u002Fstrong> your first top-up, and enterprise customers can get up to 25% off!\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd width=\"25%\" align=\"center\" valign=\"middle\">\n      \u003Ca href=\"https:\u002F\u002Fwww.lingtrue.com\u002Fregister?aff=MP34\">\n        \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjustlovemaki_AIClient-2-API_readme_5c32401013fc.png\" alt=\"LingtrueAPI Sponsor\" width=\"180\">\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd width=\"75%\" align=\"left\" valign=\"middle\">\n      Thanks to LingtrueAPI for its sponsorship of this project! LingtrueAPI is a global large-model API intermediary service platform that offers API calling services for various models such as Claude opus 4.6, GPT 5.4, and Gemini 3.1 pro. It is committed to enabling users to connect to global AI capabilities at low cost and with high stability, maximizing production efficiency. LingtrueAPI provides special discounts for users of this software: \u003Ca href=\"https:\u002F\u002Fwww.lingtrue.com\u002Fregister?aff=MP34\">register using this link\u003C\u002Fa> and enter the \u003Cstrong>LingtrueAPI\u003C\u002Fstrong> promo code when making the first recharge to enjoy a \u003Cstrong>10% discount\u003C\u002Fstrong>.\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd width=\"25%\" align=\"center\" valign=\"middle\">\n      \u003Ca href=\"https:\u002F\u002Fpoixe.com\u002Fi\u002Febmvga\">\n        \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjustlovemaki_AIClient-2-API_readme_869c6eef2c28.png\" alt=\"Poixe AI Sponsor\" width=\"180\">\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd width=\"75%\" align=\"left\" valign=\"middle\">\n      Poixe AI provides reliable LLM API services. You can leverage the platform's API endpoints to seamlessly build AI-powered products. Additionally, you can become a vendor by providing AI API resources to the platform and earn revenue. \u003Ca href=\"https:\u002F\u002Fpoixe.com\u002Fi\u002Febmvga\">Register through the exclusive AIClient-2-API referral link\u003C\u002Fa> and receive a bonus of \u003Cstrong>$5 USD\u003C\u002Fstrong> on your first top-up.\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd width=\"25%\" align=\"center\" valign=\"middle\">\n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjustlovemaki_AIClient-2-API_readme_aa0855a63bbe.png\" alt=\"Sponsor Contact\" width=\"150\">\n    \u003C\u002Ftd>\n    \u003Ctd width=\"75%\" align=\"left\" valign=\"middle\">\n      \u003Cstrong>Become a Sponsor\u003C\u002Fstrong>\u003Cbr>\n      If you would like to sponsor this project, please scan the WeChat QR code on the left (Please state your intent: \u003Cstrong>Sponsorship\u003C\u002Fstrong>).\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n---\n\n## 🚀 Overview\n\n`AIClient2API` is an API proxy service that breaks through client limitations, converting free large models originally restricted to client use only (such as Gemini, Antigravity, Codex, Grok, Kiro) into standard OpenAI-compatible interfaces that can be called by any application. Built on Node.js, it supports intelligent conversion between OpenAI, Claude, and Gemini protocols, enabling tools like Cherry-Studio, NextChat, and Cline to freely use advanced models such as Claude Opus 4.5, Gemini 3.0 Pro, and Qwen3 Coder Plus at scale. The project adopts a modular architecture based on strategy and adapter patterns, with built-in account pool management, intelligent polling, automatic failover, and health check mechanisms, ensuring 99.9% service availability.\n\n> [!NOTE]\n> **🎉 Important Milestone**\n>\n> - Thanks to Ruan Yifeng for the recommendation in [Weekly Issue 359](https:\u002F\u002Fwww.ruanyifeng.com\u002Fblog\u002F2025\u002F08\u002Fweekly-issue-359.html)\n>\n> **📅 Version Update Log**\n> \n> \u003Cdetails>\n> \u003Csummary>Click to expand detailed version history\u003C\u002Fsummary>\n> \n> - **2026.03.02** - Added Grok protocol support, supporting access to xAI Grok series models (Grok 3\u002F4) via Cookie\u002FSSO, supporting multimodal input, image\u002Fvideo generation, automatic token refresh and streaming output\n> - **2026.01.26** - Added Codex protocol support: supports OpenAI Codex OAuth authorization access\n> - **2026.01.25** - Enhanced AI Monitor plugin: supports monitoring request parameters and responses before and after AI protocol conversion. Optimized log management: unified log format, visual configuration\n> - **2026.01.15** - Optimized provider pool manager: added async refresh queue mechanism, buffer queue deduplication, global concurrency control, node warmup and automatic expiry detection\n> > - **2026.01.03** - Added theme switching functionality and optimized provider pool initialization, removed the fallback strategy of using provider default configuration\n> - **2025.12.30** - Added main process management and automatic update functionality\n> - **2025.12.25** - Unified configuration management: All configs centralized to `configs\u002F` directory. Docker users need to update mount path to `-v \"local_path:\u002Fapp\u002Fconfigs\"`\n> - **2025.12.11** - Automatically built Docker images are now available on Docker Hub: [justlikemaki\u002Faiclient-2-api](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fjustlikemaki\u002Faiclient-2-api)\n> - **2025.11.30** - Added Antigravity protocol support, enabling access to Gemini 3 Pro, Claude Sonnet 4.5, and other models via Google internal interfaces\n> - **2025.11.11** - Added Web UI management console, supporting real-time configuration management and health status monitoring\n> - **2025.11.06** - Added support for Gemini 3 Preview, enhanced model compatibility and performance optimization\n> - **2025.10.18** - Kiro open registration, new accounts get 500 credits, full support for Claude Sonnet 4.5\n> - **2025.09.01** - Integrated Qwen Code CLI, added `qwen3-coder-plus` model support\n> - **2025.08.29** - Released account pool management feature, supporting multi-account polling, intelligent failover, and automatic degradation strategies\n>   - Configuration: Add `PROVIDER_POOLS_FILE_PATH` parameter in `configs\u002Fconfig.json`\n>   - Reference configuration: [provider_pools.json](.\u002Fconfigs\u002Fprovider_pools.json.example)\n> - **History Developed**\n>   - Support Gemini CLI, Kiro and other client2API\n>   - OpenAI, Claude, Gemini three-protocol mutual conversion, automatic intelligent switching\n> \u003C\u002Fdetails>\n\n---\n\n## 💡 Core Advantages\n\n### 🎯 Unified Access, One-Stop Management\n*   **Multi-Model Unified Interface**: Through standard OpenAI-compatible protocol, configure once to access mainstream large models including Gemini, Claude, Grok, Codex, Kimi K2, MiniMax M2\n*   **Flexible Switching Mechanism**: Path routing, support dynamic model switching via startup parameters or environment variables to meet different scenario requirements\n*   **Zero-Cost Migration**: Fully compatible with OpenAI API specifications, tools like Cherry-Studio, NextChat, Cline can be used without modification\n*   **Multi-Protocol Intelligent Conversion**: Support intelligent conversion between OpenAI, Claude, and Gemini protocols for cross-protocol model invocation\n\n### 🚀 Break Through Limitations, Improve Efficiency\n*   **Bypass Official Restrictions**: Utilize OAuth authorization mechanism to effectively break through rate and quota limits of services like Gemini, Antigravity\n*   **TLS Fingerprint Bypass**: Built-in TLS Sidecar (Go uTLS) to simulate browser features, effectively bypassing Cloudflare 403 blocks for services like Grok\n*   **Free Advanced Models**: Use Claude Opus 4.5 for free via Kiro API mode, use Qwen3 Coder Plus via Qwen OAuth mode, reducing usage costs\n*   **Intelligent Account Pool Scheduling**: Support multi-account polling, automatic failover, and configuration degradation, ensuring 99.9% service availability\n\n### 🛡️ Secure and Controllable, Data Transparent\n*   **Full-Chain Log Recording**: Capture all request and response data, supporting auditing and debugging\n*   **Private Dataset Construction**: Quickly build proprietary training datasets based on log data\n*   **System Prompt Management**: Support override and append modes, achieving perfect combination of unified base instructions and personalized extensions\n\n### 🔧 Developer-Friendly, Easy to Extend\n*   **Web UI Management Console**: Real-time configuration management, health status monitoring, API testing and log viewing\n*   **Modular Architecture**: Based on strategy and adapter patterns, adding new model providers requires only 3 steps\n*   **Complete Test Coverage**: Integration and unit test coverage 90%+, ensuring code quality\n*   **Containerized Deployment**: Provides Docker support, one-click deployment, cross-platform operation\n\n---\n\n## 📑 Quick Navigation\n\n- [💡 Core Advantages](#-core-advantages)\n- [🚀 Quick Start](#-quick-start)\n  - [🐳 Docker Deployment](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fjustlikemaki\u002Faiclient-2-api)\n  - [📋 Core Features](#-core-features)\n- [🔐 Authorization Configuration Guide](#-authorization-configuration-guide)\n- [📁 Authorization File Storage Paths](#-authorization-file-storage-paths)\n- [⚙️ Advanced Configuration](#advanced-configuration)\n- [❓ FAQ](#-faq)\n- [📄 Open Source License](#-open-source-license)\n- [🙏 Acknowledgements](#-acknowledgements)\n- [⚠️ Disclaimer](#️-disclaimer)\n\n---\n\n## 🔧 Usage Instructions\n\n### 🚀 Quick Start\n\nThe most recommended way to use AIClient-2-API is to start it through an automated script and configure it visually directly in the **Web UI console**.\n\n#### 🐳 Docker Quick Start (Recommended)\n\n```bash\ndocker run -d -p 3000:3000 -p 8085-8086:8085-8086 -p 1455:1455 -p 19876-19880:19876-19880 --restart=always -v \"your_path:\u002Fapp\u002Fconfigs\" --name aiclient2api justlikemaki\u002Faiclient-2-api\n```\n\n**Parameter Description**:\n- `-d`: Run container in background\n- `-p 3000:3000 ...`: Port mapping. 3000 is for Web UI, others are for OAuth callbacks (Gemini: 8085, Antigravity: 8086, Codex: 1455, Kiro: 19876-19880)\n- `--restart=always`: Container auto-restart policy\n- `-v \"your_path:\u002Fapp\u002Fconfigs\"`: Mount configuration directory (replace \"your_path\" with actual path, e.g., `\u002Fhome\u002Fuser\u002Faiclient-configs`)\n- `--name aiclient2api`: Container name\n\n#### 🐳 Docker Compose Deployment\n\nYou can also use Docker Compose for deployment. First, navigate to the `docker` directory:\n\n```bash\ncd docker\nmkdir -p configs\ndocker compose up -d\n```\n\nTo build from source instead of using the pre-built image, edit `docker-compose.yml`:\n1. Comment out the `image: justlikemaki\u002Faiclient-2-api:latest` line\n2. Uncomment the `build:` section\n3. Run `docker compose up -d --build`\n\n#### 1. Run the startup script\n*   **Linux\u002FmacOS**: `chmod +x install-and-run.sh && .\u002Finstall-and-run.sh`\n*   **Windows**: Double-click `install-and-run.bat`\n\n> **💡 If the script fails, you can try manually installing dependencies and starting:**\n> ```bash\n> npm install\n> npm start\n> ```\n\n\n#### 2. Access the console\nAfter the server starts, open your browser and visit:\n👉 [**http:\u002F\u002Flocalhost:3000**](http:\u002F\u002Flocalhost:3000)\n\n> **Default Password**: `admin123` (can be changed in the console or by modifying the `pwd` file after login)\n\n#### 3. Visual Configuration (Recommended)\nGo to the **\"Configuration\"** page, you can:\n*   ✅ Fill in the API Key for each provider or upload OAuth credential files\n*   ✅ Switch default model providers in real-time\n*   ✅ Monitor health status and real-time request logs\n\n#### 4. Local Environment Preparation (Non-Docker Users)\nIf you are running directly on your local machine (via script or Node.js) and need to bypass TLS detection for services like Grok, please ensure:\n*   ✅ **Install Go Language**: Go to the [official Go website](https:\u002F\u002Fgo.dev\u002F) to download and install (1.20+).\n*   ✅ **Manually Compile Sidecar**: Execute the following command to compile the TLS proxy component:\n    ```bash\n    cd tls-sidecar && go build -o tls-sidecar && cd ..\n    ```\n    *Note: If this binary file is not compiled, the TLS Sidecar feature will fail to start as it cannot find the executable.*\n\n#### Script Execution Example\n```\n========================================\n  AI Client 2 API Quick Install Script\n========================================\n\n[Check] Checking if Node.js is installed...\n✅ Node.js is installed, version: v20.10.0\n✅ Found package.json file\n✅ node_modules directory already exists\n✅ Project file check completed\n\n========================================\n  Starting AI Client 2 API Server...\n========================================\n\n🌐 Server will start on http:\u002F\u002Flocalhost:3000\n📖 Visit http:\u002F\u002Flocalhost:3000 to view management interface\n⏹️  Press Ctrl+C to stop server\n```\n\n> **💡 Tip**: The script will automatically install dependencies and start the server. If you encounter any issues, the script provides clear error messages and suggested solutions.\n\n---\n\n### 📋 Core Features\n\n#### Web UI Management Console\n\n![Web UI](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjustlovemaki_AIClient-2-API_readme_b520d38f9a01.png)\n\nA functional Web management interface, including:\n\n**📊 Dashboard**: System overview, interactive routing examples, client configuration guide\n\n**⚙️ Configuration**: Real-time parameter modification, supporting all providers (Gemini, Antigravity, OpenAI, Claude, Kiro, Qwen), including advanced settings and file uploads\n\n**🔗 Provider Pools**: Monitor active connections, provider health statistics, enable\u002Fdisable management\n\n**📁 Config Files**: Centralized OAuth credential management, supporting search filtering and file operations\n\n**📜 Real-time Logs**: Real-time display of system and request logs, with management controls\n\n**🔐 Login Verification**: Default password `admin123`, can be modified via `pwd` file\n\nAccess: `http:\u002F\u002Flocalhost:3000` → Login → Sidebar navigation → Take effect immediately\n\n#### Multimodal Input Capabilities\nSupports various input types such as images and documents, providing you with a richer interaction experience and more powerful application scenarios.\n\n#### Latest Model Support\nSeamlessly support the following latest large models, just configure the corresponding endpoint in Web UI or [`configs\u002Fconfig.json`](.\u002Fconfigs\u002Fconfig.json):\n*   **Grok 3 \u002F Grok 4** - xAI's flagship models, now supported via Grok Cookie\u002FSSO, supporting thinking models, image generation, and video generation\n*   **Claude 4.5 Opus** - Anthropic's strongest model ever, now supported via Kiro, Antigravity\n*   **Gemini 3 Pro** - Google's next-generation architecture preview, now supported via Gemini, Antigravity\n*   **Qwen3 Coder Plus** - Alibaba Tongyi Qianwen's latest code-specific model, now supported via Qwen Code\n*   **Kimi K2 \u002F MiniMax M2** - Synchronized support for top domestic flagship models, now supported via custom OpenAI, Claude\n\n---\n\n### 🔐 Authorization Configuration Guide\n\n\u003Cdetails>\n\u003Csummary>Click to expand detailed authorization configuration steps for each provider\u003C\u002Fsummary>\n\n> **💡 Tip**: For the best experience, it is recommended to manage authorization visually through the **Web UI console**.\n\n#### 🌐 Web UI Quick Authorization (Recommended)\nIn the Web UI management interface, you can complete authorization configuration rapidly:\n1. **Generate Authorization**: On the **\"Provider Pools\"** page or **\"Configuration\"** page, click the **\"Generate Authorization\"** button in the upper right corner of the corresponding provider (e.g., Gemini, Qwen).\n2. **Scan\u002FLogin**: An authorization dialog will pop up, you can click **\"Open in Browser\"** for login verification. For Qwen, just complete the web login; for Gemini and Antigravity, complete the Google account authorization.\n3. **Auto-Save**: After successful authorization, the system will automatically obtain credentials and save them to the corresponding directory in `configs\u002F`. You can see the newly generated credentials on the **\"Config Files\"** page.\n4. **Visual Management**: You can upload or delete credentials at any time in the Web UI, or use the **\"Quick Associate\"** function to bind existing credential files to providers with one click.\n\n#### Gemini CLI OAuth Configuration\n1. **Obtain OAuth Credentials**: Visit [Google Cloud Console](https:\u002F\u002Fconsole.cloud.google.com\u002F) to create a project and enable Gemini API\n2. **Project Configuration**: You may need to provide a valid Google Cloud project ID, which can be specified via the startup parameter `--project-id`\n3. **Ensure Project ID**: When configuring in the Web UI, ensure the project ID entered matches the project ID displayed in the Google Cloud Console and Gemini CLI.\n\n#### Antigravity OAuth Configuration\n1. **Personal Account**: Personal accounts require separate authorization, application channels have been closed.\n2. **Pro Member**: Antigravity is temporarily open to Pro members, you need to purchase a Pro membership first.\n3. **Organization Account**: Organization accounts require separate authorization, contact the administrator to obtain authorization.\n\n#### Qwen Code OAuth Configuration\n1. **First Authorization**: After configuring the Qwen service, the system will automatically open the authorization page in the browser\n2. **Recommended Parameters**: Use official default parameters for best results\n   ```json\n   {\n     \"temperature\": 0,\n     \"top_p\": 1\n   }\n   ```\n\n#### Kiro API Configuration\n1. **Environment Preparation**: [Download and install Kiro client](https:\u002F\u002Fkiro.dev\u002Fpricing\u002F)\n2. **Complete Authorization**: Log in to your account in the client to generate `kiro-auth-token.json` credential file\n3. **Best Practice**: Recommended to use with **Claude Code** for optimal experience\n4. **Important Notice**: Kiro service usage policy has been updated, please visit the official website for the latest usage restrictions and terms\n\n#### Kiro Extended Thinking (Claude Models)\nAIClient-2-API supports Kiro extended thinking when using Claude-compatible requests (`\u002Fv1\u002Fmessages`) or OpenAI-compatible requests (`\u002Fv1\u002Fchat\u002Fcompletions`) routed to `claude-kiro-oauth`.\n\n**Claude-compatible (`\u002Fv1\u002Fmessages`)**:\n```bash\ncurl http:\u002F\u002Flocalhost:3000\u002Fclaude-kiro-oauth\u002Fv1\u002Fmessages \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"Authorization: Bearer your-api-key\" \\\n  -d '{\n    \"model\": \"claude-sonnet-4-5\",\n    \"max_tokens\": 1024,\n    \"thinking\": { \"type\": \"enabled\", \"budget_tokens\": 10000 },\n    \"messages\": [{ \"role\": \"user\", \"content\": \"Solve this step by step.\" }]\n  }'\n```\n\n**OpenAI-compatible (`\u002Fv1\u002Fchat\u002Fcompletions`)**:\n```bash\ncurl http:\u002F\u002Flocalhost:3000\u002Fclaude-kiro-oauth\u002Fv1\u002Fchat\u002Fcompletions \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"Authorization: Bearer your-api-key\" \\\n  -d '{\n    \"model\": \"claude-sonnet-4-5\",\n    \"messages\": [{ \"role\": \"user\", \"content\": \"Solve this step by step.\" }],\n    \"extra_body\": {\n      \"anthropic\": {\n        \"thinking\": { \"type\": \"enabled\", \"budget_tokens\": 10000 }\n      }\n    }\n  }'\n```\n\n**Adaptive mode**:\n- Claude: `\"thinking\": { \"type\": \"adaptive\", \"effort\": \"high\" }`\n- OpenAI: `\"extra_body.anthropic.thinking\": { \"type\": \"adaptive\", \"effort\": \"high\" }`\n\nNotes:\n- `budget_tokens` is clamped to `[1024, 24576]` (default `20000` if omitted\u002Finvalid).\n- Token acquisition\u002Frefresh\u002Fpool rotation is unchanged.\n\n#### Codex OAuth Configuration\n1. **Generate Authorization**: On the Web UI \"Provider Pools\" or \"Configuration\" page, click the \"Generate Authorization\" button for Codex\n2. **Browser Login**: The system opens the OpenAI Codex authorization page to complete OAuth login\n3. **Auto Save**: After successful authorization, the system automatically saves the Codex OAuth credential file\n4. **Callback Port**: Ensure the OAuth callback port `1455` is not occupied\n\n#### Grok Cookie\u002FSSO Configuration\n1. **Obtain SSO Token**: Log in to the [Grok official website](https:\u002F\u002Fgrok.com\u002F), copy the value of `sso` from Application -> Cookies in browser developer tools\n2. **Enter Configuration**: In the Web UI \"Configuration\" page or directly modify the configuration file, enter the token into `GROK_COOKIE_TOKEN`\n3. **Supported Features**:\n   - Chat and Thinking models (Grok 3 Thinking)\n   - Image generation (Grok Imagine)\n   - Video generation (Grok Video)\n4. **Notes**: Ensure `GROK_USER_AGENT` matches the browser used when obtaining the cookie to avoid being blocked\n\n#### Account Pool Management Configuration\n1. **Create Pool Configuration File**: Create a configuration file referencing [provider_pools.json.example](.\u002Fconfigs\u002Fprovider_pools.json.example)\n2. **Configure Pool Parameters**: Set `PROVIDER_POOLS_FILE_PATH` in `configs\u002Fconfig.json` to point to the pool configuration file\n3. **Startup Parameter Configuration**: Use the `--provider-pools-file \u003Cpath>` parameter to specify the pool configuration file path\n4. **Health Check**: The system will automatically perform periodic health checks and avoid using unhealthy providers\n\n\u003C\u002Fdetails>\n\n### 📁 Authorization File Storage Paths\n\n\u003Cdetails>\n\u003Csummary>Click to expand default storage locations for authorization credentials\u003C\u002Fsummary>\n\nDefault storage locations for authorization credential files of each service:\n\n| Service | Default Path | Description |\n|------|---------|------|\n| **Gemini** | `~\u002F.gemini\u002Foauth_creds.json` | OAuth authentication credentials |\n| **Kiro** | `~\u002F.aws\u002Fsso\u002Fcache\u002Fkiro-auth-token.json` | Kiro authentication token |\n| **Qwen** | `~\u002F.qwen\u002Foauth_creds.json` | Qwen OAuth credentials |\n| **Antigravity** | `~\u002F.antigravity\u002Foauth_creds.json` | Antigravity OAuth credentials (supports Claude 4.5 Opus) |\n| **Codex** | `~\u002F.codex\u002Foauth_creds.json` | Codex OAuth credentials |\n\n> **Note**: `~` represents the user home directory (Windows: `C:\\Users\\username`, Linux\u002FmacOS: `\u002Fhome\u002Fusername` or `\u002FUsers\u002Fusername`)\n\n> **Custom Path**: Can specify custom storage location via relevant parameters in configuration file or environment variables\n\n\u003C\u002Fdetails>\n\n---\n\n### Advanced Configuration\n\n\u003Cdetails>\n\u003Csummary>Click to expand proxy configuration, model filtering, and Fallback advanced settings\u003C\u002Fsummary>\n\n#### 1. Proxy Configuration\n\nThis project supports flexible proxy configuration, allowing you to configure a unified proxy for different providers or use provider-specific proxied endpoints.\n\n**Configuration Methods**:\n\n1. **Web UI Configuration** (Recommended): Convenient configuration management\n\n  In the \"Configuration\" page of the Web UI, you can visually configure all proxy options:\n  - **Unified Proxy**: Fill in the proxy address in the \"Proxy Settings\" area and check the providers that need to use the proxy\n  - **Provider Endpoints**: In each provider's configuration area, directly modify the Base URL to a proxied endpoint\n  - **Click \"Save Configuration\"**: Takes effect immediately without restarting the service\n\n2. **Unified Proxy Configuration**: Configure a global proxy and specify which providers use it\n\n   - **Web UI Configuration**: Fill in the proxy address in the \"Proxy Settings\" area of the \"Configuration\" page and check the providers that need to use the proxy\n   - **Configuration File**: Configure in `configs\u002Fconfig.json`\n   ```json\n   {\n     \"PROXY_URL\": \"http:\u002F\u002F127.0.0.1:7890\",\n      \"PROXY_ENABLED_PROVIDERS\": [\n        \"gemini-cli-oauth\",\n        \"gemini-antigravity\",\n        \"claude-kiro-oauth\",\n        \"grok-custom\"\n      ]\n}\n   ```\n\n3. **Provider-Specific Proxied Endpoints**: Some providers (like OpenAI, Claude) support configuring proxied API endpoints\n\n   - **Web UI Configuration**: In each provider's configuration area on the \"Configuration\" page, modify the corresponding Base URL\n   - **Configuration File**: Configure in `configs\u002Fconfig.json`\n   ```json\n   {\n     \"OPENAI_BASE_URL\": \"https:\u002F\u002Fyour-proxy-endpoint.com\u002Fv1\",\n     \"CLAUDE_BASE_URL\": \"https:\u002F\u002Fyour-proxy-endpoint.com\"\n   }\n   ```\n\n**Supported Proxy Types**:\n- **HTTP Proxy**: `http:\u002F\u002F127.0.0.1:7890`\n- **HTTPS Proxy**: `https:\u002F\u002F127.0.0.1:7890`\n- **SOCKS5 Proxy**: `socks5:\u002F\u002F127.0.0.1:1080`\n\n**Use Cases**:\n- **Network-Restricted Environments**: Use in network environments where Google, OpenAI, and other services cannot be accessed directly\n- **Hybrid Configuration**: Some providers use unified proxy, others use their own proxied endpoints\n- **Flexible Switching**: Enable\u002Fdisable proxy for specific providers at any time in the Web UI\n\n**Notes**:\n- Proxy configuration priority: Unified proxy configuration > Provider-specific endpoints > Direct connection\n- Ensure the proxy service is stable and available, otherwise it may affect service quality\n- SOCKS5 proxy usually performs better than HTTP proxy\n\n#### 2. Model Filtering Configuration\n\nSupport excluding unsupported models through `notSupportedModels` configuration, the system will automatically skip these providers.\n\n**Configuration**: Add `notSupportedModels` field for providers in `configs\u002Fprovider_pools.json`:\n\n```json\n{\n  \"gemini-cli-oauth\": [\n    {\n      \"uuid\": \"provider-1\",\n      \"notSupportedModels\": [\"gemini-3.0-pro\", \"gemini-3.5-flash\"],\n      \"checkHealth\": true\n    }\n  ]\n}\n```\n\n**How It Works**:\n- When requesting a specific model, the system automatically filters out providers that have configured the model as unsupported\n- Only providers that support the model will be selected to handle the request\n\n**Use Cases**:\n- Some accounts cannot access specific models due to quota or permission restrictions\n- Need to assign different model access permissions to different accounts\n\n#### 3. Cross-Type Fallback Configuration\n\nWhen all accounts under a Provider Type (e.g., `gemini-cli-oauth`) are exhausted due to 429 quota limits or marked as unhealthy, the system can automatically fallback to another compatible Provider Type (e.g., `gemini-antigravity`) instead of returning an error directly.\n\n**Configuration**: Add `providerFallbackChain` configuration in `configs\u002Fconfig.json`:\n\n```json\n{\n  \"providerFallbackChain\": {\n    \"gemini-cli-oauth\": [\"gemini-antigravity\"],\n    \"gemini-antigravity\": [\"gemini-cli-oauth\"],\n    \"claude-kiro-oauth\": [\"claude-custom\"],\n    \"claude-custom\": [\"claude-kiro-oauth\"]\n  }\n}\n```\n\n**How It Works**:\n1. Try to select a healthy account from the primary Provider Type pool\n2. If all accounts in that type are unhealthy or return 429:\n   - Look up the configured fallback types\n   - Check if the fallback type supports the requested model (protocol compatibility check)\n   - Select a healthy account from the fallback type's pool\n3. Supports multi-level degradation chains: `gemini-cli-oauth → gemini-antigravity → openai-custom`\n4. Only returns an error if all fallback types are also unavailable\n\n**Use Cases**:\n- In batch task scenarios, the free RPD quota of a single Provider Type can be easily exhausted in a short time\n- Through cross-type Fallback, you can fully utilize the independent quotas of multiple Providers, improving overall availability and throughput\n\n**Notes**:\n- Fallback only occurs between protocol-compatible types (e.g., between `gemini-*`, between `claude-*`)\n- The system automatically checks if the target Provider Type supports the requested model\n\n#### 4. TLS Sidecar (Bypass 403\u002FCloudflare)\n\nFor services like Grok that strictly validate TLS fingerprints (JA3\u002FJA4), this project integrates a Sidecar proxy based on Go uTLS, which effectively solves 403 Forbidden errors by simulating browser TLS features.\n\n**Configuration Instructions**:\n\n1.  **Compile the Binary**:\n    Since TLS simulation requires Go language support, you need to compile the sidecar first:\n    ```bash\n    cd tls-sidecar\n    go build -o tls-sidecar\n    ```\n    *Windows users, after compiling, ensure the generated `tls-sidecar.exe` is located in the `tls-sidecar\u002F` or the root directory.*\n\n2.  **Enable Configuration**:\n    Enable **TLS Sidecar** in the \"Configuration\" page of the Web UI, or modify `configs\u002Fconfig.json`:\n    ```json\n    {\n      \"TLS_SIDECAR_ENABLED\": true,\n      \"TLS_SIDECAR_PORT\": 9090\n    }\n    ```\n\n3.  **How It Works**:\n    - When enabled, the system automatically starts and manages the Go process.\n    - Requests for specific providers (like Grok) are automatically routed to the Sidecar.\n    - The Sidecar uses the latest Chrome fingerprint for TLS handshakes and supports automatic HTTP\u002F2 negotiation.\n\n**Notes**:\n- Local running requires a Go environment (1.20+).\n- **Docker Users**: The image already includes the pre-compiled binary; just enable it in the configuration, no manual compilation required.\n\n\u003C\u002Fdetails>\n\n---\n\n## ❓ FAQ\n\n\u003Cdetails>\n\u003Csummary>Click to expand FAQ and solutions (port occupation, Docker startup, 429 errors, etc.)\u003C\u002Fsummary>\n\n### 1. OAuth Authorization Failed\n\n**Problem Description**: After clicking \"Generate Authorization\", the browser opens the authorization page but authorization fails or cannot be completed.\n\n**Solutions**:\n- **Check Network Connection**: Ensure you can access Google, Alibaba Cloud, and other services normally\n- **Check Port Occupation**: OAuth callbacks require specific ports (Gemini: 8085, Antigravity: 8086, Codex: 1455, Kiro: 19876-19880), ensure these ports are not occupied\n- **Clear Browser Cache**: Try using incognito mode or clearing browser cache and retry\n- **Check Firewall Settings**: Ensure the firewall allows access to local callback ports\n- **Docker Users**: Ensure all OAuth callback ports are correctly mapped\n\n### 2. Port Already in Use\n\n**Problem Description**: When starting the service, it shows the port is already in use (e.g., `EADDRINUSE`).\n\n**Solutions**:\n```bash\n# Windows - Find the process occupying the port\nnetstat -ano | findstr :3000\n# Then use Task Manager to end the corresponding PID process\n\n# Linux\u002FmacOS - Find and end the process occupying the port\nlsof -i :3000\nkill -9 \u003CPID>\n```\n\nOr modify the port configuration in `configs\u002Fconfig.json` to use a different port.\n\n### 3. Docker Container Won't Start\n\n**Problem Description**: Docker container fails to start or exits immediately.\n\n**Solutions**:\n- **Check Logs**: `docker logs aiclient2api` to view error messages\n- **Check Mount Path**: Ensure the local path in the `-v` parameter exists and has read\u002Fwrite permissions\n- **Check Port Conflicts**: Ensure all mapped ports are not occupied on the host\n- **Re-pull Image**: `docker pull justlikemaki\u002Faiclient-2-api:latest`\n\n### 4. Credential File Not Recognized\n\n**Problem Description**: After uploading or configuring credential files, the system shows it cannot be recognized or format error.\n\n**Solutions**:\n- **Check File Format**: Ensure the credential file is valid JSON format\n- **Check File Path**: Ensure the file path is correct, Docker users need to ensure the file is in the mounted directory\n- **Check File Permissions**: Ensure the service has permission to read the credential file\n- **Regenerate Credentials**: If credentials have expired, try re-authorizing via OAuth\n\n### 5. Request Returns 429 Error\n\n**Problem Description**: API requests frequently return 429 Too Many Requests error.\n\n**Solutions**:\n- **Configure Account Pool**: Add multiple accounts to `provider_pools.json`, enable polling mechanism\n- **Configure Fallback**: Configure `providerFallbackChain` in `config.json` for cross-type degradation\n- **Reduce Request Frequency**: Appropriately increase request intervals to avoid triggering rate limits\n- **Wait for Quota Reset**: Free quotas usually reset daily or per minute\n\n### 6. Model Unavailable or Returns Error\n\n**Problem Description**: When requesting a specific model, it returns an error or shows the model is unavailable.\n\n**Solutions**:\n- **Check Model Name**: Ensure you're using the correct model name (case-sensitive)\n- **Check Provider Support**: Confirm the currently configured provider supports that model\n- **Check Account Permissions**: Some advanced models may require specific account permissions\n- **Configure Model Filtering**: Use `notSupportedModels` to exclude unsupported models\n\n### 7. Web UI Cannot Be Accessed\n\n**Problem Description**: Browser cannot open `http:\u002F\u002Flocalhost:3000`.\n\n**Solutions**:\n- **Check Service Status**: Confirm the service has started successfully, check terminal output\n- **Check Port Mapping**: Docker users ensure `-p 3000:3000` parameter is correct\n- **Try Other Address**: Try accessing `http:\u002F\u002F127.0.0.1:3000`\n- **Check Firewall**: Ensure the firewall allows access to port 3000\n\n### 8. Streaming Response Interrupted\n\n**Problem Description**: When using streaming output, the response is interrupted midway or incomplete.\n\n**Solutions**:\n- **Check Network Stability**: Ensure network connection is stable\n- **Increase Timeout**: Increase request timeout in client configuration\n- **Check Proxy Settings**: If using a proxy, ensure the proxy supports long connections\n- **Check Service Logs**: Check for error messages\n\n### 9. Configuration Changes Not Taking Effect\n\n**Problem Description**: After modifying configuration in Web UI, service behavior doesn't change.\n\n**Solutions**:\n- **Refresh Page**: Refresh the Web UI page after modification\n- **Check Save Status**: Confirm the configuration was saved successfully (check prompt messages)\n- **Restart Service**: Some configurations may require service restart to take effect\n- **Check Configuration File**: Directly check `configs\u002Fconfig.json` to confirm changes were written\n\n### 10. API Returns 404\n\n**Solutions**:\n- **Check Endpoint Path**: Ensure you're using the correct endpoint path, such as `\u002Fv1\u002Fchat\u002Fcompletions` etc.\n- **Check Client Auto-completion**: Some clients (like Cherry-Studio, NextChat) automatically append paths (like `\u002Fv1\u002Fchat\u002Fcompletions`) after the Base URL, causing path duplication. Check the actual request URL in the console and remove redundant path parts\n- **Check Service Status**: Confirm the service has started normally, visit `http:\u002F\u002Flocalhost:3000` to view Web UI\n- **Check Port Configuration**: Ensure requests are sent to the correct port (default 3000)\n- **View Available Routes**: Check \"Interactive Routing Examples\" on the Web UI dashboard page to see all available endpoints\n\n### 11. Unauthorized: API key is invalid or missing\n\n**Problem Description**: When calling API endpoints, it returns `Unauthorized: API key is invalid or missing.` error.\n\n**Solutions**:\n- **Check API Key Configuration**: Ensure API Key is correctly configured in `configs\u002Fconfig.json` or Web UI\n- **Check Request Header Format**: Ensure the request contains the correct Authorization header format, such as `Authorization: Bearer your-api-key`\n- **Check Service Logs**: View detailed error messages on the \"Real-time Logs\" page in Web UI to locate the specific cause\n\n### 12. No available and healthy providers for type\n\n**Problem Description**: When calling API, it returns `No available and healthy providers for type xxx` error.\n\n**Solutions**:\n- **Check Provider Status**: Check if providers of the corresponding type are in healthy status on the \"Provider Pools\" page in Web UI\n- **Check Credential Validity**: Confirm OAuth credentials have not expired; if expired, regenerate authorization\n- **Check Quota Limits**: Some providers may have reached free quota limits; wait for quota reset or add more accounts\n- **Enable Fallback**: Configure `providerFallbackChain` in `config.json` to automatically switch to backup providers when the primary provider is unavailable\n- **View Detailed Logs**: Check specific health check failure reasons on the \"Real-time Logs\" page in Web UI\n\n### 13. Request Returns 403 Forbidden Error\n\n**Problem Description**: API requests return 403 Forbidden error.\n\n**Solutions**:\n- **Enable TLS Sidecar**: For services like Grok, 403 is often due to TLS fingerprint blocking. Please refer to [Advanced Configuration - TLS Sidecar](#5-tls-sidecar-bypass-403cloudflare) to enable and compile the Sidecar.\n- **Check Node Status**: If you see the node status is normal (health check passed) on the \"Provider Pools\" page in Web UI, you can ignore this error as the system will handle it automatically\n- **Check Account Permissions**: Confirm the account has permission to access the requested model or service\n- **Check API Key Permissions**: Some providers' API Keys may have access scope restrictions; ensure the Key has sufficient permissions\n- **Check Regional Restrictions**: Some services may have regional access restrictions; try using a proxy or VPN\n- **Check Credential Status**: OAuth credentials may have been revoked or expired; try regenerating authorization\n- **Check Request Frequency**: Some providers have strict request frequency limits; reduce request frequency and retry\n- **View Provider Documentation**: Visit the official documentation of the corresponding provider to understand specific access restrictions and requirements\n\n\u003C\u002Fdetails>\n\n---\n\n## 📄 Open Source License\n\nThis project follows the [**GNU General Public License v3 (GPLv3)**](https:\u002F\u002Fwww.gnu.org\u002Flicenses\u002Fgpl-3.0) license. For details, please check the `LICENSE` file in the root directory.\n\n## 🙏 Acknowledgements\n\nThe development of this project was greatly inspired by the official Google Gemini CLI and referenced part of the code implementation of `gemini-cli.ts` in Cline 3.18.0. Sincere thanks to the Google official team and the Cline development team for their excellent work!\n\n### Contributor List\n\nThanks to all the developers who contributed to the AIClient-2-API project:\n\n[![Contributors](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjustlovemaki_AIClient-2-API_readme_ecab5985aad9.png)](https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fgraphs\u002Fcontributors)\n\n\n### 🌟 Star History\n\n\n[![Star History Chart](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjustlovemaki_AIClient-2-API_readme_aaebac980c8c.png)](https:\u002F\u002Fwww.star-history.com\u002F#justlovemaki\u002FAIClient-2-API&Timeline)\n\n---\n\n## ⚠️ Disclaimer\n\n### Usage Risk Warning\nThis project (AIClient-2-API) is for learning and research purposes only. Users assume all risks when using this project. The author is not responsible for any direct, indirect, or consequential losses resulting from the use of this project.\n\n### Third-Party Service Responsibility Statement\nThis project is an API proxy tool and does not provide any AI model services. All AI model services are provided by their respective third-party providers (such as Google, OpenAI, Anthropic, etc.). Users should comply with the terms of service and policies of each third-party service when accessing them through this project. The author is not responsible for the availability, quality, security, or legality of third-party services.\n\n### Data Privacy Statement\nThis project runs locally and does not collect or upload any user data. However, users should protect their API keys and other sensitive information when using this project. It is recommended that users regularly check and update their API keys and avoid using this project in insecure network environments.\n\n### Legal Compliance Reminder\nUsers should comply with the laws and regulations of their country\u002Fregion when using this project. It is strictly prohibited to use this project for any illegal purposes. Any consequences resulting from users' violation of laws and regulations shall be borne by the users themselves.\n","\u003Cdiv align=\"center\">\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjustlovemaki_AIClient-2-API_readme_2489e50ec12c.webp\" alt=\"logo\"  style=\"width: 128px; height: 128px;margin-bottom: 3px;\">\n\n# AIClient-2-API 🚀\n\n**一款功能强大的代理工具，能够统一处理各类仅限客户端调用的大模型API（Gemini CLI、Antigravity、Codex、Grok、Kiro等）的请求，模拟这些请求，并将其封装成一个本地的OpenAI兼容接口。**\n\n\u003Ca href=\"https:\u002F\u002Ftrendshift.io\u002Frepositories\u002F15832\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjustlovemaki_AIClient-2-API_readme_4cc089988f35.png\" alt=\"justlovemaki%2FAIClient-2-API | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"\u002F>\u003C\u002Fa>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\n\u003Cdiv align=\"center\">\n\n\u003Ca href=\"https:\u002F\u002Fdeepwiki.com\u002Fjustlovemaki\u002FAIClient-2-API\">\u003Cimg src=\"https:\u002F\u002Fdeepwiki.com\u002Fbadge.svg\" alt=\"Ask DeepWiki\"  style=\"width: 134px; height: 23px;margin-bottom: 3px;\">\u003C\u002Fa>\n\n[![License: GPL v3](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-GPLv3-blue.svg)](https:\u002F\u002Fwww.gnu.org\u002Flicenses\u002Fgpl-3.0)\n[![Node.js](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FNode.js-≥20.0.0-green.svg)](https:\u002F\u002Fnodejs.org\u002F)\n[![Docker](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdocker-≥20.0.0-blue.svg)](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fjustlikemaki\u002Faiclient-2-api)\n[![GitHub stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fjustlovemaki\u002FAIClient-2-API.svg?style=flat&label=Star)](https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fstargazers)\n[![GitHub issues](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fissues\u002Fjustlovemaki\u002FAIClient-2-API.svg)](https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fissues)\n\n[**🔧 OpenClaw配置**](.\u002Fdocs\u002FOPENCLAW_CONFIG_GUIDE.md) | [中文](.\u002FREADME-ZH.md) | [**👉 英文**](.\u002FREADME.md) | [日语](.\u002FREADME-JA.md) | [**📚 文档**](https:\u002F\u002Faiproxy.justlikemaki.vip\u002Fen\u002F)\n\n\u003C\u002Fdiv>\n\n## 💎 赞助商\n\n\u003Ctable width=\"100%\">\n  \u003Ctr>\n    \u003Ctd width=\"25%\" align=\"center\" valign=\"middle\">\n      \u003Ca href=\"https:\u002F\u002Fwww.packyapi.com\u002Fregister?aff=AIClient2API\">\n        \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjustlovemaki_AIClient-2-API_readme_566804b8936a.png\" alt=\"PackyCode赞助商\" width=\"180\">\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd width=\"75%\" align=\"left\" valign=\"middle\">\n      PackyCode是一家可靠高效的API中继服务提供商，为Claude Code、Codex、Gemini等提供中继服务。PackyCode为我们的软件用户提供特别折扣：\u003Ca href=\"https:\u002F\u002Fwww.packyapi.com\u002Fregister?aff=AIClient2API\">通过此链接注册\u003C\u002Fa>,并在充值时输入\u003Cstrong>AIClient2API\u003C\u002Fstrong>优惠码，即可享受\u003Cstrong>10%折扣\u003C\u002Fstrong>。\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd width=\"25%\" align=\"center\" valign=\"middle\">\n      \u003Ca href=\"https:\u002F\u002Fwww.aicodemirror.com\u002Fregister?invitecode=5BUE62\">\n        \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjustlovemaki_AIClient-2-API_readme_6558e7c7e39c.jpg\" alt=\"AICodeMirror赞助商\" width=\"180\">\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd width=\"75%\" align=\"left\" valign=\"middle\">\n      感谢AICodeMirror对本项目的赞助！AICodeMirror为Claude Code \u002F Codex \u002F Gemini CLI提供官方高稳定性中继服务，具备企业级并发能力、快速开票以及全天候专属技术支持。Claude Code \u002F Codex \u002F Gemini官方渠道价格分别仅为原价的38% \u002F 2% \u002F 9%，叠加充值额外折扣！AICodeMirror为AIClient-2-API用户推出特别福利：\u003Ca href=\"https:\u002F\u002Fwww.aicodemirror.com\u002Fregister?invitecode=5BUE62\">通过此链接注册\u003C\u002Fa>,首次充值即可享受\u003Cstrong>20%折扣\u003C\u002Fstrong>,企业客户更可最高享受25%折扣！\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd width=\"25%\" align=\"center\" valign=\"middle\">\n      \u003Ca href=\"https:\u002F\u002Fwww.lingtrue.com\u002Fregister?aff=MP34\">\n        \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjustlovemaki_AIClient-2-API_readme_5c32401013fc.png\" alt=\"LingtrueAPI赞助商\" width=\"180\">\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd width=\"75%\" align=\"left\" valign=\"middle\">\n      感谢LingtrueAPI对本项目的赞助！LingtrueAPI是一个全球性的大模型API中介服务平台，为Claude opus 4.6、GPT 5.4、Gemini 3.1 pro等多种模型提供API调用服务。它致力于让用户以低成本、高稳定性的方式接入全球AI能力，从而最大化生产效率。LingtrueAPI为本软件用户提供特别折扣：通过\u003Ca href=\"https:\u002F\u002Fwww.lingtrue.com\u002Fregister?aff=MP34\">此链接注册\u003C\u002Fa>,首次充值时输入\u003Cstrong>LingtrueAPI\u003C\u002Fstrong>优惠码，即可享受\u003Cstrong>10%折扣\u003C\u002Fstrong>。\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd width=\"25%\" align=\"center\" valign=\"middle\">\n      \u003Ca href=\"https:\u002F\u002Fpoixe.com\u002Fi\u002Febmvga\">\n        \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjustlovemaki_AIClient-2-API_readme_869c6eef2c28.png\" alt=\"Poixe AI赞助商\" width=\"180\">\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd width=\"75%\" align=\"left\" valign=\"middle\">\n      Poixe AI提供可靠的LLM API服务。您可以通过该平台的API端点无缝构建AI驱动的产品。此外，您还可以作为供应商向平台提供AI API资源并获得收益。\u003Ca href=\"https:\u002F\u002Fpoixe.com\u002Fi\u002Febmvga\">通过AIClient-2-API专属推荐链接注册\u003C\u002Fa>,首次充值即可获得\u003Cstrong>5美元\u003C\u002Fstrong>奖励。\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd width=\"25%\" align=\"center\" valign=\"middle\">\n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjustlovemaki_AIClient-2-API_readme_aa0855a63bbe.png\" alt=\"赞助联系方式\" width=\"150\">\n    \u003C\u002Ftd>\n    \u003Ctd width=\"75%\" align=\"left\" valign=\"middle\">\n      \u003Cstrong>成为赞助商\u003C\u002Fstrong>\u003Cbr>\n      如您希望赞助本项目，请扫描左侧的微信二维码（请注明意向：\u003Cstrong>赞助\u003C\u002Fstrong>）。\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n---\n\n## 🚀 概述\n\n`AIClient2API` 是一款 API 代理服务，突破客户端使用限制，将原本仅限于客户端使用的免费大模型（如 Gemini、Antigravity、Codex、Grok、Kiro）转换为标准的 OpenAI 兼容接口，可供任何应用程序调用。该服务基于 Node.js 构建，支持 OpenAI、Claude 和 Gemini 协议之间的智能转换，使 Cherry-Studio、NextChat 和 Cline 等工具能够大规模自由使用 Claude Opus 4.5、Gemini 3.0 Pro 和 Qwen3 Coder Plus 等先进模型。项目采用基于策略模式和适配器模式的模块化架构，内置账号池管理、智能轮询、自动故障转移和健康检查机制，确保 99.9% 的服务可用性。\n\n> [!NOTE]\n> **🎉 重要里程碑**\n>\n> - 感谢阮一峰在 [第359期周报](https:\u002F\u002Fwww.ruanyifeng.com\u002Fblog\u002F2025\u002F08\u002Fweekly-issue-359.html) 中的推荐\n>\n> **📅 版本更新日志**\n> \n> \u003Cdetails>\n> \u003Csummary>点击展开详细版本历史\u003C\u002Fsummary>\n> \n> - **2026.03.02** - 增加 Grok 协议支持，支持通过 Cookie\u002FSSO 访问 xAI Grok 系列模型（Grok 3\u002F4），支持多模态输入、图像\u002F视频生成、自动刷新令牌及流式输出\n> - **2026.01.26** - 增加 Codex 协议支持：支持 OpenAI Codex 的 OAuth 授权访问\n> - **2026.01.25** - 增强 AI Monitor 插件：支持在 AI 协议转换前后监控请求参数和响应。优化日志管理：统一日志格式，提供可视化配置\n> - **2026.01.15** - 优化提供商池管理器：新增异步刷新队列机制、缓冲队列去重、全局并发控制、节点预热及自动过期检测\n> > - **2026.01.03** - 增加主题切换功能，并优化提供商池初始化，移除使用提供商默认配置的回退策略\n> - **2025.12.30** - 增加主进程管理和自动更新功能\n> - **2025.12.25** - 统一日志配置管理：所有配置集中到 `configs\u002F` 目录。Docker 用户需更新挂载路径为 `-v \"local_path:\u002Fapp\u002Fconfigs\"`\n> - **2025.12.11** - Docker Hub 上现已提供自动构建的 Docker 镜像：[justlikemaki\u002Faiclient-2-api](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fjustlikemaki\u002Faiclient-2-api)\n> - **2025.11.30** - 增加 Antigravity 协议支持，可通过 Google 内部接口访问 Gemini 3 Pro、Claude Sonnet 4.5 等模型\n> - **2025.11.11** - 增加 Web UI 管理控制台，支持实时配置管理和健康状态监测\n> - **2025.11.06** - 增加对 Gemini 3 Preview 的支持，提升模型兼容性并优化性能\n> - **2025.10.18** - Kiro 开放注册，新账户可获得 500 积分，全面支持 Claude Sonnet 4.5\n> - **2025.09.01** - 集成 Qwen Code CLI，新增 `qwen3-coder-plus` 模型支持\n> - **2025.08.29** - 发布账号池管理功能，支持多账号轮询、智能故障转移及自动降级策略\n>   - 配置：在 `configs\u002Fconfig.json` 中添加 `PROVIDER_POOLS_FILE_PATH` 参数\n>   - 参考配置：[provider_pools.json](.\u002Fconfigs\u002Fprovider_pools.json.example)\n> - **发展历程**\n>   - 支持 Gemini CLI、Kiro 等 client2API\n>   - OpenAI、Claude、Gemini 三协议互转，自动智能切换\n> \u003C\u002Fdetails>\n\n---\n\n## 💡 核心优势\n\n### 🎯 统一接入，一站式管理\n*   **多模型统一接口**：通过标准的 OpenAI 兼容协议，只需一次配置即可访问包括 Gemini、Claude、Grok、Codex、Kimi K2、MiniMax M2 在内的主流大模型。\n*   **灵活切换机制**：支持通过启动参数或环境变量动态切换模型，满足不同场景需求。\n*   **零成本迁移**：完全兼容 OpenAI API 规范，Cherry-Studio、NextChat、Cline 等工具无需修改即可使用。\n*   **多协议智能转换**：支持 OpenAI、Claude 和 Gemini 协议之间的智能转换，实现跨协议模型调用。\n\n### 🚀 突破限制，提升效率\n*   **绕过官方限制**：利用 OAuth 授权机制，有效突破 Gemini、Antigravity 等服务的速率和配额限制。\n*   **TLS 指纹绕过**：内置 TLS Sidecar（Go uTLS），模拟浏览器特性，有效绕过 Cloudflare 对 Grok 等服务的 403 封锁。\n*   **免费使用高级模型**：通过 Kiro API 模式免费使用 Claude Opus 4.5，通过 Qwen OAuth 模式使用 Qwen3 Coder Plus，降低使用成本。\n*   **智能账号池调度**：支持多账号轮询、自动故障转移和配置降级，确保 99.9% 的服务可用性。\n\n### 🛡️ 安全可控，数据透明\n*   **全链路日志记录**：捕获所有请求和响应数据，支持审计和调试。\n*   **私有数据集构建**：基于日志数据快速构建专有训练数据集。\n*   **系统提示词管理**：支持覆盖和追加模式，实现统一基础指令与个性化扩展的完美结合。\n\n### 🔧 开发者友好，易于扩展\n*   **Web UI 管理控制台**：实时配置管理、健康状态监测、API 测试和日志查看。\n*   **模块化架构**：基于策略模式和适配器模式，新增模型提供商只需 3 步即可完成集成。\n*   **完善的测试覆盖**：集成测试和单元测试覆盖率 90%+，确保代码质量。\n*   **容器化部署**：提供 Docker 支持，一键部署，跨平台运行。\n\n---\n\n## 📑 快速导航\n\n- [💡 核心优势](#-core-advantages)\n- [🚀 快速开始](#-quick-start)\n  - [🐳 Docker 部署](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fjustlikemaki\u002Faiclient-2-api)\n  - [📋 核心功能](#-core-features)\n- [🔐 授权配置指南](#-authorization-configuration-guide)\n- [📁 授权文件存储路径](#-authorization-file-storage-paths)\n- [⚙️ 高级配置](#advanced-configuration)\n- [❓ 常见问题解答](#-faq)\n- [📄 开源许可证](#-open-source-license)\n- [🙏 致谢](#-acknowledgements)\n- [⚠️ 免责声明](#️-disclaimer)\n\n---\n\n## 🔧 使用说明\n\n### 🚀 快速入门\n\n使用 AIClient-2-API 最推荐的方式是通过自动化脚本启动，并直接在 **Web UI 控制台** 中进行可视化配置。\n\n#### 🐳 Docker 快速入门（推荐）\n\n```bash\ndocker run -d -p 3000:3000 -p 8085-8086:8085-8086 -p 1455:1455 -p 19876-19880:19876-19880 --restart=always -v \"your_path:\u002Fapp\u002Fconfigs\" --name aiclient2api justlikemaki\u002Faiclient-2-api\n```\n\n**参数说明**：\n- `-d`：在后台运行容器\n- `-p 3000:3000 ...`：端口映射。3000 用于 Web UI，其他端口用于 OAuth 回调（Gemini：8085，Antigravity：8086，Codex：1455，Kiro：19876–19880）\n- `--restart=always`：设置容器自动重启策略\n- `-v \"your_path:\u002Fapp\u002Fconfigs\"`：挂载配置目录（将 `your_path` 替换为实际路径，例如 `\u002Fhome\u002Fuser\u002Faiclient-configs`）\n- `--name aiclient2api`：指定容器名称\n\n#### 🐳 使用 Docker Compose 部署\n\n你也可以使用 Docker Compose 进行部署。首先进入 `docker` 目录：\n\n```bash\ncd docker\nmkdir -p configs\ndocker compose up -d\n```\n\n如果你想从源码构建而不是使用预构建的镜像，请编辑 `docker-compose.yml` 文件：\n1. 注释掉 `image: justlikemaki\u002Faiclient-2-api:latest` 这一行。\n2. 解除对 `build:` 部分的注释。\n3. 执行 `docker compose up -d --build`。\n\n#### 1. 运行启动脚本\n*   **Linux\u002FmacOS**：`chmod +x install-and-run.sh && .\u002Finstall-and-run.sh`\n*   **Windows**：双击 `install-and-run.bat`\n\n> **💡 如果脚本执行失败，可以尝试手动安装依赖并启动：**\n> ```bash\n> npm install\n> npm start\n> ```\n\n#### 2. 访问控制台\n服务器启动后，打开浏览器访问：\n👉 [**http:\u002F\u002Flocalhost:3000**](http:\u002F\u002Flocalhost:3000)\n\n> **默认密码**：`admin123`（登录后可在控制台中更改，或通过修改 `pwd` 文件进行更改）\n\n#### 3. 可视化配置（推荐）\n进入 **“配置”** 页面，你可以：\n*   ✅ 填写各提供商的 API Key 或上传 OAuth 凭证文件\n*   ✅ 实时切换默认模型提供商\n*   ✅ 监控健康状态和实时请求日志\n\n#### 4. 本地环境准备（非 Docker 用户）\n如果你直接在本地机器上运行（通过脚本或 Node.js），并且需要绕过 Grok 等服务的 TLS 检测，请确保：\n*   ✅ **安装 Go 语言**：前往 [Go 官方网站](https:\u002F\u002Fgo.dev\u002F) 下载并安装（1.20 及以上版本）。\n*   ✅ **手动编译 Sidecar**：执行以下命令编译 TLS 代理组件：\n    ```bash\n    cd tls-sidecar && go build -o tls-sidecar && cd ..\n    ```\n    *注意：如果未编译该二进制文件，TLS Sidecar 功能将无法启动，因为找不到可执行文件。*\n\n#### 脚本执行示例\n```\n========================================\n  AI Client 2 API 快速安装脚本\n========================================\n\n[检查] 检查是否已安装 Node.js...\n✅ Node.js 已安装，版本：v20.10.0\n✅ 找到 package.json 文件\n✅ node_modules 目录已存在\n✅ 项目文件检查完成\n\n========================================\n  启动 AI Client 2 API 服务器...\n========================================\n\n🌐 服务器将在 http:\u002F\u002Flocalhost:3000 启动\n📖 请访问 http:\u002F\u002Flocalhost:3000 查看管理界面\n⏹️ 按 Ctrl+C 可停止服务器\n```\n\n> **💡 提示**：脚本会自动安装依赖并启动服务器。如果遇到任何问题，脚本会提供清晰的错误信息和解决方案建议。\n\n---\n\n### 📋 核心功能\n\n#### Web UI 管理控制台\n\n![Web UI](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjustlovemaki_AIClient-2-API_readme_b520d38f9a01.png)\n\n功能完善的 Web 管理界面，包括：\n\n**📊 仪表盘**：系统概览、交互式路由示例、客户端配置指南\n\n**⚙️ 配置**：实时修改参数，支持所有提供商（Gemini、Antigravity、OpenAI、Claude、Kiro、Qwen），包含高级设置和文件上传功能\n\n**🔗 提供商池**：监控活跃连接、提供商健康统计、启用\u002F禁用管理\n\n**📁 配置文件**：集中式 OAuth 凭证管理，支持搜索筛选和文件操作\n\n**📜 实时日志**：实时显示系统和请求日志，并提供管理控制\n\n**🔐 登录验证**：默认密码为 `admin123`，可通过 `pwd` 文件修改\n\n访问方式：`http:\u002F\u002Flocalhost:3000` → 登录 → 侧边栏导航 → 配置立即生效\n\n#### 多模态输入能力\n支持图片、文档等多种输入类型，为您提供更丰富的交互体验和更强大的应用场景。\n\n#### 最新模型支持\n无缝支持以下最新大模型，只需在 Web UI 或 [`configs\u002Fconfig.json`](.\u002Fconfigs\u002Fconfig.json) 中配置相应端点即可：\n*   **Grok 3 \u002F Grok 4** - xAI 的旗舰模型，现已通过 Grok Cookie\u002FSSO 支持，支持思维模型、图像生成和视频生成\n*   **Claude 4.5 Opus** - Anthropic 史上最强模型，现已通过 Kiro、Antigravity 支持\n*   **Gemini 3 Pro** - Google 的下一代架构预览，现已通过 Gemini、Antigravity 支持\n*   **Qwen3 Coder Plus** - 阿里巴巴通义千问最新的代码专用模型，现已通过 Qwen Code 支持\n*   **Kimi K2 \u002F MiniMax M2** - 国内顶级旗舰模型同步支持，现已通过自定义 OpenAI、Claude 支持\n\n---\n\n### 🔐 授权配置指南\n\n\u003Cdetails>\n\u003Csummary>点击展开各提供商的详细授权配置步骤\u003C\u002Fsummary>\n\n> **💡 小贴士**: 为获得最佳体验，建议通过 **Web UI 控制台** 进行可视化授权管理。\n\n#### 🌐 Web UI 快速授权（推荐）\n在 Web UI 管理界面中，您可以快速完成授权配置：\n1. **生成授权**：在 **“提供商池”** 页面或 **“配置”** 页面，点击相应提供商（如 Gemini、Qwen）右上角的 **“生成授权”** 按钮。\n2. **扫描\u002F登录**：会弹出授权对话框，您可以点击 **“在浏览器中打开”** 进行登录验证。对于 Qwen，只需完成网页登录；而对于 Gemini 和 Antigravity，则需完成 Google 账号授权。\n3. **自动保存**：授权成功后，系统会自动获取凭据并将其保存到 `configs\u002F` 目录下的对应文件中。您可以在 **“配置文件”** 页面查看新生成的凭据。\n4. **可视化管理**：您可以在 Web UI 中随时上传或删除凭据，也可以使用 **“快速关联”** 功能，一键将现有凭据文件绑定到提供商。\n\n#### Gemini CLI OAuth 配置\n1. **获取 OAuth 凭据**：访问 [Google Cloud 控制台](https:\u002F\u002Fconsole.cloud.google.com\u002F) 创建项目并启用 Gemini API。\n2. **项目配置**：您可能需要提供有效的 Google Cloud 项目 ID，可通过启动参数 `--project-id` 指定。\n3. **确保项目 ID**：在 Web UI 中配置时，请确保输入的项目 ID 与 Google Cloud 控制台和 Gemini CLI 中显示的项目 ID 一致。\n\n#### Antigravity OAuth 配置\n1. **个人账号**：个人账号需要单独授权，申请渠道已关闭。\n2. **Pro 会员**：Antigravity 目前暂时对 Pro 会员开放，您需要先购买 Pro 会员资格。\n3. **组织账号**：组织账号需要单独授权，请联系管理员获取授权。\n\n#### Qwen Code OAuth 配置\n1. **首次授权**：配置 Qwen 服务后，系统会自动在浏览器中打开授权页面。\n2. **推荐参数**：为获得最佳效果，建议使用官方默认参数：\n   ```json\n   {\n     \"temperature\": 0,\n     \"top_p\": 1\n   }\n   ```\n\n#### Kiro API 配置\n1. **环境准备**：[下载并安装 Kiro 客户端](https:\u002F\u002Fkiro.dev\u002Fpricing\u002F)。\n2. **完成授权**：在客户端登录您的账户以生成 `kiro-auth-token.json` 凭证文件。\n3. **最佳实践**：建议与 **Claude Code** 搭配使用，以获得最佳体验。\n4. **重要提示**：Kiro 服务的使用政策已更新，请访问官方网站了解最新的使用限制和条款。\n\n#### Kiro 扩展思维（Claude 模型）\nAIClient-2-API 在使用 Claude 兼容请求（`\u002Fv1\u002Fmessages`）或 OpenAI 兼容请求（`\u002Fv1\u002Fchat\u002Fcompletions`）并路由至 `claude-kiro-oauth` 时，支持 Kiro 扩展思维功能。\n\n**Claude 兼容（`\u002Fv1\u002Fmessages`）**：\n```bash\ncurl http:\u002F\u002Flocalhost:3000\u002Fclaude-kiro-oauth\u002Fv1\u002Fmessages \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"Authorization: Bearer your-api-key\" \\\n  -d '{\n    \"model\": \"claude-sonnet-4-5\",\n    \"max_tokens\": 1024,\n    \"thinking\": { \"type\": \"enabled\", \"budget_tokens\": 10000 },\n    \"messages\": [{ \"role\": \"user\", \"content\": \"请逐步解答。\" }]\n  }'\n```\n\n**OpenAI 兼容（`\u002Fv1\u002Fchat\u002Fcompletions`）**：\n```bash\ncurl http:\u002F\u002Flocalhost:3000\u002Fclaude-kiro-oauth\u002Fv1\u002Fchat\u002Fcompletions \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"Authorization: Bearer your-api-key\" \\\n  -d '{\n    \"model\": \"claude-sonnet-4-5\",\n    \"messages\": [{ \"role\": \"user\", \"content\": \"请逐步解答。\" }],\n    \"extra_body\": {\n      \"anthropic\": {\n        \"thinking\": { \"type\": \"enabled\", \"budget_tokens\": 10000 }\n      }\n    }\n  }'\n```\n\n**自适应模式**：\n- Claude：`\"thinking\": { \"type\": \"adaptive\", \"effort\": \"high\" }`\n- OpenAI：`\"extra_body.anthropic.thinking\": { \"type\": \"adaptive\", \"effort\": \"high\" }`\n\n注意事项：\n- `budget_tokens` 的取值范围被限制为 `[1024, 24576]`（若未指定或无效，则默认为 `20000`）。\n- 令牌的获取、刷新及池内轮换机制保持不变。\n\n#### Codex OAuth 配置\n1. **生成授权**：在 Web UI 的“提供商池”或“配置”页面，点击 Codex 的“生成授权”按钮。\n2. **浏览器登录**：系统会打开 OpenAI Codex 的授权页面，供您完成 OAuth 登录。\n3. **自动保存**：授权成功后，系统会自动保存 Codex 的 OAuth 凭证文件。\n4. **回调端口**：请确保 OAuth 回调端口 `1455` 未被占用。\n\n#### Grok Cookie\u002FSSO 配置\n1. **获取 SSO 令牌**：登录 [Grok 官方网站](https:\u002F\u002Fgrok.com\u002F) 后，在浏览器开发者工具的 Application -> Cookies 中复制 `sso` 的值。\n2. **进入配置**：在 Web UI 的“配置”页面或直接修改配置文件，将该令牌填入 `GROK_COOKIE_TOKEN`。\n3. **支持的功能**：\n   - 聊天和思维模型（Grok 3 Thinking）\n   - 图像生成（Grok Imagine）\n   - 视频生成（Grok Video）\n4. **注意事项**：请确保 `GROK_USER_AGENT` 与获取 Cookie 时使用的浏览器一致，以免被封禁。\n\n#### 账户池管理配置\n1. **创建池配置文件**：参照 [provider_pools.json.example](.\u002Fconfigs\u002Fprovider_pools.json.example) 创建配置文件。\n2. **配置池参数**：在 `configs\u002Fconfig.json` 中设置 `PROVIDER_POOLS_FILE_PATH`，使其指向池配置文件。\n3. **启动参数配置**：使用 `--provider-pools-file \u003C路径>` 参数指定池配置文件的路径。\n4. **健康检查**：系统会自动进行定期健康检查，并避免使用不健康的提供商。\n\n\u003C\u002Fdetails>\n\n### 📁 授权文件存储路径\n\n\u003Cdetails>\n\u003Csummary>点击展开各服务的默认授权凭证存储位置\u003C\u002Fsummary>\n\n各服务授权凭证文件的默认存储位置：\n\n| 服务 | 默认路径 | 说明 |\n|------|---------|------|\n| **Gemini** | `~\u002F.gemini\u002Foauth_creds.json` | OAuth 认证凭证 |\n| **Kiro** | `~\u002F.aws\u002Fsso\u002Fcache\u002Fkiro-auth-token.json` | Kiro 认证令牌 |\n| **Qwen** | `~\u002F.qwen\u002Foauth_creds.json` | Qwen OAuth 凭证 |\n| **Antigravity** | `~\u002F.antigravity\u002Foauth_creds.json` | Antigravity OAuth 凭证（支持 Claude 4.5 Opus） |\n| **Codex** | `~\u002F.codex\u002Foauth_creds.json` | Codex OAuth 凭证 |\n\n> **注意**: `~` 表示用户主目录（Windows: `C:\\Users\\用户名`, Linux\u002FmacOS: `\u002Fhome\u002F用户名` 或 `\u002FUsers\u002F用户名`）\n\n> **自定义路径**: 可通过配置文件中的相关参数或环境变量指定自定义存储位置\n\n\u003C\u002Fdetails>\n\n---\n\n### 高级配置\n\n\u003Cdetails>\n\u003Csummary>点击展开代理配置、模型过滤及回退的高级设置\u003C\u002Fsummary>\n\n#### 1. 接入代理配置\n\n本项目支持灵活的代理配置，既可为不同提供商统一配置代理，也可使用各提供商专用的代理端点。\n\n**配置方式**：\n\n1. **Web UI 配置**（推荐）：便捷的配置管理\n\n   在 Web UI 的“配置”页面中，您可以直观地配置所有代理选项：\n   - **统一代理**：在“代理设置”区域填写代理地址，并勾选需要使用该代理的提供商\n   - **提供商端点**：在每个提供商的配置区域，直接将 Base URL 修改为代理后的端点\n   - **点击“保存配置”**：无需重启服务即可立即生效\n\n2. **统一代理配置**：配置全局代理并指定哪些提供商使用该代理\n\n   - **Web UI 配置**：在“配置”页面的“代理设置”区域填写代理地址，并勾选需要使用代理的提供商\n   - **配置文件**：在 `configs\u002Fconfig.json` 中配置\n   ```json\n   {\n     \"PROXY_URL\": \"http:\u002F\u002F127.0.0.1:7890\",\n      \"PROXY_ENABLED_PROVIDERS\": [\n        \"gemini-cli-oauth\",\n        \"gemini-antigravity\",\n        \"claude-kiro-oauth\",\n        \"grok-custom\"\n      ]\n}\n   ```\n\n3. **提供商专用代理端点**：部分提供商（如 OpenAI、Claude）支持配置代理后的 API 端点\n\n   - **Web UI 配置**：在“配置”页面的各提供商配置区域，修改对应的 Base URL\n   - **配置文件**：在 `configs\u002Fconfig.json` 中配置\n   ```json\n   {\n     \"OPENAI_BASE_URL\": \"https:\u002F\u002Fyour-proxy-endpoint.com\u002Fv1\",\n     \"CLAUDE_BASE_URL\": \"https:\u002F\u002Fyour-proxy-endpoint.com\"\n   }\n   ```\n\n**支持的代理类型**：\n- **HTTP 代理**：`http:\u002F\u002F127.0.0.1:7890`\n- **HTTPS 代理**：`https:\u002F\u002F127.0.0.1:7890`\n- **SOCKS5 代理**：`socks5:\u002F\u002F127.0.0.1:1080`\n\n**使用场景**：\n- **网络受限环境**：适用于无法直接访问 Google、OpenAI 等服务的网络环境\n- **混合配置**：部分提供商使用统一代理，另一些则使用各自的代理端点\n- **灵活切换**：可在 Web UI 中随时启用或禁用特定提供商的代理\n\n**注意事项**：\n- 代理配置优先级：统一代理配置 > 提供商专用端点 > 直连\n- 请确保代理服务稳定可用，否则可能影响服务质量\n- SOCKS5 代理通常比 HTTP 代理性能更好\n\n#### 2. 模型过滤配置\n\n支持通过 `notSupportedModels` 配置排除不支持的模型，系统会自动跳过这些提供商。\n\n**配置**：在 `configs\u002Fprovider_pools.json` 中为提供商添加 `notSupportedModels` 字段：\n\n```json\n{\n  \"gemini-cli-oauth\": [\n    {\n      \"uuid\": \"provider-1\",\n      \"notSupportedModels\": [\"gemini-3.0-pro\", \"gemini-3.5-flash\"],\n      \"checkHealth\": true\n    }\n  ]\n}\n```\n\n**工作原理**：\n- 当请求特定模型时，系统会自动过滤掉已配置为不支持该模型的提供商\n- 只有支持该模型的提供商才会被选中来处理请求\n\n**使用场景**：\n- 某些账号因配额或权限限制而无法访问特定模型\n- 需要为不同账号分配不同的模型访问权限\n\n#### 3. 跨类型回退配置\n\n当某个提供商类型（如 `gemini-cli-oauth`）下的所有账号因 429 配额限制或被标记为不健康而耗尽时，系统可以自动回退到另一个兼容的提供商类型（如 `gemini-antigravity`），而不是直接返回错误。\n\n**配置**：在 `configs\u002Fconfig.json` 中添加 `providerFallbackChain` 配置：\n\n```json\n{\n  \"providerFallbackChain\": {\n    \"gemini-cli-oauth\": [\"gemini-antigravity\"],\n    \"gemini-antigravity\": [\"gemini-cli-oauth\"],\n    \"claude-kiro-oauth\": [\"claude-custom\"],\n    \"claude-custom\": [\"claude-kiro-oauth\"]\n  }\n}\n```\n\n**工作原理**：\n1. 尝试从主要提供商类型的池中选择一个健康的账号\n2. 如果该类型的全部账号都不健康或返回 429 错误：\n   - 查找配置的回退类型\n   - 检查回退类型是否支持请求的模型（协议兼容性检查）\n   - 从回退类型的池中选择一个健康的账号\n3. 支持多级降级链：`gemini-cli-oauth → gemini-antigravity → openai-custom`\n4. 仅当所有回退类型也都不可用时，才会返回错误\n\n**使用场景**：\n- 在批量任务场景中，单个提供商类型的免费 RPD 配额很容易在短时间内耗尽\n- 通过跨类型回退，可以充分利用多个提供商的独立配额，提高整体可用性和吞吐量\n\n**注意事项**：\n- 回退仅发生在协议兼容的类型之间（如 `gemini-*` 之间、`claude-*` 之间）\n- 系统会自动检查目标提供商类型是否支持请求的模型\n\n#### 4. TLS Sidecar（绕过 403\u002FCloudflare）\n\n对于像 Grok 这样严格验证 TLS 指纹（JA3\u002FJA4）的服务，本项目集成了基于 Go uTLS 的 Sidecar 代理，通过模拟浏览器的 TLS 特性，有效解决 403 Forbidden 错误。\n\n**配置说明**：\n\n1.  **编译二进制文件**：\n    由于 TLS 模拟需要 Go 语言支持，您需要先编译 Sidecar：\n    ```bash\n    cd tls-sidecar\n    go build -o tls-sidecar\n    ```\n    *Windows 用户编译后，请确保生成的 `tls-sidecar.exe` 位于 `tls-sidecar\u002F` 或根目录下。*\n\n2.  **启用配置**：\n    在 Web UI 的“配置”页面中启用 **TLS Sidecar**，或修改 `configs\u002Fconfig.json`：\n    ```json\n    {\n      \"TLS_SIDECAR_ENABLED\": true,\n      \"TLS_SIDECAR_PORT\": 9090\n    }\n    ```\n\n3.  **工作原理**：\n    - 启用后，系统会自动启动并管理 Go 进程。\n    - 对特定提供商（如 Grok）的请求会自动路由到 Sidecar。\n    - Sidecar 使用最新的 Chrome 指纹进行 TLS 握手，并支持自动 HTTP\u002F2 协商。\n\n**注意事项**：\n- 本地运行需要 Go 环境（1.20 及以上版本）。\n- **Docker 用户**：镜像中已包含预编译的二进制文件，只需在配置中启用即可，无需手动编译。\n\n\u003C\u002Fdetails>\n\n---\n\n## ❓ 常见问题解答\n\n\u003Cdetails>\n\u003Csummary>点击展开常见问题及解决方案（端口占用、Docker 启动、429 错误等）\u003C\u002Fsummary>\n\n### 1. OAuth 授权失败\n\n**问题描述**：点击“生成授权”后，浏览器会打开授权页面，但授权失败或无法完成。\n\n**解决方案**：\n- **检查网络连接**：确保可以正常访问 Google、阿里云等服务。\n- **检查端口占用**：OAuth 回调需要特定端口（Gemini：8085，Antigravity：8086，Codex：1455，Kiro：19876-19880），请确保这些端口未被占用。\n- **清除浏览器缓存**：尝试使用无痕模式或清除浏览器缓存后重试。\n- **检查防火墙设置**：确保防火墙允许访问本地回调端口。\n- **Docker 用户**：确保所有 OAuth 回调端口已正确映射。\n\n### 2. 端口已被占用\n\n**问题描述**：启动服务时提示端口已被占用（例如 `EADDRINUSE`）。\n\n**解决方案**：\n```bash\n# Windows - 查找占用端口的进程\nnetstat -ano | findstr :3000\n# 然后使用任务管理器结束对应的 PID 进程\n\n# Linux\u002FmacOS - 查找并结束占用端口的进程\nlsof -i :3000\nkill -9 \u003CPID>\n```\n\n或者修改 `configs\u002Fconfig.json` 中的端口配置，使用其他端口。\n\n### 3. Docker 容器无法启动\n\n**问题描述**：Docker 容器无法启动或立即退出。\n\n**解决方案**：\n- **查看日志**：运行 `docker logs aiclient2api` 查看错误信息。\n- **检查挂载路径**：确保 `-v` 参数中的本地路径存在且具有读写权限。\n- **检查端口冲突**：确保主机上所有映射的端口未被占用。\n- **重新拉取镜像**：运行 `docker pull justlikemaki\u002Faiclient-2-api:latest`。\n\n### 4. 凭证文件无法识别\n\n**问题描述**：上传或配置凭证文件后，系统提示无法识别或格式错误。\n\n**解决方案**：\n- **检查文件格式**：确保凭证文件为有效的 JSON 格式。\n- **检查文件路径**：确保文件路径正确，Docker 用户需确认文件位于挂载目录中。\n- **检查文件权限**：确保服务有权限读取该凭证文件。\n- **重新生成凭证**：若凭证已过期，可尝试通过 OAuth 重新授权。\n\n### 5. 请求返回 429 错误\n\n**问题描述**：API 请求频繁返回 429 Too Many Requests 错误。\n\n**解决方案**：\n- **配置账号池**：在 `provider_pools.json` 中添加多个账号，启用轮询机制。\n- **配置回退机制**：在 `config.json` 中配置 `providerFallbackChain` 实现跨类型降级。\n- **降低请求频率**：适当增加请求间隔，避免触发限流。\n- **等待配额重置**：免费配额通常每日或每分钟重置。\n\n### 6. 模型不可用或返回错误\n\n**问题描述**：请求特定模型时，返回错误或提示模型不可用。\n\n**解决方案**：\n- **检查模型名称**：确保使用的模型名称正确（区分大小写）。\n- **检查提供商支持**：确认当前配置的提供商是否支持该模型。\n- **检查账号权限**：部分高级模型可能需要特定的账号权限。\n- **配置模型过滤**：使用 `notSupportedModels` 排除不支持的模型。\n\n### 7. Web UI 无法访问\n\n**问题描述**：浏览器无法打开 `http:\u002F\u002Flocalhost:3000`。\n\n**解决方案**：\n- **检查服务状态**：确认服务已成功启动，查看终端输出。\n- **检查端口映射**：Docker 用户需确保 `-p 3000:3000` 参数正确。\n- **尝试其他地址**：尝试访问 `http:\u002F\u002F127.0.0.1:3000`。\n- **检查防火墙**：确保防火墙允许访问 3000 端口。\n\n### 8. 流式响应中断\n\n**问题描述**：使用流式输出时，响应中途中断或不完整。\n\n**解决方案**：\n- **检查网络稳定性**：确保网络连接稳定。\n- **增加超时时间**：在客户端配置中增加请求超时时间。\n- **检查代理设置**：若使用代理，确保代理支持长连接。\n- **查看服务日志**：检查是否有错误信息。\n\n### 9. 配置更改未生效\n\n**问题描述**：在 Web UI 中修改配置后，服务行为未发生变化。\n\n**解决方案**：\n- **刷新页面**：修改后刷新 Web UI 页面。\n- **检查保存状态**：确认配置已成功保存（查看提示信息）。\n- **重启服务**：部分配置可能需要重启服务才能生效。\n- **检查配置文件**：直接查看 `configs\u002Fconfig.json`，确认更改是否已写入。\n\n### 10. API 返回 404\n\n**解决方案**：\n- **检查端点路径**：确保使用正确的端点路径，如 `\u002Fv1\u002Fchat\u002Fcompletions` 等。\n- **检查客户端自动补全**：某些客户端（如 Cherry-Studio、NextChat）会在 Base URL 后自动追加路径（如 `\u002Fv1\u002Fchat\u002Fcompletions`），导致路径重复。请在控制台中查看实际请求 URL，并移除多余的路径部分。\n- **检查服务状态**：确认服务已正常启动，访问 `http:\u002F\u002Flocalhost:3000` 查看 Web UI。\n- **检查端口配置**：确保请求发送到正确的端口（默认 3000）。\n- **查看可用路由**：在 Web UI 仪表盘页面的“交互式路由示例”中查看所有可用端点。\n\n### 11. 未授权：API 密钥无效或缺失\n\n**问题描述**：调用 API 端点时，返回 `Unauthorized: API key is invalid or missing.` 错误。\n\n**解决方案**：\n- **检查 API 密钥配置**：确保在 `configs\u002Fconfig.json` 或 Web UI 中正确配置了 API 密钥。\n- **检查请求头格式**：确保请求包含正确的 Authorization 头格式，例如 `Authorization: Bearer your-api-key`。\n- **检查服务日志**：在 Web UI 的“实时日志”页面查看详细错误信息，以定位具体原因。\n\n### 12. 该类型无可用且健康的提供商\n\n**问题描述**：调用 API 时，返回 `No available and healthy providers for type xxx` 错误。\n\n**解决方案**：\n- **检查提供商状态**：在 Web UI 的“提供商池”页面中，检查相应类型的提供商是否处于健康状态。\n- **检查凭证有效性**：确认 OAuth 凭证未过期；若过期，请重新生成授权。\n- **检查配额限制**：部分提供商可能已达到免费配额上限，需等待配额重置或添加更多账号。\n- **启用回退机制**：在 `config.json` 中配置 `providerFallbackChain`，以便在主提供商不可用时自动切换到备用提供商。\n- **查看详细日志**：在 Web UI 的“实时日志”页面中查看具体的健康检查失败原因。\n\n### 13. 请求返回403 Forbidden错误\n\n**问题描述**：API请求返回403 Forbidden错误。\n\n**解决方案**：\n- **启用TLS Sidecar**：对于Grok等服务，403错误通常是由于TLS指纹拦截导致的。请参考[高级配置 - TLS Sidecar](#5-tls-sidecar-bypass-403cloudflare)来启用并编译Sidecar。\n- **检查节点状态**：如果在Web UI的“Provider Pools”页面上看到节点状态正常（健康检查通过），则可以忽略此错误，系统会自动处理。\n- **检查账户权限**：确认账户是否有权限访问所请求的模型或服务。\n- **检查API密钥权限**：某些提供商的API密钥可能存在访问范围限制；请确保该密钥具有足够的权限。\n- **检查区域限制**：部分服务可能有区域访问限制；可尝试使用代理或VPN。\n- **检查凭证状态**：OAuth凭证可能已被撤销或过期；可尝试重新生成授权。\n- **检查请求频率**：部分提供商对请求频率有严格限制；请降低请求频率后重试。\n- **查看提供商文档**：访问相应提供商的官方文档，了解具体的访问限制和要求。\n\n\u003C\u002Fdetails>\n\n---\n\n## 📄 开源许可证\n\n本项目遵循[**GNU通用公共许可证v3 (GPLv3)**](https:\u002F\u002Fwww.gnu.org\u002Flicenses\u002Fgpl-3.0)协议。详情请参阅根目录下的`LICENSE`文件。\n\n## 🙏 致谢\n\n本项目的开发深受Google Gemini官方CLI的启发，并参考了Cline 3.18.0版本中`gemini-cli.ts`的部分代码实现。在此向Google官方团队和Cline开发团队致以诚挚的感谢，感谢他们出色的工作！\n\n### 贡献者名单\n\n感谢所有为AIClient-2-API项目做出贡献的开发者：\n\n[![Contributors](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjustlovemaki_AIClient-2-API_readme_ecab5985aad9.png)](https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fgraphs\u002Fcontributors)\n\n\n### 🌟 星标历史\n\n\n[![星标历史图](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjustlovemaki_AIClient-2-API_readme_aaebac980c8c.png)](https:\u002F\u002Fwww.star-history.com\u002F#justlovemaki\u002FAIClient-2-API&Timeline)\n\n---\n\n## ⚠️ 免责声明\n\n### 使用风险提示\n本项目（AIClient-2-API）仅用于学习和研究目的。用户在使用本项目时需自行承担所有风险。作者不对因使用本项目而导致的任何直接、间接或附带损失承担责任。\n\n### 第三方服务责任声明\n本项目仅为API代理工具，并不提供任何AI模型服务。所有AI模型服务均由其各自的第三方提供商（如Google、OpenAI、Anthropic等）提供。用户通过本项目访问这些服务时，应遵守各第三方服务的使用条款及政策。作者对第三方服务的可用性、质量、安全性或合法性不承担任何责任。\n\n### 数据隐私声明\n本项目在本地运行，不会收集或上传任何用户数据。然而，用户在使用本项目时仍需妥善保护自己的API密钥及其他敏感信息。建议用户定期检查并更新API密钥，同时避免在不安全的网络环境中使用本项目。\n\n### 法律合规提醒\n用户在使用本项目时应遵守所在国家或地区的法律法规。严禁将本项目用于任何非法目的。因用户违反法律法规而产生的任何后果，均由用户自行承担。","# AIClient-2-API 快速上手指南\n\nAIClient-2-API 是一个强大的代理工具，能将仅限客户端使用的免费大模型（如 Gemini CLI, Antigravity, Codex, Grok, Kiro 等）转换为标准的 OpenAI 兼容接口，供任何应用调用。\n\n## 1. 环境准备\n\n在开始之前，请确保您的系统满足以下要求：\n\n*   **操作系统**：Linux, macOS 或 Windows (WSL2 推荐)\n*   **运行环境**（二选一）：\n    *   **Docker** (推荐): 版本 ≥ 20.0.0\n    *   **Node.js**: 版本 ≥ 20.0.0\n*   **账号资源**：拥有目标模型服务的可用账号（如 Google 账号、Kiro 账号等），用于获取 Cookie 或 OAuth 凭证。\n\n## 2. 安装步骤\n\n### 方案 A：Docker 部署（推荐）\n\n这是最简便的部署方式，支持一键启动并包含 Web 管理界面。\n\n```bash\ndocker run -d \\\n  --name aiclient-2-api \\\n  -p 3000:3000 \\\n  -v \"$(pwd)\u002Fconfigs:\u002Fapp\u002Fconfigs\" \\\n  justlikemaki\u002Faiclient-2-api:latest\n```\n\n*   `-p 3000:3000`: 映射服务端口，默认访问 `http:\u002F\u002Flocalhost:3000`。\n*   `-v \"$(pwd)\u002Fconfigs:\u002Fapp\u002Fconfigs\"`: 将配置文件挂载到本地，确保持久化存储。\n\n> **国内加速提示**：如果拉取 Docker 镜像缓慢，建议使用国内镜像加速器（如阿里云、腾讯云容器镜像服务）配置 Docker Daemon 后重试，或使用国内镜像源标签（如有）。\n\n### 方案 B：源码运行 (Node.js)\n\n如果您希望进行开发或调试，可以选择源码运行。\n\n```bash\n# 克隆仓库\ngit clone https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API.git\ncd AIClient-2-API\n\n# 安装依赖\nnpm install\n\n# 启动服务\nnpm start\n```\n\n## 3. 基本使用\n\n启动成功后，推荐通过 **Web UI 控制台** 进行可视化配置，无需手动编辑复杂的 JSON 文件。\n\n### 第一步：访问管理控制台\n打开浏览器访问：`http:\u002F\u002Flocalhost:3000` (Docker 部署) 或 `http:\u002F\u002Flocalhost:3000` (源码运行)。\n\n### 第二步：配置提供商 (Provider)\n1.  在 Web UI 中选择 **\"Providers\"** 或 **\"配置管理\"**。\n2.  添加新的模型源（例如选择 `Gemini`, `Kiro`, `Grok` 等）。\n3.  填入您的认证信息（Cookie、OAuth Token 或 SSO 凭证）。\n    *   *注：具体凭证获取方式可参考项目文档中的授权指南。*\n4.  保存配置，系统会自动进行健康检查。\n\n### 第三步：调用 API\n配置完成后，该服务即暴露了一个标准的 OpenAI 兼容接口。您可以直接在支持 OpenAI 协议的客户端（如 Cherry-Studio, NextChat, Cline, Cursor 等）中使用。\n\n**调用示例 (curl):**\n\n```bash\ncurl http:\u002F\u002Flocalhost:3000\u002Fv1\u002Fchat\u002Fcompletions \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -d '{\n    \"model\": \"gemini-2.0-flash\", \n    \"messages\": [\n      {\"role\": \"user\", \"content\": \"Hello, who are you?\"}\n    ]\n  }'\n```\n\n**客户端配置要点：**\n*   **Base URL**: `http:\u002F\u002Flocalhost:3000\u002Fv1`\n*   **API Key**: 可在 Web UI 中自定义设置，或在请求头中随意填写（若未开启鉴权）。\n*   **Model Name**: 填写您在 Web UI 中配置的模型标识（如 `gemini-2.0-flash`, `claude-opus-4` 等）。\n\n通过以上三步，您即可将各类受限的免费大模型整合为统一的本地 API 服务，供开发工具链自由调用。","某初创团队正在开发一款智能代码助手，需要同时调用 Gemini、Grok 和 Kiro 等多个大模型来对比生成效果，但受限于各厂商独立的客户端协议和高昂的 API 成本。\n\n### 没有 AIClient-2-API 时\n- **开发效率低下**：团队需为 Gemini CLI、Grok 等不同模型分别编写适配代码，维护多套差异巨大的请求逻辑，导致新功能上线缓慢。\n- **资源成本高昂**：直接调用官方接口费用昂贵，且无法利用 Kiro 内置的免费 Claude 模型额度，造成预算快速耗尽。\n- **并发能力受限**：单一渠道难以支撑每日数千次的测试请求，频繁触发限流，导致自动化测试流程经常中断。\n- **集成复杂度高**：现有开发框架主要基于 OpenAI 标准构建，接入非 OpenAI 体系的模型需要大量额外的转换工作。\n\n### 使用 AIClient-2-API 后\n- **统一开发接口**：AIClient-2-API 将各类私有协议封装为标准的 OpenAI 兼容接口，团队只需维护一套代码即可无缝切换底层模型。\n- **显著降低成本**：通过模拟请求技术，团队成功调用了 Kiro 中免费的 Claude 模型，并实现了每日数千次低成本的 Gemini 请求，大幅节省开支。\n- **提升系统稳定性**：本地代理服务有效缓解了并发压力，支持高频次的自动化测试运行，确保了开发流程的连续性与稳定性。\n- **快速灵活接入**：借助现成的 API 封装，开发人员能在几分钟内将新模型接入现有系统，无需关注底层复杂的认证与协议细节。\n\nAIClient-2-API 通过统一异构模型接口与优化资源调度，让多模型协同开发变得像调用单一服务一样简单高效。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjustlovemaki_AIClient-2-API_b520d38f.png","justlovemaki","何夕2077","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fjustlovemaki_051447d4.jpg","寻找创业伙伴中","None","Wuhan","justlikemaki@foxmail.com",null,"https:\u002F\u002Fai.hubtoday.app\u002F","https:\u002F\u002Fgithub.com\u002Fjustlovemaki",[87,91,95,99,103,107,110,113],{"name":88,"color":89,"percentage":90},"JavaScript","#f1e05a",87,{"name":92,"color":93,"percentage":94},"CSS","#663399",6.4,{"name":96,"color":97,"percentage":98},"HTML","#e34c26",6,{"name":100,"color":101,"percentage":102},"Go","#00ADD8",0.4,{"name":104,"color":105,"percentage":106},"Shell","#89e051",0.1,{"name":108,"color":109,"percentage":106},"PowerShell","#012456",{"name":111,"color":112,"percentage":106},"Dockerfile","#384d54",{"name":114,"color":115,"percentage":116},"Batchfile","#C1F12E",0,6674,995,"2026-04-07T14:49:29","GPL-3.0","Linux, macOS, Windows","未说明",{"notes":124,"python":122,"dependencies":125},"该工具基于 Node.js 开发，非 Python 项目。支持通过 Docker 一键部署或源码运行。主要功能是作为 API 代理，将各类客户端专用大模型（如 Gemini CLI, Codex, Grok 等）转换为 OpenAI 兼容接口，不涉及本地大模型推理，因此无特定 GPU 或大内存需求。",[126,127],"Node.js >= 20.0.0","Docker >= 20.0.0 (可选)",[15,25],[130,131],"aicoding","free","2026-03-27T02:49:30.150509","2026-04-08T03:55:18.623556",[135,140,145,150,155,159],{"id":136,"question_zh":137,"answer_zh":138,"source_url":139},23679,"使用 claude-kiro-oauth 时提示 \"Region not found in credentials\" 或配置不生效怎么办？","请确保拉取了最新的项目代码。检查 `kiro-auth-token.json` 文件，不要手动修改其中的内容（如 authMethod, region），直接复制生成的完整文件即可。如果问题依旧，更新到最新版本通常能解决该问题。","https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fissues\u002F11",{"id":141,"question_zh":142,"answer_zh":143,"source_url":144},23680,"claude-kiro-oauth 突然返回 400 错误（Request failed with status code 400）如何解决？","该问题通常是由于上游 API 请求格式变化或模型映射问题导致的。请升级到最新版本（如 v2.11.2 或更高）以修复此问题。如果是 Docker 部署，请重新拉取镜像；如果是源码部署，请拉取最新代码并重新构建启动。","https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fissues\u002F378",{"id":146,"question_zh":147,"answer_zh":148,"source_url":149},23681,"在特定环境（如旧版 Ubuntu）下使用 Kiro 报错 \"Improperly formed request message\" 怎么办？","这可能是由于本地环境（如 Node 版本、系统库）差异导致的兼容性问题。建议尝试在全新的 Linux 虚拟机或容器中部署测试。如果在新环境中正常，说明原系统环境存在配置冲突或依赖过旧，建议更换纯净环境部署。","https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fissues\u002F89",{"id":151,"question_zh":152,"answer_zh":153,"source_url":154},23682,"gemini-cli-oauth 生成授权时失败，提示 \"fetch failed\" 或 \"Headers Timeout Error\" 如何解决？","该错误通常是因为服务器无法访问 Google 服务或账号被封禁。请执行以下检查：\n1. 确保您的 Google 账号状态正常，未被封禁。\n2. 确保服务器网络可以访问 Google（googleapis.com 等）。\n3. 如果服务器在国内，必须在可视化配置中正确配置代理，或者直接设置环境变量（如 HTTP_PROXY\u002FHTTPS_PROXY）后再尝试生成授权。","https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fissues\u002F182",{"id":156,"question_zh":157,"answer_zh":158,"source_url":139},23683,"Cherry Studio 客户端中如何正确配置 claude-kiro-oauth 的模型名称？","目前主要支持 `claude-sonnet-4-20250514` 和 `claude-3-7-sonnet-20250219` 这两个模型。如果在客户端填写了其他名称，系统默认会路由到 `claude-sonnet-4-20250514`，通常也能正常使用。请确保 config.json 中的 `MODEL_PROVIDER` 设置为 `claude-kiro-oauth`。",{"id":160,"question_zh":161,"answer_zh":162,"source_url":163},23684,"NextChat 显示 \"Failed to fetch\" 或 Chathub 插件报 404，但 curl 命令测试正常是什么原因？","这通常是跨域（CORS）或请求头处理问题。当直接使用 curl 能通而客户端报错时，请检查：\n1. 服务端日志中是否忽略了路径中的 `MODEL_PROVIDER` 设置（如日志显示 \"Ignoring invalid MODEL_PROVIDER in path segment\"）。\n2. 确保客户端请求的 URL 路径与服务端配置的路由一致。\n3. 检查是否需要在服务端配置允许跨域，或确认客户端是否正确传递了 API Key 和 Content-Type 头。","https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fissues\u002F12",[165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,255,260],{"id":166,"version":167,"summary_zh":168,"released_at":169},145167,"v2.12.8","**完整更新日志**: https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fcompare\u002Fv2.12.7...v2.12.8","2026-04-07T03:08:58",{"id":171,"version":172,"summary_zh":173,"released_at":174},145168,"v2.12.7","## 变更内容\n* 功能新增：model-router插件 + 安全增强 + embeddings支持，由@liwen30678在https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fpull\u002F447中实现\n* 回滚：“功能新增：model-router插件 + 安全增强 + embeddings支持”，由@justlovemaki在https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fpull\u002F448中执行\n* 功能新增：（补全原本的注释）支持为兼容provider管理模型列表，并增加单节点健康检查入口，由@HenryZ-0302在https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fpull\u002F451中实现\n\n## 新贡献者\n* @liwen30678 在https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fpull\u002F447中完成了首次贡献\n* @justlovemaki 在https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fpull\u002F448中完成了首次贡献\n* @HenryZ-0302 在https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fpull\u002F451中完成了首次贡献\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fcompare\u002Fv2.12.6...v2.12.7","2026-04-06T09:01:35",{"id":176,"version":177,"summary_zh":178,"released_at":179},145169,"v2.12.6","**完整更新日志**：https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fcompare\u002Fv2.12.5...v2.12.6","2026-04-06T08:59:43",{"id":181,"version":182,"summary_zh":183,"released_at":184},145170,"v2.12.5","**完整更新日志**: https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fcompare\u002Fv2.12.4...v2.12.5","2026-04-05T09:53:58",{"id":186,"version":187,"summary_zh":188,"released_at":189},145171,"v2.12.2","**完整更新日志**: https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fcompare\u002Fv2.12.1...v2.12.2","2026-03-30T04:00:51",{"id":191,"version":192,"summary_zh":193,"released_at":194},145172,"v2.12.1","## 变更内容\n* 修复：使用各模型各自的上下文窗口大小，以更准确地估算 input_tokens，由 @yin1245 在 https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fpull\u002F421 中实现。\n\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fcompare\u002Fv2.12.0...v2.12.1","2026-03-29T12:57:17",{"id":196,"version":197,"summary_zh":198,"released_at":199},145173,"v2.12.0","## 变更内容\n* 修复：Responses API 工具调用事件格式错误，导致 Codex CLI 无法进行多轮对话 by @wsyh4567 在 https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fpull\u002F419 中\n\n## 新贡献者\n* @wsyh4567 在 https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fpull\u002F419 中完成了首次贡献\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fcompare\u002Fv2.11.9...v2.12.0","2026-03-28T09:57:24",{"id":201,"version":202,"summary_zh":203,"released_at":204},145174,"v2.11.9","## 变更内容\n* 修复：在 @yin1245 提交的 https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fpull\u002F411 中，将 TOTAL_CONTEXT_TOKENS 更新为 100 万，以适配 Kiro 的上下文窗口升级。\n\n## 新贡献者\n* @yin1245 在 https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fpull\u002F411 中完成了首次贡献。\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fcompare\u002Fv2.11.8...v2.11.9","2026-03-28T09:57:15",{"id":206,"version":207,"summary_zh":208,"released_at":209},145175,"v2.11.8","**完整更新日志**: https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fcompare\u002Fv2.11.7.2...v2.11.8","2026-03-28T09:57:06",{"id":211,"version":212,"summary_zh":213,"released_at":214},145176,"v2.11.7","**完整更新日志**: https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fcompare\u002Fv2.11.6...v2.11.7","2026-03-20T14:41:08",{"id":216,"version":217,"summary_zh":218,"released_at":219},145177,"v2.11.6","**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fcompare\u002Fv2.11.5.2...v2.11.6","2026-03-20T14:40:58",{"id":221,"version":222,"summary_zh":223,"released_at":224},145178,"v2.11.5.2","**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fcompare\u002Fv2.11.5.1...v2.11.5.2","2026-03-16T14:55:24",{"id":226,"version":227,"summary_zh":228,"released_at":229},145179,"v2.11.5.1","**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fcompare\u002Fv2.11.5...v2.11.5.1","2026-03-16T11:55:27",{"id":231,"version":232,"summary_zh":233,"released_at":234},145180,"v2.11.5","## What's Changed\r\n* fix(grok): avoid blocking the first request on initial usage sync by @obdagli in https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fpull\u002F384\r\n\r\n## New Contributors\r\n* @obdagli made their first contribution in https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fpull\u002F384\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fcompare\u002Fv2.11.4.2...v2.11.5","2026-03-16T10:27:40",{"id":236,"version":237,"summary_zh":238,"released_at":239},145181,"v2.11.4.2","**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fcompare\u002Fv2.11.4.1...v2.11.4.2","2026-03-13T04:13:53",{"id":241,"version":242,"summary_zh":243,"released_at":244},145182,"v2.11.4.1","**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fcompare\u002Fv2.11.4...v2.11.4.1","2026-03-12T08:18:54",{"id":246,"version":247,"summary_zh":248,"released_at":249},145183,"v2.11.4","**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fcompare\u002Fv2.11.3...v2.11.4","2026-03-12T04:27:36",{"id":251,"version":252,"summary_zh":253,"released_at":254},145184,"v2.11.3","## What's Changed\r\n* fix: 修复 Codex→Claude 流式转换并发串流导致 content_block_start 丢失的问题 by @Cishoon in https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fpull\u002F379\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fcompare\u002Fv2.11.2...v2.11.3","2026-03-12T04:27:27",{"id":256,"version":257,"summary_zh":258,"released_at":259},145185,"v2.11.2","**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fcompare\u002Fv2.11.1...v2.11.2","2026-03-11T03:30:36",{"id":261,"version":262,"summary_zh":263,"released_at":264},145186,"v2.11.1","**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fjustlovemaki\u002FAIClient-2-API\u002Fcompare\u002Fv2.11.0...v2.11.1","2026-03-09T11:06:18"]