Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
8e8dea9
优化
aimod-cc Oct 31, 2026
42db58d
1. 新增:路由工作台,路由页改为「工作台 / 执行 / 配置」三栏,按路径聚合会话,可按会话或账号搜索。
aimod-cc Nov 1, 2026
2680a89
1. 核心更新
aimod-cc Nov 3, 2026
1bd1ec9
1. 新增:路由工作台新增「模型」筛选 —— 模型下拉只列当前时间窗内真的发过请求的模型,选中后不再只剩它自己。
aimod-cc Nov 3, 2026
31bc7bd
1. 新增:会话图片压缩 —— 转发前把对话里内联的 base64 大图缩到长边上限并重编码,同一张原图复用压缩结果;默认开启,长边、质量…
aimod-cc Nov 3, 2026
0add462
1. 更新:重建手机端与 Service Worker 产物,版本号跟到 3.4.0。
aimod-cc Nov 3, 2026
3ff4b82
1. 新增:工具服务页 —— 提供网络搜索与视觉分析两类能力,支持 Skill / MCP / API 三种接入方式;四家搜索提供商的密钥…
aimod-cc Nov 4, 2026
34582c7
1. 核心更新
aimod-cc Nov 5, 2026
e8bed73
1. 新增:自定义路由组,可将不同提供商、不同模型组合成一个对外模型 ID,配置参与成员、账号顺序与失败后备选。
aimod-cc Nov 5, 2026
d51d97b
新增第三方模型回答完自动折叠过程开关
mojie126 Nov 5, 2026
b042ddf
修复长时间运行的内存与数据库开销问题
mojie126 Nov 5, 2026
eacf7c3
1. 核心更新
aimod-cc Nov 6, 2026
19d350e
优化:
aimod-cc Nov 6, 2026
196bd64
### 优化
aimod-cc Nov 7, 2026
b1dbef8
选择性合并 PR #496:内存与请求写入优化
mojie126 Nov 7, 2026
defbc81
合并 PR #495 并修正 Codex 回答阶段标记
mojie126 Nov 7, 2026
2c55b92
完善助手模型查询与能力展示
aimod-cc Nov 7, 2026
8223b5e
feat(deploy): Omarchy/Arch 本机部署辅助脚本与加固 compose(适配 3.4.x)
free6589 Nov 7, 2026
b71413d
docs(install): 新增 Arch / Omarchy 源码部署一节(六份 install + README 速查表)
free6589 Nov 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .agents/skills/provider-adaptation/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ CatPaw 与 AutoClaw 都曾把「上游没有目录接口」写进注释,后来

`ui/providers.js` **不用改** —— 它从 `/api/session` 的 `accounts.providers`(后端注册表摘要)自动派生。

改完前端要重新构建岛:`npm run ui:islands`(产物 `ui/islands/ui.js` 要提交)。
改完前端要重新构建岛:`npm run ui:islands`(产物 `ui/islands/ui.js`、`ui/islands/login.js` 都要提交)。

## 4. i18n 与文档

Expand Down Expand Up @@ -297,7 +297,7 @@ node scripts/probe-provider.mjs \
- **两个地区拆家时,`PROVIDERS` 里要相邻排列。** 中间隔着别家会让「找国际版」变成一次扫描。
- **`implemented_kinds()` 与 `PROVIDERS` 是两个口径。** 前者是「适配器接线了没有」,后者是「注册了没有」。占位实现不该进前者。
- **签到清单的默认全选是个陷阱。** 加一家进 `CHECKIN_PROVIDERS` 会让存量用户第二天零点就多发一轮请求。想默认开启就升版本号;不想默认开启就别进 `PROVIDERS_ADDED_IN`。
- **改完前端要重新构建岛并提交产物。** `ui/islands/ui.js` 是检入仓库的,只改 tsx 不构建等于没改。
- **改完前端要重新构建岛并提交产物。** `ui/islands/ui.js` 与 `ui/islands/login.js` 都是检入仓库的,只改 tsx 不构建等于没改。

## 9. 参考实现

Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/frontend-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: frontend-artifacts
# 校验「入库的前端构建产物」与源码同源。
#
# ── 为什么需要单独一道闸 ──────────────────────────────────────
# 本仓库把构建产物**入库**(`ui/islands/ui.js`、`ui/islands/ui.css`、`ui/i18n/**`、
# `ui/m/**`),而 Tauri 打包的正是 `ui/` 这个静态目录(见 tauri.conf.json 的
# 本仓库把构建产物**入库**(`ui/islands/ui.js`、`ui/islands/ui.css`、
# `ui/islands/login.js`、`ui/i18n/**`、`ui/m/**`),而 Tauri 打包的正是 `ui/` 这个静态目录(见 tauri.conf.json 的
# frontendDist)—— 也就是说上线的字节就是仓库里那几份。于是「只改源码不重新构建」
# 与「手改产物」都能一路合进 beta 并被打进安装包,而常规 review 看不出 1.1 MB
# 压缩文件里少了什么。
Expand Down Expand Up @@ -68,7 +68,9 @@ jobs:

