Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 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
b7dae4f
feat(providers): qwen-web 扩展包适配 v3.4.0 插件 SDK
free6589 Nov 7, 2026
6c37d70
feat(session): 插件静态登录方式随 provider 摘要下发
free6589 Nov 7, 2026
4a81539
fix(accounts): 凭证未换发但仍在有效期内时不再判为刷新失败
free6589 Nov 7, 2026
f99a09a
feat(usage): 识别上游账号临时限制并推迟自动余额查询
free6589 Nov 7, 2026
dbefc0b
fix(ui): 修正商汤日日新预置端点
free6589 Nov 7, 2026
439dbd6
chore(deploy): docker-compose 参数化(默认值与上游口径一致)
free6589 Nov 7, 2026
e1a98a6
ci(server): 增加后端单元测试工作流
free6589 Nov 7, 2026
bafce3f
chore: 忽略本地备份目录 backups/
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
58 changes: 58 additions & 0 deletions .github/workflows/server-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: server-tests

# 跑后端单元测试。
#
# ── 为什么需要这道闸 ──────────────────────────────────────────
# 本 crate 有约 320 个测试属性(`#[test]` + `#[tokio::test]`,2026-11-08 实测 323 个),但此前没有任何工作流执行 `cargo test`:
# `build.yml` 只在打 tag / 手动触发时构建安装包,
# `warm-cache.yml` 只预热依赖缓存,`frontend-artifacts.yml` 只校验前端产物同源。
# 也就是说:**测试写了,但从头到尾没人跑** —— 合进 beta 的改动要等装到用户机器上
# 才第一次真正被执行。选路、余额解析、错误码映射这几族逻辑恰恰是最怕静默回归的。
#
# ── 判据:只测后端 crate,不碰桌面壳 ──────────────────────────
# 判据只有一条:`cargo test -p agent2api-server` 必须通过。
# 后端测试全部在这一个 crate 里(桌面壳 `src/` 下没有测试),
# 所以「只测 server」不是偷懒的折中,而是**已经覆盖了全部现有测试**。
# 为什么不顺手把壳也编一遍:壳是 Tauri,在 Linux 上要 webkit2gtk / gtk3 一整套
# 系统库(`server/Cargo.toml` 自己写着拆分就是为了「headless 一个都不用」,
# 且其依赖里「刻意没有的:tauri 及其插件」)。测试 job 不该为 0 个测试背这个包。
# 同理不加 `--all-features`:本仓库的 feature 组合没有既有的验证约定,
# 贸然打开可能引入需要系统库或网络的构建,那会让这道闸变成噪音而不是信号。
#
# ── 与现有工作流的差异 ────────────────────────────────────────
# 触发方式照抄 `frontend-artifacts.yml`(main / beta 的 push 与 pull_request),
# 因为它已经是这个仓库里「PR 上跑校验」的既成先例;构建工具链与缓存写法照抄
# `build.yml`(同一个 rust-toolchain 动作、同一个 rust-cache 配置口径)。
# 失败时输出就是 cargo 自己的编译与断言错误,最常见的原因按频率排:
# 1. 改动破坏了既有单测(看 `test result: FAILED` 上面那条 panic 的文件与行号);
# 2. 新增测试依赖了真实网络或本机路径(CI 上必挂,请改成打桩或用临时目录)。

on:
push:
branches: [main, beta]
pull_request:
branches: [main, beta]
workflow_dispatch:

permissions:
contents: read

jobs:
server-tests:
name: 后端测试(agent2api-server)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7

- name: 安装 Rust
uses: dtolnay/rust-toolchain@stable

# 与 build.yml 同一口径:.cargo/config.toml 把 target-dir 指到仓库根的 target/
- name: 缓存 Rust 依赖
uses: Swatinem/rust-cache@v2
with:
workspaces: desktop-tauri/src-tauri -> ../../target

- name: 跑测试
working-directory: desktop-tauri/src-tauri
run: cargo test -p agent2api-server
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,5 @@ desktop-tauri/mobile/ios/DerivedData/
# 提供商插件(独立仓库的本地开发目录,不得进入本仓库历史)
/agent2api-providers/
/plugin/

backups/
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
2 changes: 1 addition & 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
Binary file removed assets/qq-card.png
Binary file not shown.
Binary file removed assets/screenshots/checkin-center.png
Binary file not shown.
1 change: 1 addition & 0 deletions contrib/web-extra/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target/
Loading
Loading