@dorokuma/magpie-gemini-web 0.18.1 → 0.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.en.md +8 -7
- package/README.md +8 -7
- package/index.mjs +4 -4
- package/lib/backend-release.json +14 -14
- package/lib/backend.mjs +29 -2
- package/lib/native.mjs +119 -10
- package/package.json +7 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
本文件按版本倒序记录 `magpie-gemini-web`(0.15.0 起为 `@dorokuma/magpie-gemini-web`)的全部已发布与待发变更,依据本仓 `git log` 与 tag 事实编写。
|
|
4
4
|
|
|
5
|
+
## 0.18.2 - 2026-11-19
|
|
6
|
+
|
|
7
|
+
### 变更
|
|
8
|
+
- Gemini Web 后端 pin 升级至 **`dorokuma/gemini-web2api-go` `v6.2.2`** 官方预编译二进制:task 模型不再注入对话模式专属的平台通知免疫词,所有模型的工具格式锚点保留。
|
|
9
|
+
|
|
10
|
+
### 新增
|
|
11
|
+
- 新增 `per_ip_concurrent` / `per_ip_rpm` / `per_ip_rph` 三个 Magpie 参数区选项(默认 `5` / `30` / `80`,与 gemini-web2api-go 后端默认一致,`0` 表示不限),用于配置本地受管后端的单 IP 限流,解决 `direct IP slot full: rph limit reached (429)`。选项在 `settings()` 中按后端 `validateRuntimeConfig` 范围校验(`0–1000` / `0–10000` / `0–100000`,须为整数);新建 `config.json` 会写入这些字段,存量 `config.json` 仅在值变化时按键合并(`port`、`multi_turn` 等其它字段与 `0600` 权限原样保留),运行中的受管后端经 `GET` + `PUT /admin/api/config` 热生效且值已一致时跳过写入;连接自建外部后端时仅作校验,不触碰外部实例。
|
|
12
|
+
|
|
5
13
|
## 0.18.1 - 2026-11-19
|
|
6
14
|
|
|
7
15
|
### 变更
|
package/README.en.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Use **Google AI Studio** and **Gemini on the web** through your Google account in [Magpie](https://usemagpie.ai/). The plugin runs [AIStudio2API](https://github.com/Mag1cFall/AIStudio2API) and [gemini-web2api-go](https://github.com/zexadev/gemini-web2api-go) locally, providing chat, native function calling, Nano Banana image generation, and Deep Research through OpenAI-compatible and Gemini APIs.
|
|
8
8
|
|
|
9
|
-
> **New model support:** **Google AI Studio (`ai-studio`)** automatically follows official stable backend releases and supports **`gemini-4-hydrogen`** (including the `xhigh` thinking tier) and **`gemini-4-carbon`** (requires an eligible account tier such as Google AI Ultra). **Gemini Web (`gemini-web`)** is backed by [`dorokuma/gemini-web2api-go` `v6.2.
|
|
9
|
+
> **New model support:** **Google AI Studio (`ai-studio`)** automatically follows official stable backend releases and supports **`gemini-4-hydrogen`** (including the `xhigh` thinking tier) and **`gemini-4-carbon`** (requires an eligible account tier such as Google AI Ultra). **Gemini Web (`gemini-web`)** is backed by [`dorokuma/gemini-web2api-go` `v6.2.2`](https://github.com/dorokuma/gemini-web2api-go/releases/tag/v6.2.2), which natively supports dedicated `gemini-4-carbon` / `gemini-4-hydrogen` / **`gemini-4-neon`** model IDs (including `-thinking` variants) and mutually recognizes slot upgrades/downgrades under `strict_model`; the `gemini-4-neon` family thinks server-side internally and never emits `reasoning_content`. **Chat and Task modes are separate:** use `gemini-4-neon` / `gemini-4-hydrogen` / `gemini-4-carbon` for everyday conversations (`gemini-4-carbon` and its `-thinking` / `-thinking-medium` variants are chat-only), and the dedicated **`gemini-4-neon-task`** / **`gemini-4-carbon-task`** / **`gemini-4-hydrogen-task`** models for task- and tool-heavy scenarios (they map to Gemini Web's Task mode).
|
|
10
10
|
|
|
11
11
|
## Fork Notice & Acknowledgements
|
|
12
12
|
|
|
@@ -19,7 +19,7 @@ This project is an actively maintained **fork of [BUKOWSKIREAL/magpie-gemini-web
|
|
|
19
19
|
**Key differences from upstream** (full history in [CHANGELOG](CHANGELOG.md)):
|
|
20
20
|
|
|
21
21
|
1. npm package renamed to the scoped **`@dorokuma/magpie-gemini-web`**; the original unscoped `magpie-gemini-web` remains maintained by the upstream author as an independent npm package.
|
|
22
|
-
2. The Gemini Web backend is pinned to the **official Release prebuilt binaries** of `dorokuma/gemini-web2api-go` (currently `v6.2.
|
|
22
|
+
2. The Gemini Web backend is pinned to the **official Release prebuilt binaries** of `dorokuma/gemini-web2api-go` (currently `v6.2.2`, SHA-256 synced one-way by script); the local patch-and-rebuild pipeline was retired.
|
|
23
23
|
3. Gemini Web adds `gemini-4-carbon` / `gemini-4-hydrogen` / `gemini-4-neon` model IDs (plus the dedicated task-mode models `gemini-4-neon-task` / `gemini-4-carbon-task` / `gemini-4-hydrogen-task`) with slot cross-validation; fixes include phantom session cleanup, AI Studio proxy precedence, and atomic publish/self-healing for update locks.
|
|
24
24
|
|
|
25
25
|
|
|
@@ -37,7 +37,7 @@ The plugin provides two independent providers that can be used individually or t
|
|
|
37
37
|
| **Image generation** | Nano Banana models, for Magpie's image generation (Magpie v0.1.2075+, see below) | Not supported |
|
|
38
38
|
| **Sign-in method** | Automatic official installation; confirm an imported account | Local wizard: copy `cookie` from a private/incognito window |
|
|
39
39
|
| **Usage cards** | Shows models currently on cooldown and recovery times | Syncs **5-hour** & **weekly** usage and reset times from the web |
|
|
40
|
-
| **Local backend** | AIStudio2API (automatic installation and stable updates) | gemini-web2api-go (`v6.2.
|
|
40
|
+
| **Local backend** | AIStudio2API (automatic installation and stable updates) | gemini-web2api-go (`v6.2.2` pinned binary) |
|
|
41
41
|
|
|
42
42
|
---
|
|
43
43
|
|
|
@@ -158,6 +158,7 @@ magpie plugin options @dorokuma/magpie-gemini-web '{"studio":{"proxy":"http://12
|
|
|
158
158
|
| `proxy` | none | `gemini-web` only | Proxy for the managed Gemini Web backend to reach Google (`http` / `https` / `socks5` / `socks5h`), or set `GEMINI_WEB_PROXY` env var / enter during sign-in |
|
|
159
159
|
| `baseURL` | `http://127.0.0.1:8083/v1` | `gemini-web` only | Default Gemini Web backend URL |
|
|
160
160
|
| `contextLimit` / `outputLimit` | `1000000` / `8192` | `gemini-web` only | Context and output limits reported to clients |
|
|
161
|
+
| `per_ip_concurrent` / `per_ip_rpm` / `per_ip_rph` | `5` / `30` / `80` | `gemini-web` only | Per-IP rate limits of the managed local backend: concurrent, per-minute and per-hour request caps; `0` means unlimited. Set them in Magpie's options area — they are written to `config.json` and hot-synced to a running backend, no restart needed. With a self-hosted backend they are validated only and never change the external instance |
|
|
161
162
|
| `studio.proxy` | none | `ai-studio` only | Proxy for reaching Google (`http` / `https` / `socks5`), or set `AI_STUDIO_PROXY` env var; when set, it takes precedence over the proxy saved in the admin page. When omitted, falls back to AI_STUDIO_PROXY or the proxy saved in the admin page; setting "" disables both (the backend's own system-proxy detection on macOS/Windows may still apply) |
|
|
162
163
|
| `studio.accountOrder` | none | `ai-studio` only | Account priority order (comma-separated string or string array, e.g. `["b@gmail.com","a@gmail.com"]`); seeds `ACCOUNT_ORDER` in `.env` when unset, while preserving any non-empty value saved in the admin page |
|
|
163
164
|
| `studio.modelAccounts` | none | `ai-studio` only | Per-model account bindings (`"model:acc1|acc2"` string or `{ "gemini-3.1-pro-preview": ["acc1", "acc2"] }` object); seeds `MODEL_ACCOUNTS` in `.env` when unset, while preserving any non-empty value saved in the admin page |
|
|
@@ -243,13 +244,13 @@ When a plugin error asks you to run a command, it includes the full ready-to-cop
|
|
|
243
244
|
- Models with `-build` or `assistant_route` are filtered out: they inject the Build coding assistant's own system prompt and are not offered as ordinary Agent models. Refresh with `magpie provider models ai-studio` after upgrading.
|
|
244
245
|
|
|
245
246
|
**Gemini Web optimized backend upgrades & rollback:**
|
|
246
|
-
- The missing multi-account index in [#53](https://github.com/dorokuma/magpie-gemini-web/issues/53) is fixed. Reimport affected cookies or correct the index in backend account management. Backend [`dorokuma/gemini-web2api-go` `v6.2.
|
|
247
|
-
- One-click setup pins the prebuilt [v6.2.
|
|
248
|
-
- **Upgrading:** On load the plugin detects a stale managed backend process, stops it and upgrades the binary to the pinned `v6.2.
|
|
247
|
+
- The missing multi-account index in [#53](https://github.com/dorokuma/magpie-gemini-web/issues/53) is fixed. Reimport affected cookies or correct the index in backend account management. Backend [`dorokuma/gemini-web2api-go` `v6.2.2`](https://github.com/dorokuma/gemini-web2api-go/releases/tag/v6.2.2) natively exposes dedicated `gemini-4-carbon`, `gemini-4-hydrogen`, and `gemini-4-neon` model IDs (including `-thinking` variants; the Neon family thinks server-side internally and never emits `reasoning_content`), and drops the public `gemini-4-argon*` models (the old Argon slot was renamed to 4 Carbon in the upstream catalog and Argon is delisted by Google—use `gemini-4-carbon*` or `gemini-4-neon*`); its `strict_model` slot check mutually recognizes display-name upgrades/downgrades, so paid accounts whose `gemini-3.8-flash` calls are routed to `4 Hydrogen` are identified correctly instead of failing with `429 model_downgraded`.
|
|
248
|
+
- One-click setup pins the prebuilt [v6.2.2](https://github.com/dorokuma/gemini-web2api-go/releases/tag/v6.2.2) binaries from the backend repository by default (one repo, one artifact: six-platform SHA-256 pins live in `lib/backend-release.json`; the plugin no longer patches and rebuilds the backend). Chat requests are timed by silence: while Google queues a request it sends a heartbeat every 60 s, and the backend waits through it for the first words. A try is given up, and retried, only after Google has sent nothing for `request_timeout_sec` (180 s by default), so a long reply that keeps coming is never cut off either.
|
|
249
|
+
- **Upgrading:** On load the plugin detects a stale managed backend process, stops it and upgrades the binary to the pinned `v6.2.2`, which may interrupt in-flight generation requests. Wait for in-flight requests to finish, or stop the existing process manually (PID in `backend.pid` inside the data directory) before upgrading. Instances not managed or recognizable by the plugin are not guaranteed to auto-update. Config and cookies are preserved.
|
|
249
250
|
- **Rollback to upstream / restore the pinned build** (run in the plugin directory after stopping the backend):
|
|
250
251
|
```bash
|
|
251
252
|
npm run backend:install:upstream # Roll back and pin to upstream zexadev v4.28.0
|
|
252
|
-
npm run backend:install # Restore the default pinned v6.2.
|
|
253
|
+
npm run backend:install # Restore the default pinned v6.2.2
|
|
253
254
|
```
|
|
254
255
|
- For pin sync, verification and smoke procedures, see [docs/backend-release.md](docs/backend-release.md).
|
|
255
256
|
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
让 [Magpie](https://usemagpie.ai/) 通过你的 Google 账号使用 **Google AI Studio** 与 **Gemini 网页版**。插件在本机自动运行 [AIStudio2API](https://github.com/Mag1cFall/AIStudio2API) 与 [gemini-web2api-go](https://github.com/zexadev/gemini-web2api-go),提供对话、原生工具调用、Nano Banana 图片生成与 Deep Research 等能力。
|
|
8
8
|
|
|
9
|
-
> **新模型支持说明**:**Google AI Studio (`ai-studio`)** 默认自动跟随官方最新稳定版后端,现已直接支持 **`gemini-4-hydrogen`**(含 `xhigh` 思考档位)与 **`gemini-4-carbon`**(需账号具备对应权益,如 Google AI Ultra)。**Gemini Web (`gemini-web`)** 由后端 [`dorokuma/gemini-web2api-go` `v6.2.
|
|
9
|
+
> **新模型支持说明**:**Google AI Studio (`ai-studio`)** 默认自动跟随官方最新稳定版后端,现已直接支持 **`gemini-4-hydrogen`**(含 `xhigh` 思考档位)与 **`gemini-4-carbon`**(需账号具备对应权益,如 Google AI Ultra)。**Gemini Web (`gemini-web`)** 由后端 [`dorokuma/gemini-web2api-go` `v6.2.2`](https://github.com/dorokuma/gemini-web2api-go/releases/tag/v6.2.2) 原生支持 `gemini-4-carbon` / `gemini-4-hydrogen` / **`gemini-4-neon`** 专用模型 ID(含 `-thinking` 思考变体),`strict_model` 开启时也能正确互认槽位升降级;`gemini-4-neon` 系列为服务端内部思考模型,回复中不输出 `reasoning_content`。**对话模式与任务模式分离**:日常对话用 `gemini-4-neon` / `gemini-4-hydrogen` / `gemini-4-carbon`(`gemini-4-carbon` 及 `-thinking` / `-thinking-medium` 变体为纯对话模式),任务/工具密集型场景可选独立任务模式模型 **`gemini-4-neon-task`**、**`gemini-4-carbon-task`** 与 **`gemini-4-hydrogen-task`**(对应 Gemini Web 网页端「任务」开关)。
|
|
10
10
|
|
|
11
11
|
## Fork 声明与致谢
|
|
12
12
|
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
**与原版的主要差异**(完整历史见 [CHANGELOG](CHANGELOG.md)):
|
|
20
20
|
|
|
21
21
|
1. npm 包名迁移为作用域包 **`@dorokuma/magpie-gemini-web`**;原版无作用域包 `magpie-gemini-web` 仍由原作者维护,两者在 npm 上是相互独立的包。
|
|
22
|
-
2. Gemini Web 后端固定使用 `dorokuma/gemini-web2api-go` 的**官方 Release 预编译二进制**(当前 `v6.2.
|
|
22
|
+
2. Gemini Web 后端固定使用 `dorokuma/gemini-web2api-go` 的**官方 Release 预编译二进制**(当前 `v6.2.2`,SHA-256 由脚本单向同步、禁止手改),移除本地补丁重编流水线。
|
|
23
23
|
3. Gemini Web 新增 `gemini-4-carbon` / `gemini-4-hydrogen` / `gemini-4-neon` 模型 ID(含独立的任务模式模型 `gemini-4-neon-task` / `gemini-4-carbon-task` / `gemini-4-hydrogen-task`)与互认槽位校验;修复幻影会话、AI Studio 代理优先级、更新锁原子发布与自愈等问题。
|
|
24
24
|
|
|
25
25
|
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
| **图片生成** | Nano Banana 系列模型,供 Magpie 的图片生成使用(需要 Magpie v0.1.2075+,见下文) | 不支持 |
|
|
38
38
|
| **登录方式** | 自动安装官方后端,导入账号后确认连接 | 本机向导页引导:无痕窗口登录并复制 `cookie` |
|
|
39
39
|
| **额度卡片** | 显示冷却中的模型与恢复时间 | 同步网页版 **5 小时** 与 **每周** 用量及重置时间 |
|
|
40
|
-
| **本地后端** | AIStudio2API(自动安装并跟随官方稳定版) | gemini-web2api-go (`v6.2.
|
|
40
|
+
| **本地后端** | AIStudio2API(自动安装并跟随官方稳定版) | gemini-web2api-go (`v6.2.2` 固定 pin 二进制) |
|
|
41
41
|
|
|
42
42
|
---
|
|
43
43
|
|
|
@@ -158,6 +158,7 @@ magpie plugin options @dorokuma/magpie-gemini-web '{"studio":{"proxy":"http://12
|
|
|
158
158
|
| `proxy` | 无 | 仅 `gemini-web` | 一键配置后端访问 Google 的代理(`http` / `https` / `socks5` / `socks5h`),也可用环境变量 `GEMINI_WEB_PROXY` 或在登录第一步填写 |
|
|
159
159
|
| `baseURL` | `http://127.0.0.1:8083/v1` | 仅 `gemini-web` | Gemini Web 默认后端地址 |
|
|
160
160
|
| `contextLimit` / `outputLimit` | `1000000` / `8192` | 仅 `gemini-web` | 向客户端声明的上下文 / 输出上限 |
|
|
161
|
+
| `per_ip_concurrent` / `per_ip_rpm` / `per_ip_rph` | `5` / `30` / `80` | 仅 `gemini-web` | 本地受管后端的单 IP 限流:瞬时并发 / 每分钟 / 每小时请求上限,`0` 表示不限。可在 Magpie 参数区直接配置,保存后写入 `config.json` 并热同步到运行中的后端,无需重启;连接自建后端时仅作校验,不会改动外部实例 |
|
|
161
162
|
| `studio.proxy` | 无 | 仅 `ai-studio` | 访问 Google 的代理(`http` / `https` / `socks5`),也可用环境变量 `AI_STUDIO_PROXY`;设置后优先于管理页里保存的代理。未设置时沿用环境变量或管理页保存的代理;显式设为空字符串 `""` 时不使用环境变量与管理页里保存的代理(macOS/Windows 上后端自身的系统代理检测仍可能生效) |
|
|
162
163
|
| `studio.accountOrder` | 无 | 仅 `ai-studio` | 账号优先顺序(逗号分隔字符串或字符串数组,如 `["b@gmail.com","a@gmail.com"]`);当 `.env` 中未保存或为空时作为初始值写入,管理页保存非空值后优先保留管理页设置 |
|
|
163
164
|
| `studio.modelAccounts` | 无 | 仅 `ai-studio` | 模型专属账号绑定(`"model:acc1|acc2"` 字符串或 `{ "gemini-3.1-pro-preview": ["acc1", "acc2"] }` 对象);当 `.env` 中未保存或为空时作为初始值写入,管理页保存非空值后优先保留管理页设置 |
|
|
@@ -243,13 +244,13 @@ magpie plugin options @dorokuma/magpie-gemini-web '{"studio":{"proxy":"http://12
|
|
|
243
244
|
- 模型列表过滤 `-build` / `assistant_route` 模型:这类模型附带 Build 写代码助手的系统提示词,不作为普通 Agent 模型提供。升级后可执行 `magpie provider models ai-studio` 刷新列表。
|
|
244
245
|
|
|
245
246
|
**Gemini Web 优化后端升级与回退:**
|
|
246
|
-
- [#53](https://github.com/dorokuma/magpie-gemini-web/issues/53) 的多账号索引漏传已修复,需重新导入受影响的 Cookie 或在后端账号管理中修正索引。后端 [`dorokuma/gemini-web2api-go` `v6.2.
|
|
247
|
-
- 插件默认固定使用后端仓发布的 [v6.2.
|
|
248
|
-
- **旧版升级**:插件加载时若识别到托管的旧版后端进程,会自动回收并升级到当前 pin 的 `v6.2.
|
|
247
|
+
- [#53](https://github.com/dorokuma/magpie-gemini-web/issues/53) 的多账号索引漏传已修复,需重新导入受影响的 Cookie 或在后端账号管理中修正索引。后端 [`dorokuma/gemini-web2api-go` `v6.2.2`](https://github.com/dorokuma/gemini-web2api-go/releases/tag/v6.2.2) 已原生收录 `gemini-4-carbon`、`gemini-4-hydrogen` 与 `gemini-4-neon` 模型 ID(含 `-thinking` 思考变体,Neon 系列为服务端内部思考、不输出 `reasoning_content`),同时移除了 Gemini Web 对外 `gemini-4-argon*`(原 Argon 槽位在上游目录中原位改名为 4 Carbon,谷歌已下架 Argon,请改用 `gemini-4-carbon*` 或 `gemini-4-neon*`);`strict_model` 槽位校验按显示名家族互认升级/降级,付费账号请求 `gemini-3.8-flash` 被路由至 `4 Hydrogen` 时也能正确识别,不会误报 `429 model_downgraded`。
|
|
248
|
+
- 插件默认固定使用后端仓发布的 [v6.2.2](https://github.com/dorokuma/gemini-web2api-go/releases/tag/v6.2.2) 预编译二进制(一仓一制品,6 平台 SHA-256 pin 在 `lib/backend-release.json`,不再由插件仓打补丁重编)。对话请求按上游沉默计时:Google 让请求排队时每 60 秒发一次心跳,后端会一直等到出字;连续 `request_timeout_sec`(默认 180 秒)没有任何数据才放弃这一次并重试,还在出字的长回复也不会被截断。
|
|
249
|
+
- **旧版升级**:插件加载时若识别到托管的旧版后端进程,会自动回收并升级到当前 pin 的 `v6.2.2`,这可能中断正在进行的生成请求;建议升级前先等待在途请求结束,或手动停止旧进程(PID 见数据目录 `backend.pid`)。非插件托管或无法识别的实例不保证自动更新。升级后保留原有配置与账号。
|
|
249
250
|
- **回退官方上游版 / 恢复 pin 版**(停止后端后在插件目录执行):
|
|
250
251
|
```bash
|
|
251
252
|
npm run backend:install:upstream # 回退并固定使用上游 zexadev v4.28.0
|
|
252
|
-
npm run backend:install # 恢复默认 pin 的 v6.2.
|
|
253
|
+
npm run backend:install # 恢复默认 pin 的 v6.2.2
|
|
253
254
|
```
|
|
254
255
|
- pin 同步、校验与冒烟流程见 [docs/backend-release.md](docs/backend-release.md)。
|
|
255
256
|
|
package/index.mjs
CHANGED
|
@@ -71,7 +71,7 @@ async function forwardManaged(input, init, getAuth, opts) {
|
|
|
71
71
|
}
|
|
72
72
|
if (!managedBackend(c.baseURL, c.key)) return res;
|
|
73
73
|
try {
|
|
74
|
-
await ensureBackend({ proxy: opts.proxy });
|
|
74
|
+
await ensureBackend({ proxy: opts.proxy, rateLimit: opts.rateLimit });
|
|
75
75
|
} catch {
|
|
76
76
|
return res;
|
|
77
77
|
}
|
|
@@ -102,7 +102,7 @@ export const GeminiWebPlugin = async (_input, options = {}) => {
|
|
|
102
102
|
// Bring a backend set up earlier back after Magpie or the computer restarts. Not awaited:
|
|
103
103
|
// requests that arrive first start it themselves through forwardManaged.
|
|
104
104
|
if (localBackend()) {
|
|
105
|
-
ensureBackend({ proxy: opts.proxy })
|
|
105
|
+
ensureBackend({ proxy: opts.proxy, rateLimit: opts.rateLimit })
|
|
106
106
|
.then(async local => {
|
|
107
107
|
if (!opts.proxy) return;
|
|
108
108
|
await requireLoginBackend(local);
|
|
@@ -153,7 +153,7 @@ export const GeminiWebPlugin = async (_input, options = {}) => {
|
|
|
153
153
|
const startReady = p => {
|
|
154
154
|
initialProxy = p;
|
|
155
155
|
readyFailed = false;
|
|
156
|
-
const attempt = ensureBackend({ proxy: p });
|
|
156
|
+
const attempt = ensureBackend({ proxy: p, rateLimit: opts.rateLimit });
|
|
157
157
|
ready = attempt;
|
|
158
158
|
attempt.catch(() => { if (ready === attempt) readyFailed = true; });
|
|
159
159
|
};
|
|
@@ -309,7 +309,7 @@ export const GeminiWebPlugin = async (_input, options = {}) => {
|
|
|
309
309
|
return await listModels(c, opts);
|
|
310
310
|
} catch (err) {
|
|
311
311
|
if (!err.unreachable || !managedBackend(c.baseURL, c.key)) throw err;
|
|
312
|
-
await ensureBackend({ proxy: opts.proxy });
|
|
312
|
+
await ensureBackend({ proxy: opts.proxy, rateLimit: opts.rateLimit });
|
|
313
313
|
return listModels(c, opts);
|
|
314
314
|
}
|
|
315
315
|
}
|
package/lib/backend-release.json
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "6.2.
|
|
2
|
+
"version": "6.2.2",
|
|
3
3
|
"repository": "dorokuma/gemini-web2api-go",
|
|
4
|
-
"tag": "v6.2.
|
|
4
|
+
"tag": "v6.2.2",
|
|
5
5
|
"binaries": {
|
|
6
6
|
"darwin-x64": {
|
|
7
|
-
"asset": "gemini-web2api-go_v6.2.
|
|
8
|
-
"sha256": "
|
|
7
|
+
"asset": "gemini-web2api-go_v6.2.2_darwin_amd64",
|
|
8
|
+
"sha256": "791ceadd5618726ef3de1d2fc56ae9f57d760a97ff1f3af1c82cee6951ffe9b2"
|
|
9
9
|
},
|
|
10
10
|
"darwin-arm64": {
|
|
11
|
-
"asset": "gemini-web2api-go_v6.2.
|
|
12
|
-
"sha256": "
|
|
11
|
+
"asset": "gemini-web2api-go_v6.2.2_darwin_arm64",
|
|
12
|
+
"sha256": "b1191c3c36c96f166e09591c2048c12028c63b56267b8eddfff412eedd758fad"
|
|
13
13
|
},
|
|
14
14
|
"linux-x64": {
|
|
15
|
-
"asset": "gemini-web2api-go_v6.2.
|
|
16
|
-
"sha256": "
|
|
15
|
+
"asset": "gemini-web2api-go_v6.2.2_linux_amd64",
|
|
16
|
+
"sha256": "421c55958a9006754ff8a0bfbd65547a1c1339c538d0c1ccdd2c7cfaafcfeb95"
|
|
17
17
|
},
|
|
18
18
|
"linux-arm64": {
|
|
19
|
-
"asset": "gemini-web2api-go_v6.2.
|
|
20
|
-
"sha256": "
|
|
19
|
+
"asset": "gemini-web2api-go_v6.2.2_linux_arm64",
|
|
20
|
+
"sha256": "7896f25577b00c75fc448a7d663315ee51a3454e4bf5c13b6ccfbfc5ea24df1c"
|
|
21
21
|
},
|
|
22
22
|
"win32-x64": {
|
|
23
|
-
"asset": "gemini-web2api-go_v6.2.
|
|
24
|
-
"sha256": "
|
|
23
|
+
"asset": "gemini-web2api-go_v6.2.2_windows_amd64.exe",
|
|
24
|
+
"sha256": "5abc5d0d9df38af373044da656de9278515ca0f4596a4ac8f3dab51e4679bb3e"
|
|
25
25
|
},
|
|
26
26
|
"win32-arm64": {
|
|
27
|
-
"asset": "gemini-web2api-go_v6.2.
|
|
28
|
-
"sha256": "
|
|
27
|
+
"asset": "gemini-web2api-go_v6.2.2_windows_arm64.exe",
|
|
28
|
+
"sha256": "448dd8b5c1e9c939f730895c60b3c8d7dac4a6f51684f8cab96b2b74fb26aea0"
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
}
|
package/lib/backend.mjs
CHANGED
|
@@ -32,9 +32,23 @@ const KNOWN_OPTIONS = new Set([
|
|
|
32
32
|
'outputLimit',
|
|
33
33
|
'requestTimeoutMs',
|
|
34
34
|
'modelTimeoutMs',
|
|
35
|
-
'stripCitations'
|
|
35
|
+
'stripCitations',
|
|
36
|
+
'per_ip_concurrent',
|
|
37
|
+
'per_ip_rpm',
|
|
38
|
+
'per_ip_rph',
|
|
39
|
+
// Tolerated so a settings() result can be passed back in as options (tests do this);
|
|
40
|
+
// it is ignored on input — the per_ip_* keys are what get validated and applied.
|
|
41
|
+
'rateLimit'
|
|
36
42
|
]);
|
|
37
43
|
|
|
44
|
+
// Per-IP rate limits of the managed gemini-web2api-go backend. The bounds mirror its
|
|
45
|
+
// validateRuntimeConfig; 0 disables the limit.
|
|
46
|
+
const RATE_LIMIT_BOUNDS = {
|
|
47
|
+
per_ip_concurrent: [0, 1000],
|
|
48
|
+
per_ip_rpm: [0, 10000],
|
|
49
|
+
per_ip_rph: [0, 100000]
|
|
50
|
+
};
|
|
51
|
+
|
|
38
52
|
export function makeOpenAIError(status, message, extraHeaders = {}) {
|
|
39
53
|
const codeMap = {
|
|
40
54
|
400: 'invalid_request_error',
|
|
@@ -198,6 +212,18 @@ export function settings(options = {}) {
|
|
|
198
212
|
stripCitations = options.stripCitations;
|
|
199
213
|
}
|
|
200
214
|
|
|
215
|
+
// Left unset, a limit stays undefined so an externally managed backend is never
|
|
216
|
+
// overwritten with defaults it never declared.
|
|
217
|
+
const parsedRateLimit = {};
|
|
218
|
+
for (const [name, [min, max]] of Object.entries(RATE_LIMIT_BOUNDS)) {
|
|
219
|
+
const value = options[name];
|
|
220
|
+
if (value === undefined) continue;
|
|
221
|
+
if (!Number.isInteger(value) || value < min || value > max) {
|
|
222
|
+
throw new Error(`Invalid option ${name}: must be an integer between ${min} and ${max} (0 = no limit)`);
|
|
223
|
+
}
|
|
224
|
+
parsedRateLimit[name] = value;
|
|
225
|
+
}
|
|
226
|
+
|
|
201
227
|
return {
|
|
202
228
|
baseURL,
|
|
203
229
|
proxy,
|
|
@@ -207,7 +233,8 @@ export function settings(options = {}) {
|
|
|
207
233
|
outputLimit,
|
|
208
234
|
requestTimeoutMs,
|
|
209
235
|
modelTimeoutMs,
|
|
210
|
-
stripCitations
|
|
236
|
+
stripCitations,
|
|
237
|
+
rateLimit: parsedRateLimit
|
|
211
238
|
};
|
|
212
239
|
}
|
|
213
240
|
|
package/lib/native.mjs
CHANGED
|
@@ -171,7 +171,7 @@ export async function installBackend(options = {}) {
|
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
const files = ensureDataFiles(dataDir);
|
|
174
|
+
const files = ensureDataFiles(dataDir, options.rateLimit);
|
|
175
175
|
// A local custom build keeps the user's channel. Official installs record their
|
|
176
176
|
// selection only after verification and replacement succeeded.
|
|
177
177
|
if ((!options.expectedHash && !options.url) || options.channel !== undefined) saveBackendChannel(dataDir, channel);
|
|
@@ -180,7 +180,12 @@ export async function installBackend(options = {}) {
|
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
// ensureDataFiles creates config.json and secrets.json when missing; existing ones are kept.
|
|
183
|
-
|
|
183
|
+
// rateLimit carries the per_ip_* limits declared in the plugin options: a new config.json
|
|
184
|
+
// records them, and an existing one is merged key by key only when a passed value differs,
|
|
185
|
+
// so port, multi_turn and every other field the user set stay exactly as they were.
|
|
186
|
+
const RATE_LIMIT_CONFIG_KEYS = ['per_ip_concurrent', 'per_ip_rpm', 'per_ip_rph'];
|
|
187
|
+
|
|
188
|
+
function ensureDataFiles(dataDir, rateLimit = {}) {
|
|
184
189
|
const configPath = path.join(dataDir, 'config.json');
|
|
185
190
|
if (!fs.existsSync(configPath)) {
|
|
186
191
|
const defaultConfig = {
|
|
@@ -193,10 +198,13 @@ function ensureDataFiles(dataDir) {
|
|
|
193
198
|
// 索引残片);auto_delete 让后端收尾统一 GzXR5e 删掉,双保险。
|
|
194
199
|
auto_delete_conversation: true
|
|
195
200
|
};
|
|
196
|
-
|
|
197
|
-
|
|
201
|
+
for (const key of RATE_LIMIT_CONFIG_KEYS) {
|
|
202
|
+
if (rateLimit[key] !== undefined) defaultConfig[key] = rateLimit[key];
|
|
203
|
+
}
|
|
204
|
+
writeJsonFile(configPath, defaultConfig);
|
|
198
205
|
console.log(`Created default config: ${configPath}`);
|
|
199
206
|
} else {
|
|
207
|
+
mergeRateLimitConfig(configPath, rateLimit);
|
|
200
208
|
fs.chmodSync(configPath, 0o600);
|
|
201
209
|
}
|
|
202
210
|
|
|
@@ -216,6 +224,36 @@ function ensureDataFiles(dataDir) {
|
|
|
216
224
|
return { configPath, secretsPath };
|
|
217
225
|
}
|
|
218
226
|
|
|
227
|
+
// writeJsonFile replaces file atomically (temp file + rename) with 0600 permissions.
|
|
228
|
+
function writeJsonFile(file, data) {
|
|
229
|
+
const temp = `${file}.${crypto.randomBytes(4).toString('hex')}.tmp`;
|
|
230
|
+
try {
|
|
231
|
+
fs.writeFileSync(temp, JSON.stringify(data, null, 2) + '\n', { mode: 0o600 });
|
|
232
|
+
fs.renameSync(temp, file);
|
|
233
|
+
} finally {
|
|
234
|
+
fs.rmSync(temp, { force: true });
|
|
235
|
+
}
|
|
236
|
+
fs.chmodSync(file, 0o600);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// mergeRateLimitConfig rewrites configPath only when a passed rateLimit value differs from
|
|
240
|
+
// what is already stored; a file that fails to parse is left untouched and the caller's
|
|
241
|
+
// own error handling decides.
|
|
242
|
+
function mergeRateLimitConfig(configPath, rateLimit) {
|
|
243
|
+
const wanted = RATE_LIMIT_CONFIG_KEYS.filter(key => rateLimit[key] !== undefined);
|
|
244
|
+
if (!wanted.length) return;
|
|
245
|
+
let config;
|
|
246
|
+
try {
|
|
247
|
+
config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
|
|
248
|
+
} catch {
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
if (!config || typeof config !== 'object' || Array.isArray(config)) return;
|
|
252
|
+
if (!wanted.some(key => config[key] !== rateLimit[key])) return;
|
|
253
|
+
for (const key of wanted) config[key] = rateLimit[key];
|
|
254
|
+
writeJsonFile(configPath, config);
|
|
255
|
+
}
|
|
256
|
+
|
|
219
257
|
export function startBackend(options = {}) {
|
|
220
258
|
const dataDir = options.dataDir || getDataDir();
|
|
221
259
|
const expectedHash = options.expectedHash || pinnedBinary(process.platform, process.arch, backendChannel(dataDir)).sha256;
|
|
@@ -376,6 +414,62 @@ async function backendState(setup, fetchFn) {
|
|
|
376
414
|
return res.ok ? 'up' : 'foreign';
|
|
377
415
|
}
|
|
378
416
|
|
|
417
|
+
// syncBackendRateLimit applies the plugin's per_ip_* limits to a healthy managed backend
|
|
418
|
+
// through its admin API: GET the full runtime config, PUT it back with only the passed
|
|
419
|
+
// limits changed (PUT persists to the backend's runtime_config store and takes effect at
|
|
420
|
+
// once). Values already matching skip the PUT; a missing adminToken or a non-2xx answer
|
|
421
|
+
// fails loudly instead of leaving the impression the limits applied.
|
|
422
|
+
async function syncBackendRateLimit(setup, rateLimit, fetchFn) {
|
|
423
|
+
const wanted = Object.entries(rateLimit || {}).filter(([, v]) => v !== undefined);
|
|
424
|
+
if (!wanted.length) return;
|
|
425
|
+
if (typeof setup.adminToken !== 'string' || !setup.adminToken) {
|
|
426
|
+
throw new Error(`Cannot apply per-IP rate limits to ${setup.origin}: the managed backend has no admin token`);
|
|
427
|
+
}
|
|
428
|
+
const url = `${setup.origin}/admin/api/config`;
|
|
429
|
+
const headers = { Authorization: `Bearer ${setup.adminToken}` };
|
|
430
|
+
let res;
|
|
431
|
+
try {
|
|
432
|
+
res = await fetchFn(url, { headers, signal: AbortSignal.timeout(5000) });
|
|
433
|
+
} catch (err) {
|
|
434
|
+
throw new Error(`Cannot apply per-IP rate limits to ${setup.origin}: failed to read runtime config: ${err?.message || err}`);
|
|
435
|
+
}
|
|
436
|
+
if (!res.ok) {
|
|
437
|
+
throw new Error(`Cannot apply per-IP rate limits to ${setup.origin}: GET /admin/api/config returned HTTP ${res.status}`);
|
|
438
|
+
}
|
|
439
|
+
let body;
|
|
440
|
+
try {
|
|
441
|
+
body = await res.json();
|
|
442
|
+
} catch {
|
|
443
|
+
throw new Error(`Cannot apply per-IP rate limits to ${setup.origin}: invalid runtime config response`);
|
|
444
|
+
}
|
|
445
|
+
const config = body?.config;
|
|
446
|
+
if (!config || typeof config !== 'object' || Array.isArray(config)) {
|
|
447
|
+
throw new Error(`Cannot apply per-IP rate limits to ${setup.origin}: runtime config response has no "config" object`);
|
|
448
|
+
}
|
|
449
|
+
if (!wanted.some(([key, value]) => config[key] !== value)) return;
|
|
450
|
+
const next = { ...config };
|
|
451
|
+
for (const [key, value] of wanted) next[key] = value;
|
|
452
|
+
let put;
|
|
453
|
+
try {
|
|
454
|
+
put = await fetchFn(url, {
|
|
455
|
+
method: 'PUT',
|
|
456
|
+
headers: { ...headers, 'Content-Type': 'application/json' },
|
|
457
|
+
body: JSON.stringify(next),
|
|
458
|
+
signal: AbortSignal.timeout(5000)
|
|
459
|
+
});
|
|
460
|
+
} catch (err) {
|
|
461
|
+
throw new Error(`Cannot apply per-IP rate limits to ${setup.origin}: failed to write runtime config: ${err?.message || err}`);
|
|
462
|
+
}
|
|
463
|
+
if (!put.ok) {
|
|
464
|
+
let detail = '';
|
|
465
|
+
try {
|
|
466
|
+
const errBody = await put.json();
|
|
467
|
+
if (typeof errBody?.error === 'string') detail = `: ${errBody.error}`;
|
|
468
|
+
} catch {}
|
|
469
|
+
throw new Error(`Cannot apply per-IP rate limits to ${setup.origin}: PUT /admin/api/config returned HTTP ${put.status}${detail}`);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
|
|
379
473
|
|
|
380
474
|
// backendVersion asks the backend at setup for its self-reported version (the same string
|
|
381
475
|
// --version prints). Returns null when the backend is down, foreign, or too old to answer.
|
|
@@ -555,6 +649,17 @@ export async function ensureBackend(options = {}) {
|
|
|
555
649
|
const spawnFn = options.spawnFn || spawn;
|
|
556
650
|
const verify = options.verifyIdentity || verifyProcessIdentity;
|
|
557
651
|
const startTimeoutMs = options.startTimeoutMs ?? 20000;
|
|
652
|
+
const rateLimit = options.rateLimit;
|
|
653
|
+
|
|
654
|
+
// A healthy managed backend gets the plugin's per_ip_* limits synced into its live
|
|
655
|
+
// runtime config (see syncBackendRateLimit below); once the hot apply succeeded the
|
|
656
|
+
// same keys are merged into the on-disk config.json so a later cold start keeps them.
|
|
657
|
+
const settle = async () => {
|
|
658
|
+
await syncBackendRateLimit(setup, rateLimit, fetchFn);
|
|
659
|
+
if (rateLimit && RATE_LIMIT_CONFIG_KEYS.some(key => rateLimit[key] !== undefined)) {
|
|
660
|
+
ensureDataFiles(dataDir, rateLimit);
|
|
661
|
+
}
|
|
662
|
+
};
|
|
558
663
|
|
|
559
664
|
// Adoption is version-aware. A healthy backend is only reused when it reports the version
|
|
560
665
|
// the binary on disk should run; a stale one — including the case where it answers with a
|
|
@@ -581,15 +686,16 @@ export async function ensureBackend(options = {}) {
|
|
|
581
686
|
const state = await backendState(setup, fetchFn);
|
|
582
687
|
if (state === 'up') {
|
|
583
688
|
const verdict = binTrusted ? await matchesExpected() : 'stale';
|
|
584
|
-
if (verdict === 'match' || verdict === 'unknown') return setup;
|
|
689
|
+
if (verdict === 'match' || verdict === 'unknown') { await settle(); return setup; }
|
|
585
690
|
// Version mismatch or untrusted binary: kill whatever holds the port before the
|
|
586
691
|
// pinned build is installed and respawned. Nothing killed = the listener is not
|
|
587
692
|
// ours to swap, so keep adopting rather than break a working install.
|
|
588
693
|
const killed = await stopStaleBackend(setup, dataDir, platform, verify, fetchFn);
|
|
589
|
-
if (!killed) return setup;
|
|
694
|
+
if (!killed) { await settle(); return setup; }
|
|
590
695
|
if (await backendState(setup, fetchFn) === 'up') {
|
|
591
696
|
// Port still claimed by something we could not identify; never stack a second
|
|
592
697
|
// backend behind it.
|
|
698
|
+
await settle();
|
|
593
699
|
return setup;
|
|
594
700
|
}
|
|
595
701
|
} else if (state === 'foreign' && fs.existsSync(binPath)) {
|
|
@@ -608,16 +714,16 @@ export async function ensureBackend(options = {}) {
|
|
|
608
714
|
}
|
|
609
715
|
if (after === 'up') {
|
|
610
716
|
const verdict = binTrusted ? await matchesExpected() : 'stale';
|
|
611
|
-
if (verdict === 'match' || verdict === 'unknown') return setup;
|
|
717
|
+
if (verdict === 'match' || verdict === 'unknown') { await settle(); return setup; }
|
|
612
718
|
await stopStaleBackend(setup, dataDir, platform, verify, fetchFn);
|
|
613
719
|
}
|
|
614
720
|
}
|
|
615
721
|
}
|
|
616
722
|
|
|
617
723
|
if (!binTrusted) {
|
|
618
|
-
await installBackend({ dataDir, platform, arch, fetchFn, channel: backendChannel(dataDir), proxy: options.proxy });
|
|
724
|
+
await installBackend({ dataDir, platform, arch, fetchFn, channel: backendChannel(dataDir), proxy: options.proxy, rateLimit });
|
|
619
725
|
} else {
|
|
620
|
-
ensureDataFiles(dataDir);
|
|
726
|
+
ensureDataFiles(dataDir, rateLimit);
|
|
621
727
|
}
|
|
622
728
|
setup = readLocalSetup(dataDir);
|
|
623
729
|
if (!setup) throw new Error(`Invalid Gemini Web backend config in ${dataDir}`);
|
|
@@ -645,7 +751,10 @@ export async function ensureBackend(options = {}) {
|
|
|
645
751
|
|
|
646
752
|
const deadline = Date.now() + startTimeoutMs;
|
|
647
753
|
while (Date.now() < deadline) {
|
|
648
|
-
if (await backendState(setup, fetchFn) === 'up')
|
|
754
|
+
if (await backendState(setup, fetchFn) === 'up') {
|
|
755
|
+
await settle();
|
|
756
|
+
return setup;
|
|
757
|
+
}
|
|
649
758
|
await sleep(300);
|
|
650
759
|
}
|
|
651
760
|
try { child?.kill?.('SIGTERM'); } catch {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dorokuma/magpie-gemini-web",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.2",
|
|
4
4
|
"description": "Google AI Studio and Gemini Web provider for Magpie (Gemini 4 Neon / Carbon / Hydrogen in Chat & Task modes, Nano Banana image generation, Deep Research), backed by AIStudio2API and gemini-web2api-go",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.mjs",
|
|
@@ -93,6 +93,11 @@
|
|
|
93
93
|
},
|
|
94
94
|
"magpie": {
|
|
95
95
|
"icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIj48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSIyIiB5MT0iMyIgeDI9IjIwIiB5Mj0iMjEiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAlIiBzdG9wLWNvbG9yPSIjMDZCNkQ0Ii8+PHN0b3Agb2Zmc2V0PSI1MCUiIHN0b3AtY29sb3I9IiMzQjgyRjYiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM4QjVDRjYiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYiIgeDE9IjE0IiB5MT0iMiIgeDI9IjIyIiB5Mj0iMTAiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAlIiBzdG9wLWNvbG9yPSIjOEI1Q0Y2Ii8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjRUM0ODk5Ii8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHBhdGggZD0iTTEwIDMuMkMxMC4zNSAzLjIgMTAuNjIgMy40NSAxMC43MiAzLjhDMTEuNDUgNi44NSAxMy4xNSA4LjU1IDE2LjIgOS4yOEMxNi41NSA5LjM4IDE2LjggOS42NSAxNi44IDEwQzE2LjggMTAuMzUgMTYuNTUgMTAuNjIgMTYuMiAxMC43MkMxMy4xNSAxMS40NSAxMS40NSAxMy4xNSAxMC43MiAxNi4yQzEwLjYyIDE2LjU1IDEwLjM1IDE2LjggMTAgMTYuOEM5LjY1IDE2LjggOS4zOCAxNi41NSA5LjI4IDE2LjJDOC41NSAxMy4xNSA2Ljg1IDExLjQ1IDMuOCAxMC43MkMzLjQ1IDEwLjYyIDMuMiAxMC4zNSAzLjIgMTBDMy4yIDkuNjUgMy40NSA5LjM4IDMuOCA5LjI4QzYuODUgOC41NSA4LjU1IDYuODUgOS4yOCAzLjhDOS4zOCAzLjQ1IDkuNjUgMy4yIDEwIDMuMloiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0wLjUgMi41KSBzY2FsZSgxLjEyKSIgZmlsbD0idXJsKCNhKSIvPjxwYXRoIGQ9Ik0xOC4yIDEuOEMxOC40MiAxLjggMTguNiAxLjk1IDE4LjY2IDIuMTZDMTkuMDggMy44MiAyMC4wMiA0Ljc2IDIxLjY4IDUuMThDMjEuODkgNS4yNCAyMi4wNCA1LjQyIDIyLjA0IDUuNjRDMjIuMDQgNS44NiAyMS44OSA2LjA0IDIxLjY4IDYuMUMyMC4wMiA2LjUyIDE5LjA4IDcuNDYgMTguNjYgOS4xMkMxOC42IDkuMzMgMTguNDIgOS40OCAxOC4yIDkuNDhDMTcuOTggOS40OCAxNy44IDkuMzMgMTcuNzQgOS4xMkMxNy4zMiA3LjQ2IDE2LjM4IDYuNTIgMTQuNzIgNi4xQzE0LjUxIDYuMDQgMTQuMzYgNS44NiAxNC4zNiA1LjY0QzE0LjM2IDUuNDIgMTQuNTEgNS4yNCAxNC43MiA1LjE4QzE2LjM4IDQuNzYgMTcuMzIgMy44MiAxNy43NCAyLjE2QzE3LjggMS45NSAxNy45OCAxLjggMTguMiAxLjhaIiBmaWxsPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iMTcuOCIgY3k9IjE4LjIiIHI9IjEuMzUiIGZpbGw9IiM2MzY2RjEiLz48L3N2Zz4=",
|
|
96
|
-
"maxConcurrency": 2
|
|
96
|
+
"maxConcurrency": 2,
|
|
97
|
+
"options": {
|
|
98
|
+
"per_ip_concurrent": 5,
|
|
99
|
+
"per_ip_rpm": 30,
|
|
100
|
+
"per_ip_rph": 80
|
|
101
|
+
}
|
|
97
102
|
}
|
|
98
103
|
}
|