- name: 重建产物
run: |
# 岛产物:build 脚本是 `tsc --noEmit && vite build`,顺带做类型检查
# 岛产物:build 脚本是 `tsc --noEmit && vite build && vite build --config
# vite.login.config.ts` —— 主面板 ui.js / ui.css 与登录页独立的 login.js
# 一次出齐,顺带做类型检查
npm --prefix desktop-tauri/ui-islands run build
# 手机端产物:同样带类型检查,产物落 ui/m/
npm --prefix desktop-tauri/mobile run build
Expand Down Expand Up @@ -96,5 +98,5 @@ jobs:
echo " npm --prefix desktop-tauri/ui-islands run build"
echo " npm --prefix desktop-tauri/mobile run build"
echo " node desktop-tauri/i18n/build.mjs"
echo "(不要手动编辑 ui/islands/ui.js、ui/m/** 或 ui/i18n/** —— 它们是产物,重建即可)"
echo "(不要手动编辑 ui/islands/ui.js、ui/islands/login.js、ui/m/** 或 ui/i18n/** —— 它们是产物,重建即可)"
exit 1
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ dist/
.env
data/

# omarchy-agent2api.sh backup 的归档目录(停服 → 打包 ./data → 起服)
backups/

# ── 手机 APK(Capacitor)──────────────────────────────────────
# android/ 是 `npx cap add android` 生成的原生工程,需要入库:
# 图标、Manifest、网络安全策略都是手改过的,重新生成会丢。
Expand Down
4 changes: 4 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@

其余细则(分支落脚点、署名与 AI 落款、六处版本号、正式版 / beta 完整流程、验收清单、已知坑与排查)见上述 Skill。

## 反代提供商问题排查

收到反代提供商相关的问题反馈时,**优先使用网络搜索查找已有解决方案**,重点参考同类项目的 Issue、PR、修复记录和适配实现,了解其他项目是否遇到过相同问题、如何解决。**不要默认从零自行排查**:先核对已有方案与本项目的适用性,优先借鉴可靠的解决思路;未找到可靠方案、现有方案不适用或仍有未解决的问题时,再开展针对性的本地排查。

## 文档落点

安装 / 部署 / 升级 / 排错说明只在 `docs/install.md`(另有 5 份译文 `docs/install.{en,zh-Hant,ja,ko,pt-BR}.md`,六份一一对应)里维护;各语言 README 只留「快速开始」速查表 + 一个指向安装文档的链接,**不要再把安装细节写回 README**。产物名、端口、环境变量、安装脚本参数有改动时,六份一起改。
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Agent2API is an **AI routing gateway with Agent client takeover**. It exposes a

## ✨ Key Features

- 🔌 **Unified model APIs** — OpenAI Chat / Responses / Images and Anthropic Messages, with a unified model catalog; Raccoon, Loomy, Antigravity and ModelScope supply image generation, while Loomy, Antigravity and ModelScope also support reference-image editing. Both are available as AI assistant tools
- 🔌 **Unified model APIs** — OpenAI Chat / Responses / Images and Anthropic Messages, with a unified model catalog; Raccoon, Loomy, Antigravity, ModelScope, WorkBuddy and Doubao Work supply image generation, while Raccoon, Loomy, Antigravity, ModelScope and WorkBuddy also support reference-image editing. Both are available as AI assistant tools
- 🧭 **AI routing** — model mapping, account priority, load balancing, session affinity and failover in one place
- 🤖 **Agent client takeover** — manage multiple connection profiles for local clients, import existing settings, preview writes and switch between the gateway and custom services
- 🧩 **Plugin extensions** — additional provider implementations are installed and updated separately, not bundled with the application; custom providers do not require them
Expand Down Expand Up @@ -83,6 +83,8 @@ cd C:\agent2api-pkg; .\install-service.ps1
docker run -d --name agent2api --restart unless-stopped -p 3065:3065 -v ./data:/data aimodcc/agent2api:latest
```

> On Arch / Omarchy, a source-build setup hardened for local use (loopback-only by default) ships in `scripts/`: see [Installation & deployment → Docker](./docs/install.en.md#docker).

Whichever form you pick, open the panel afterwards (`http://127.0.0.1:3065/`; use the host IP for the server and Docker forms), register the admin account, then create a key on the "Gateway Keys" page. Connectivity check: `curl http://127.0.0.1:3065/health`

