magpie-gemini-web 0.5.1 → 0.5.3
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/LICENSE-AISTUDIO +21 -0
- package/README.en.md +113 -126
- package/README.md +123 -136
- package/docs/studio-release.md +49 -0
- package/lib/studio-native.mjs +485 -81
- package/lib/studio-release.json +26 -15
- package/lib/studio.mjs +77 -21
- package/package.json +9 -2
- package/patches/studio-managed.patch +625 -0
- package/scripts/studio-archive.go +92 -0
- package/scripts/studio-managed-smoke.mjs +66 -0
- package/scripts/studio-release.mjs +85 -0
- package/scripts/studio.mjs +25 -30
package/LICENSE-AISTUDIO
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mag1cFall
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.en.md
CHANGED
|
@@ -2,178 +2,165 @@
|
|
|
2
2
|
|
|
3
3
|
[中文](README.md) | English
|
|
4
4
|
|
|
5
|
-
Use Gemini on the web
|
|
6
|
-
|
|
7
|
-
The plugin provides two independent providers:
|
|
8
|
-
- `gemini-web`: the Gemini web app; see [Getting started](#getting-started-gemini-web).
|
|
9
|
-
- `ai-studio`: Google AI Studio, with native tool calling; see [Google AI Studio](#google-ai-studio-ai-studio).
|
|
5
|
+
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, turning Google web interfaces into OpenAI-compatible APIs.
|
|
10
6
|
|
|
11
7
|
> **2026-10-16 update:** Full-price Google AI Pro accounts can now use `gemini-4-argon` directly in Antigravity, and can likewise be proxied directly with Magpie.
|
|
12
8
|
|
|
13
|
-
##
|
|
14
|
-
|
|
15
|
-
1. Install **magpie-gemini-web** from the Magpie plugin market.
|
|
16
|
-
2. Sign in to Gemini Web and choose **一键配置本地 Gemini Web (one-click local setup, recommended)**. The plugin downloads this project's optimized backend, verifies its SHA-256 and starts it in the background. No Go installation or manual patching is needed.
|
|
17
|
-
3. Copy your cookie when prompted. **Use a private / incognito window** (Firefox recommended):
|
|
18
|
-
1. In the private window, open <https://gemini.google.com/app> and sign in to the Google account you want to use.
|
|
19
|
-
2. Press F12 (⌥⌘I on macOS), switch to **Network** and reload the page.
|
|
20
|
-
3. Click any `gemini.google.com` request and go to **Headers** → **Request Headers**.
|
|
21
|
-
4. Copy the value of the `cookie` line and paste it into Magpie.
|
|
22
|
-
5. Close the private window. **Don't sign out**, because signing out invalidates the cookie.
|
|
23
|
-
4. The plugin checks that the account works, then finishes signing in.
|
|
24
|
-
|
|
25
|
-
> **Why a private window?** The backend refreshes this sign-in periodically to keep it alive. If it shares a session with the browser you normally use, Google revokes the session and your browser gets signed out of every Google service. A private window gives the backend a session of its own. Using a separate Google account for the backend is safer still.
|
|
26
|
-
|
|
27
|
-
From then on, Magpie starts the backend automatically every time it launches. To add another account, run the one-click setup again.
|
|
28
|
-
|
|
29
|
-
> Need a proxy to reach Google? The backend ignores `HTTP_PROXY`. Add the proxy in the proxy pool of the admin panel at `http://127.0.0.1:8083/admin`. The admin password is `adminToken` in `secrets.json` in the data directory.
|
|
9
|
+
## Which Provider Should I Choose?
|
|
30
10
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
## Plugin options (Gemini Web)
|
|
34
|
-
|
|
35
|
-
Tool calls are on by default (coding agents send tools with every request); image input is off. To allow images:
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
magpie plugin options magpie-gemini-web '{"allowImages":true}'
|
|
39
|
-
```
|
|
11
|
+
The plugin provides two independent providers that can be used individually or together:
|
|
40
12
|
|
|
41
|
-
|
|
|
13
|
+
| Feature | Google AI Studio (`ai-studio`) | Gemini Web (`gemini-web`) |
|
|
42
14
|
| :--- | :--- | :--- |
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
| `
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
50
|
-
## Thinking effort
|
|
51
|
-
|
|
52
|
-
You can switch a model between `low` and `high` effort in Magpie if it has a `-thinking` version. `low` uses the base model and `high` uses the `-thinking` model with extended thinking, so the `-thinking` model isn't listed on its own. After upgrading the plugin, run `magpie provider models gemini-web` to refresh the model list. Argon's medium tier will be added once upstream supports it ([#5](https://github.com/BUKOWSKIREAL/magpie-gemini-web/issues/5)).
|
|
53
|
-
|
|
54
|
-
## Security and data
|
|
15
|
+
| **Best for** | **Coding agents (recommended)** | General chat, web-only models & web quota |
|
|
16
|
+
| **Tool calling** | **Native Function Calling**, reliable | Prompt-emulated (experimental; Flash often skips tools) |
|
|
17
|
+
| **Thinking levels** | `minimal` / `low` / `medium` / `high` (`minimal` is fastest & cheapest) | `low` (base) / `high` (`-thinking` extended thinking) |
|
|
18
|
+
| **Sign-in method** | Sign in directly in an isolated popup browser window | Copy `cookie` from a private/incognito window |
|
|
19
|
+
| **Usage cards** | Shows models currently on cooldown and recovery times | Syncs **5-hour** & **weekly** usage and reset times from the web |
|
|
20
|
+
| **Local backend** | AIStudio2API (`v0.2.13`) | gemini-web2api-go (`4.22.0-magpie.1` optimized build) |
|
|
55
21
|
|
|
56
|
-
|
|
57
|
-
- The default backend is this project's **4.22.0-magpie.1**, built from pinned upstream v4.22.0 sources with this repository's patch. SHA-256 is checked on download and before launching a new process. Builds cover macOS, Linux and Windows on x64 and arm64; the release includes sources, build metadata and checksums.
|
|
58
|
-
- The data directory is `~/.local/share/magpie-gemini-web` (set `GEMINI_WEB_DATA_DIR` to change it). The backend writes its log to `backend.log` there.
|
|
59
|
-
- The plugin sends one request at a time, but this can't guarantee that Google won't flag your account. Use it at your own risk.
|
|
22
|
+
---
|
|
60
23
|
|
|
61
|
-
##
|
|
24
|
+
## Quick Start
|
|
62
25
|
|
|
63
|
-
|
|
26
|
+
Install **magpie-gemini-web** from the Magpie plugin market, then sign in to either (or both) providers below. The plugin automatically downloads the corresponding backend, verifies its SHA-256 checksum, and runs it in the background—no Go installation or extra setup required.
|
|
64
27
|
|
|
65
|
-
|
|
66
|
-
- For an account already in the backend (one added by an older version, say), add another Gemini Web account in Magpie and pick **「添加本地后端里已有的 Google 账号」** (add an account already in the local backend), then choose it from the list. The old `API key …` sign-in can then go: it shows the whole pool as one card (each window at the account that has used the most).
|
|
28
|
+
### Option 1: Google AI Studio (`ai-studio`)
|
|
67
29
|
|
|
68
|
-
|
|
30
|
+
1. Sign in to **Google AI Studio** in Magpie and choose **「用 Google 账号登录(推荐)」** (Sign in with a Google account).
|
|
31
|
+
2. Sign in to your Google account in the separate login window that opens (your regular browser is unaffected), then close the window.
|
|
32
|
+
> On first run, the login browser Camoufox (~300 MB) is downloaded first, so the window may take a few minutes to appear. Complete sign-in within 15 minutes.
|
|
33
|
+
3. **Managing accounts:** Choose "Sign in with a Google account" again at any time to **add a new account**, create a card for an existing local account, or **re-authenticate** an expired account.
|
|
69
34
|
|
|
70
|
-
|
|
35
|
+
### Option 2: Gemini Web (`gemini-web`)
|
|
71
36
|
|
|
72
|
-
|
|
37
|
+
1. Sign in to **Gemini Web** in Magpie and choose **「一键配置本地 Gemini Web(推荐)」** (One-click local setup).
|
|
38
|
+
2. Copy your cookie using a **private / incognito window** (Firefox recommended):
|
|
39
|
+
1. Open <https://gemini.google.com/app> in the private window and sign in to your Google account.
|
|
40
|
+
2. Press `F12` (`⌥⌘I` on macOS), switch to the **Network** tab, and reload the page.
|
|
41
|
+
3. Click any `gemini.google.com` request → **Headers** → **Request Headers**, copy the `cookie` value, and paste it into Magpie.
|
|
42
|
+
4. **Close the private window directly—do not sign out** (signing out invalidates the cookie).
|
|
43
|
+
3. The plugin verifies the account and completes sign-in. Repeat the steps above to add more accounts.
|
|
73
44
|
|
|
74
|
-
|
|
75
|
-
- the account's proxy is disabled, or is a SOCKS proxy.
|
|
45
|
+
> **Why is a private window required?** The backend periodically refreshes this session to keep it alive. If it shares a session with your daily browser, Google will revoke the session and sign your browser out of all Google services. A private window (or a dedicated secondary Google account) gives the backend an isolated session.
|
|
76
46
|
|
|
77
|
-
|
|
47
|
+
---
|
|
78
48
|
|
|
79
|
-
##
|
|
49
|
+
## Multiple Accounts & Usage Cards
|
|
80
50
|
|
|
81
|
-
-
|
|
82
|
-
-
|
|
51
|
+
- **One card per account:** Each Google account gets its own usage card titled with its email address.
|
|
52
|
+
- *Migrating older Gemini Web accounts:* For accounts added in earlier versions, add a Gemini Web account in Magpie and choose **「添加本地后端里已有的 Google 账号」** (Add an existing Google account from the local backend) to create individual cards, then remove the old pooled `API key …` card.
|
|
53
|
+
- **Automatic account rotation:** The local backend selects which Google account serves each request (Gemini Web rotates across the pool; AI Studio uses one account until cooldown and switches to the next). Switching cards in Magpie does not change which account the backend picks.
|
|
54
|
+
- **Usage reporting:**
|
|
55
|
+
- `gemini-web`: Available only with the one-click local backend. To minimize requests to Google, usage is refreshed only after an account is used or a quota window resets (at least 10 minutes apart, and at most once every 6 hours when idle).
|
|
56
|
+
- `ai-studio`: AI Studio does not report remaining total quota; cards display models currently on cooldown and their recovery times, or prompt when re-authentication is needed.
|
|
83
57
|
|
|
84
|
-
|
|
58
|
+
---
|
|
85
59
|
|
|
86
|
-
|
|
60
|
+
## Configuration & Advanced Usage
|
|
87
61
|
|
|
88
|
-
|
|
62
|
+
<details>
|
|
63
|
+
<summary><b>⚙️ Plugin Options & Proxy Setup</b> (image input, proxy configuration, custom backends)</summary>
|
|
89
64
|
|
|
90
|
-
|
|
91
|
-
2. Sign in to your Google account in the separate login window that opens (your usual browser is not affected), then close it. The first time, the login browser Camoufox (about 300 MB) is downloaded first, so the window can take a few minutes to appear while Magpie shows no change; the login must finish within 15 minutes.
|
|
65
|
+
<br>
|
|
92
66
|
|
|
93
|
-
|
|
67
|
+
Tool calling is enabled by default; image input is disabled by default. Configure plugin options via the CLI:
|
|
94
68
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
Each Google account gets a card of its own. As with Gemini Web, the local service picks the account for each request (one until it cools down, then the next), whichever card Magpie uses.
|
|
69
|
+
```bash
|
|
70
|
+
# Enable image input (applies to both providers)
|
|
71
|
+
magpie plugin options magpie-gemini-web '{"allowImages":true}'
|
|
99
72
|
|
|
100
|
-
|
|
73
|
+
# Configure a proxy for AI Studio
|
|
74
|
+
magpie plugin options magpie-gemini-web '{"studio":{"proxy":"http://127.0.0.1:7890"}}'
|
|
75
|
+
```
|
|
101
76
|
|
|
102
|
-
|
|
77
|
+
| Option | Default | Scope | Description |
|
|
78
|
+
| :--- | :--- | :--- | :--- |
|
|
79
|
+
| `allowTools` | `true` | Shared (override via `studio.allowTools`) | Allow tool calls. When `false`, requests with tools return 400 |
|
|
80
|
+
| `allowImages` | `false` | Shared (override via `studio.allowImages`) | Allow image input |
|
|
81
|
+
| `requestTimeoutMs` / `modelTimeoutMs` | Web: `240000` / `10000`; Studio: `1800000` / `10000` | Shared (override via `studio.*`) | Timeout (ms) per backend wait or model list fetch; resets on stream data, explicit settings take precedence |
|
|
82
|
+
| `stripCitations` | `true` | `gemini-web` only | Strip `[cite: 1]` and `[cite_start]` markers from replies and tool arguments (not supported on AI Studio) |
|
|
83
|
+
| `baseURL` | `http://127.0.0.1:8083/v1` | `gemini-web` only | Default Gemini Web backend URL |
|
|
84
|
+
| `contextLimit` / `outputLimit` | `1000000` / `8192` | `gemini-web` only | Context and output limits reported to clients |
|
|
85
|
+
| `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. An empty value counts as unset |
|
|
86
|
+
| `studio.baseURL` | `http://127.0.0.1:2048/v1` | `ai-studio` only | Default URL when connecting an existing AIStudio2API instance |
|
|
87
|
+
| `studio.contextLimit` / `studio.outputLimit` | Model catalog defaults | `ai-studio` only | Limits reported to clients (can only lower the catalog defaults) |
|
|
103
88
|
|
|
104
|
-
|
|
89
|
+
**Using a proxy to reach Google:**
|
|
90
|
+
- **AI Studio:** Preferably set it in the local admin page. Open the address on the usage card's "管理页" (admin page) line (default `http://127.0.0.1:2048`) and sign in as `magpie` with `adminPassword` from `config.json` in the data directory. Save the proxy, then restart the service from the admin page. The plugin keeps the saved value when it restarts the backend.
|
|
91
|
+
- Alternatively, `studio.proxy` or `AI_STUDIO_PROXY` take precedence over the saved proxy. A change applies after the local service restarts (`npm run studio:stop`; the next request starts it again).
|
|
92
|
+
- With neither set, the backend falls back to the `HTTPS_PROXY` environment variable or the system proxy (Windows proxy settings).
|
|
93
|
+
- **The provider proxy set for `ai-studio` in Magpie is not passed to the local backend**; use one of the options above.
|
|
94
|
+
- The usage card's "代理出口" (proxy) line, the Google sign-in instructions and failure messages, and `npm run studio:status` show the proxy the backend actually uses, where it comes from, and whether a new setting still needs a restart.
|
|
95
|
+
- The listen address, API key and admin credentials are managed by the plugin; changing them in the admin page has no effect.
|
|
96
|
+
- **Gemini Web:** The backend ignores `HTTP_PROXY`. Add your proxy to the proxy pool in the local admin panel at `http://127.0.0.1:8083/admin` (password is `adminToken` in `secrets.json` inside the data directory).
|
|
97
|
+
- *Note:* When using a proxy pool, send one request with a newly added account so the backend binds it to a proxy, then re-add it via "Add an existing Google account from the local backend" to load its email and usage (SOCKS proxies are not supported for usage reads).
|
|
105
98
|
|
|
106
|
-
|
|
99
|
+
**Connecting a self-hosted backend:**
|
|
100
|
+
If you already run `gemini-web2api-go` or `AIStudio2API` yourself, select **Connect an existing backend / AIStudio2API** during sign-in and provide its `/v1` URL and API key.
|
|
107
101
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
```
|
|
102
|
+
**Refreshing the model list:**
|
|
103
|
+
After upgrading the plugin, run `magpie provider models gemini-web` to refresh available models.
|
|
111
104
|
|
|
112
|
-
|
|
113
|
-
| :--- | :--- | :--- |
|
|
114
|
-
| `studio.proxy` | none | Proxy for reaching Google (http / https / socks5). The `AI_STUDIO_PROXY` environment variable works too |
|
|
115
|
-
| `studio.baseURL` | `http://127.0.0.1:2048/v1` | Default address for connecting an existing AIStudio2API |
|
|
116
|
-
| `studio.contextLimit` / `studio.outputLimit` | the model catalog's | Limits declared to clients; they can only lower the catalog's |
|
|
117
|
-
| `studio.allowTools` etc. | as at the root | Override the root option of the same name for AI Studio only |
|
|
105
|
+
</details>
|
|
118
106
|
|
|
119
|
-
|
|
107
|
+
<details>
|
|
108
|
+
<summary><b>🛠️ AI Studio CLI Commands</b> (service status, re-login, offline install)</summary>
|
|
120
109
|
|
|
121
|
-
|
|
110
|
+
<br>
|
|
122
111
|
|
|
123
|
-
When
|
|
112
|
+
When a plugin error asks you to run a command, it includes the full ready-to-copy path. From the plugin directory, you can also run:
|
|
124
113
|
|
|
125
|
-
| Command |
|
|
114
|
+
| Command | Description |
|
|
126
115
|
| :--- | :--- |
|
|
127
|
-
| `npm run studio:status` | Show
|
|
116
|
+
| `npm run studio:status` | Show local service and account status |
|
|
128
117
|
| `npm run studio:start` / `studio:stop` | Start / stop the local service |
|
|
129
118
|
| `npm run studio:login` | Add a Google account |
|
|
130
|
-
| `npm run studio:relogin -- [<account>]` |
|
|
131
|
-
| `npm run studio:install -- --archive <file>` |
|
|
119
|
+
| `npm run studio:relogin -- [<account>]` | Re-authenticate an expired account (argument optional if only one) |
|
|
120
|
+
| `npm run studio:install -- --archive <file>` | Offline install from a pre-downloaded archive |
|
|
132
121
|
| `node scripts/studio.mjs import <dir>` | Import existing accounts while the service is stopped |
|
|
133
|
-
| `npm run studio:smoke` |
|
|
134
|
-
|
|
135
|
-
### Security and data
|
|
136
|
-
|
|
137
|
-
- The service listens on `127.0.0.1` only; Magpie keeps a locally generated API key.
|
|
138
|
-
- Data directory: `~/.local/share/magpie-ai-studio` (override with `AI_STUDIO_DATA_DIR`). The log is `backend.log`, started afresh on the next start once it passes 10 MB.
|
|
139
|
-
- A first setup uses port 2048, or another free port when 2048 is taken (by an AIStudio2API of your own, say), saved in the data directory's `config.json`.
|
|
140
|
-
- The downloaded archive stays in the data directory; installing again uses it when its checksum matches.
|
|
141
|
-
- Supported on macOS, Linux (x64 / arm64) and Windows x64.
|
|
142
|
-
|
|
143
|
-
## Native Task on macOS (experimental)
|
|
144
|
-
|
|
145
|
-
On macOS, sign-in offers one more option, "macOS 原生 Task(实验性)": requests skip the Gemini Web backend and go to a local daemon that runs them in Gemini.app's own Task mode, with tool calls on its native Function Calling channel, as the model `gemini-task-argon`. Windows and Linux don't offer it; keep using one-click setup there.
|
|
122
|
+
| `npm run studio:smoke` | Run a live acceptance check (consumes account quota) |
|
|
146
123
|
|
|
147
|
-
|
|
124
|
+
</details>
|
|
148
125
|
|
|
149
|
-
|
|
126
|
+
<details>
|
|
127
|
+
<summary><b>🔒 Security, Data Directories & Backend Version Management</b> (logs, rollback, macOS Native Task)</summary>
|
|
150
128
|
|
|
151
|
-
|
|
129
|
+
<br>
|
|
152
130
|
|
|
153
|
-
**
|
|
131
|
+
**Security & data directories:**
|
|
132
|
+
- Both backends listen on `127.0.0.1` only. Cookies and sessions remain on your machine; Magpie stores only a locally generated API key.
|
|
133
|
+
- **Gemini Web data directory:** `~/.local/share/magpie-gemini-web` (override with `GEMINI_WEB_DATA_DIR`), logs at `backend.log`. Supports macOS, Linux, and Windows (x64 / arm64).
|
|
134
|
+
- **AI Studio data directory:** `~/.local/share/magpie-ai-studio` (override with `AI_STUDIO_DATA_DIR`), logs at `backend.log` (rotated on next start after exceeding 10 MB). Uses port 2048 by default (or picks a free port and saves it in `config.json`). Supports macOS, Linux (x64 / arm64), and Windows x64.
|
|
135
|
+
- Concurrency is capped at 1, but Google account rate-limiting or flagging cannot be completely ruled out—use at your own risk.
|
|
154
136
|
|
|
155
|
-
|
|
137
|
+
**AI Studio upgrades and model selection:**
|
|
138
|
+
- The plugin pins SHA-256-verified `v0.2.13-magpie.1`, based on upstream `v0.2.13`. Upgrade the plugin to update the backend. Official managed releases at or below that upstream version are upgraded on the next managed startup, preserving accounts, port and sign-in credentials.
|
|
139
|
+
- **Online updates are disabled in the managed backend on macOS, Linux, and Windows.** The admin page directs users to upgrade through the Magpie plugin; the update endpoint returns HTTP 403 and update checks do not contact GitHub. Independently managed external servers are unaffected. See [docs/studio-release.md](docs/studio-release.md) for the patch and reproducible build process.
|
|
140
|
+
- Managed Unix installs still attempt to set `package/` to `0555` as additional file protection. Permission failures do not block service, and disabling online updates does not depend on permissions. To reset by manually deleting the data directory, stop the service first, then run `chmod -R u+w "<data-dir>/package"` before deleting it; replace `<data-dir>` with the actual path.
|
|
141
|
+
- If a newer or custom version is installed, the plugin reports a conflict with `stop`, `install`, and `start` commands carrying the correct `--data-dir`. Stop can recover a changed listener PID and verifies its executable path before signaling it. If HTTP is down but the process is still alive, the plugin refuses to reinstall or launch a second process.
|
|
142
|
+
- When stopped, a replaced executable is restored from the verified pinned archive; failed verification never launches the replacement. Existing account and runtime data files are kept, but **an older backend may not read data migrated by a newer version**. Before manually downgrading, stop the service and back up the entire data directory, including `auth/` and `runtime/requests.db`. If data migration is known to have occurred, update the plugin to match the newer backend.
|
|
143
|
+
- The backend's base request deadline and the plugin's default response/stream-idle timeout are 30 minutes (override via `studio.requestTimeoutMs`). This allows long non-streaming replies to finish collecting on the server. A stalled backend can also take 30 minutes to time out, and its single worker can hold up later requests. Cancel a request or choose a shorter timeout when needed; shorter limits can interrupt valid long replies. Upstream controls deadline scaling for automatic continuation.
|
|
144
|
+
- Source review of the locally installed Magpie `v0.1.1285` (`d783df46`) found no shorter fixed total timeout on this plugin's generation path: `Provider.Do → plugin.Fetch → loader.fetch` bypasses the ordinary HTTP transport's 10-minute response-header timeout. The gateway's 5-minute `IdleTimeout` applies between requests. Clients or reverse proxies can impose shorter limits; this was not a 30-minute end-to-end waiting test.
|
|
145
|
+
- 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.
|
|
156
146
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
147
|
+
**Gemini Web optimized backend upgrades & rollback:**
|
|
148
|
+
- One-click setup uses [4.22.0-magpie.1](https://github.com/BUKOWSKIREAL/magpie-gemini-web/releases/tag/backend-v4.22.0-magpie.1) by default (built from pinned upstream v4.22.0 with XSRF caching, request cancellation propagation, early tool-call completion, and Argon model verification).
|
|
149
|
+
- **Upgrading:** Running backends are not interrupted automatically. Stop the existing process (PID in `backend.pid` inside the data directory); the next Magpie launch or request will upgrade the binary while preserving config and cookies.
|
|
150
|
+
- **Rollback to upstream / restore optimized build** (run in the plugin directory after stopping the backend):
|
|
151
|
+
```bash
|
|
152
|
+
npm run backend:install:upstream # Roll back and pin to official v4.22.0
|
|
153
|
+
npm run backend:install # Restore default optimized build
|
|
154
|
+
```
|
|
155
|
+
- For reproducible builds and release procedures, see [docs/backend-release.md](docs/backend-release.md).
|
|
162
156
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
```
|
|
157
|
+
**Native Task on macOS (experimental):**
|
|
158
|
+
On macOS, Gemini Web sign-in includes an experimental **macOS Native Task** option that routes requests through `Gemini.app`'s native Task mode (`gemini-task-argon` with native Function Calling). Currently in Alpha and requires local setup first—see [native-task/README.md](native-task/README.md).
|
|
166
159
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
The backend release includes source and build metadata. Developers with Git, Node 22+ and Go 1.27.1 can reproduce all six builds and compare the pinned hashes from this repository:
|
|
170
|
-
|
|
171
|
-
```bash
|
|
172
|
-
npm run backend:release:build
|
|
173
|
-
```
|
|
160
|
+
</details>
|
|
174
161
|
|
|
175
|
-
|
|
162
|
+
---
|
|
176
163
|
|
|
177
164
|
## License
|
|
178
165
|
|
|
179
|
-
MIT. The upstream gemini-web2api-go project is also MIT (see `LICENSE-UPSTREAM`).
|
|
166
|
+
MIT. The upstream `gemini-web2api-go` project is also MIT (see `LICENSE-UPSTREAM`).
|