**Mobile**: open `http://<gateway IP>:3065/m` in a browser (you can "Add to Home Screen" for a full-screen PWA). For a standalone icon, install `Agent2API-<version>.apk` (Android) or `Agent2API-<version>.ipa` (iOS, unsigned — re-sign it yourself) from the Release. Details: [Install & deploy → Mobile](./docs/install.en.md#mobile).
Expand Down
Binary file removed assets/qq-card.png
Binary file not shown.
Binary file removed assets/screenshots/checkin-center.png
Binary file not shown.
10 changes: 10 additions & 0 deletions desktop-tauri/i18n/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ async function main() {
let hantGenerated = 0
let hantManual = 0
for (const locale of OUTPUT_LOCALES) {
// 主面板走合并词典(一个文件装下该语言的全部域):原来 head 里要写 22 个
// <script>,现在只剩 1 个。逐域文件仍然保留 —— 手机端按 manifest 增量取、
// 登录页只取 login/accounts 两个域,都还依赖它们。
const combined = []
for (const domain of produced) {
const manual = values.get(`${locale}/${domain}`) || {}
const entries = []
Expand All @@ -179,6 +183,12 @@ async function main() {
if (typeof value === 'string' && value) entries.push([key, value])
}
outputs.push({ file: path.join(OUT_DIR, locale, `${domain}.js`), content: dictFileContent(locale, domain, entries) })
combined.push(...entries)
}
// 单域构建(--domain=)不碰合并词典:它手里只有这一个域,写出去会
// 把主面板的整份词典截成残本。改完单个域后请跑一次完整构建。
if (!ONLY_DOMAIN) {
outputs.push({ file: path.join(OUT_DIR, 'combined', `${locale}.js`), content: dictFileContent(locale, 'combined', combined) })
}
}

Expand Down
82 changes: 82 additions & 0 deletions desktop-tauri/i18n/i18n-src/en/account-settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"{count} 个分区有未保存的更改": "Unsaved changes in {count} sections",
"{count} 个账号共用": "Shared by {count} accounts",
"{count} 个账号共用提供商的连接配置。": "{count} accounts share this provider's connection settings.",
"{count} 个账号共用连接配置": "Connection settings shared by {count} accounts",
"✅ 已改回跟随提供商的 Base URL": "✅ This account follows the provider's Base URL again",
"「{name}」名下 {count} 个账号共用这些连接设置。修改协议或 Base URL 可能中断正在进行的请求。": "These connection settings are shared by {count} accounts under {name}. Changing the protocol or Base URL may interrupt requests in progress.",
"「{name}」名下 {count} 个账号共用;修改协议或地址可能中断正在进行的请求。": "Shared by {count} accounts under {name}. Changing the protocol or address may interrupt requests in progress.",
"仅当前账号": "This account only",
"仅用于 OpenCode Zen 这类上游,普通提供商请保持关闭。": "Only for upstream services such as OpenCode Zen. Leave this off for other providers.",
"代理只作用于当前账号,不改变其他账号的出网方式。": "The proxy applies only to this account and does not change how other accounts connect.",
"余额读数也是限制器余额规则的数据来源。": "Balance readings also supply the data used by balance-based limiter rules.",
"使用密钥访问上游": "Use a key to access the upstream service",
"保存后将移除密钥,转发与拉取模型都不发送鉴权头。请确认上游确实无需凭证。": "Saving removes the key and omits authentication headers when forwarding requests or fetching models. Make sure the upstream service does not require credentials.",
"保存提供商共用配置?": "Save shared provider settings?",
"保存更改": "Save changes",
"共用": "Shared",
"关闭后不参与转发,余额查询不受影响。": "When disabled, this account is excluded from forwarding. Balance queries are unaffected.",
"凭证设置": "Credentials",
"出网方式": "Connection method",
"前往模型管理": "Go to model management",
"前往模型管理会关闭账号设置,尚未保存的修改不会生效。": "Going to model management closes account settings and discards unsaved changes.",
"包含提供商共用配置,将影响 {count} 个账号": "Includes shared provider settings affecting {count} accounts",
"原密钥不会回显;更换密钥不会改变账号 ID。": "The existing key is never displayed. Replacing it does not change the account ID.",
"各分区的更改将统一保存": "Changes across all sections are saved together",
"启用账号": "Enable account",
"在账号列表中拖动分组或行首把手,调整转发顺序。": "Drag a group or a row handle in the account list to change the forwarding order.",
"基本信息": "Basic information",
"填写接口基址,无需追加 {path}。": "Enter the API base URL without appending {path}.",
"将同时删除名下 {count} 个账号,无法恢复。": "Also deletes all {count} accounts under this provider. This cannot be undone.",
"开启后会改写请求体,补齐会话头与占位工具;未填密钥时使用匿名凭证 public。": "When enabled, request bodies are rewritten to add session headers and placeholder tools. Without a key, the anonymous credential public is used.",
"当前没有凭证,转发时会跳过此账号。请填写密钥或选择「无需鉴权」。": "This account has no credentials and will be skipped when forwarding. Enter a key or select No authentication.",
"当前账号": "Current account",
"所有分区中尚未保存的修改都会被放弃。已确认的独立清除操作不受影响。": "Unsaved changes in all sections will be discarded. Previously confirmed standalone clearing operations are unaffected.",
"提供商名称": "Provider name",
"改回跟随": "Follow provider",
"改回跟随提供商": "Follow provider",
"改回跟随提供商?": "Follow the provider again?",
"新密钥待保存": "New key pending save",
"无需鉴权": "No authentication",
"显示新输入的密钥": "Show the newly entered key",
"本地服务或无需凭证的上游": "Local or credential-free upstream services",
"查询凭证": "Query credentials",
"模型清单与映射在「模型管理」中维护。": "Manage model lists and mappings in Model management.",
"模拟 OpenCode 官方客户端": "Emulate the official OpenCode client",
"正在保存…": "Saving…",
"正在编辑提供商共用配置": "Editing shared provider settings",
"没有未保存的更改": "No unsaved changes",
"没有规则或全部停用时不限制;跳过后自动恢复,禁用后需手动启用。": "No limits apply if there are no rules or all rules are off. Skipped accounts recover automatically; disabled accounts must be enabled manually.",
"清除余额查询凭证?": "Clear balance query credentials?",
"清除已存 API Key?": "Clear the saved API Key?",
"清除已存密钥": "Clear saved key",
"清除查询凭证?": "Clear query credentials?",
"用明确的规则保护当前账号的额度。": "Protect this account's quota with explicit rules.",
"留空不修改,替换后点击「保存更改」生效。": "Leave blank to keep the key. A replacement takes effect after clicking Save changes.",
"留空保留当前密钥,输入新密钥以替换": "Leave blank to keep the current key, or enter a replacement",
"确认保存": "Confirm save",
"确认后立即生效,不受底部保存按钮控制。没有凭证且未开启「无需鉴权」时,此账号将被转发跳过。": "This takes effect immediately after confirmation, independently of the Save button. Without credentials or No authentication, this account will be skipped when forwarding.",
"确认后立即生效,不受底部保存按钮控制。通常可继续复用转发用的登录凭证。": "This takes effect immediately after confirmation, independently of the Save button. The login credentials used for forwarding can usually be reused.",
"确认后立即生效,余额查询可能显示「未配置」。取消账号设置不会恢复已清除的凭证。": "This takes effect immediately after confirmation. Balance queries may show Not configured. Canceling account settings will not restore cleared credentials.",
"确认弹窗不可用,请重新打开页面": "The confirmation dialog is unavailable. Reopen the page.",
"管理当前账号的凭证与可用套餐。": "Manage this account's credentials and available plans.",
"统一管理提供商的协议、地址与兼容选项。": "Manage the provider's protocol, address, and compatibility options in one place.",
"自定义 API": "Custom API",
"要修改连接地址或协议?": "Need to change the connection address or protocol?",
"设置当前账号访问上游的出网方式。": "Choose how this account connects to the upstream service.",
"设置账号名称、启用状态与转发行为。": "Set the account name, enabled state, and forwarding behavior.",
"请填写有效的 HTTP 或 HTTPS 地址": "Enter a valid HTTP or HTTPS URL",
"请求端点": "Request endpoint",
"账号凭证": "Account credentials",
"转发行为": "Forwarding behavior",
"达到上限后,将请求交给其他账号。": "When the limit is reached, requests are passed to other accounts.",
"这个账号单独存了一份地址:{url},转发时优先用它。上面改的是提供商共用地址,不会覆盖它。": "This account stores its own address ({url}), which takes precedence when forwarding. Changing the shared provider address above does not override it.",
"这个账号将改用提供商当前保存的 Base URL:{url}。确认后立即生效,不受底部保存按钮控制。": "This account will use the Base URL currently saved on the provider: {url}. Takes effect immediately and is not controlled by the Save button below.",
"连接参数": "Connection parameters",
"连接设置": "Connection settings",
"配置余额查询凭证与自动刷新间隔。": "Configure balance query credentials and the automatic refresh interval.",
"鉴权方式": "Authentication method",
"隐藏新输入的密钥": "Hide the newly entered key",
"高级兼容": "Advanced compatibility",
"默认关闭": "Off by default"
}
Loading
Loading