magpie-gemini-web 0.5.0 → 0.5.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.
@@ -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,177 +2,160 @@
2
2
 
3
3
  [中文](README.md) | English
4
4
 
5
- Use Gemini on the web and Google AI Studio through your Google account in [Magpie](https://usemagpie.ai/). The plugin runs [gemini-web2api-go](https://github.com/zexadev/gemini-web2api-go) and [AIStudio2API](https://github.com/Mag1cFall/AIStudio2API) backends on your machine, turning Google web interfaces into OpenAI-compatible APIs.
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
- ## Getting started (Gemini Web)
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
- **Connecting an existing backend:** if you already run gemini-web2api-go yourself, choose 连接已有后端 (connect an existing backend with a custom URL and API key). Enter its URL (ending in `/v1`) and its `API_KEY`.
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
- | Option | Default | Description |
13
+ | Feature | Google AI Studio (`ai-studio`) | Gemini Web (`gemini-web`) |
42
14
  | :--- | :--- | :--- |
43
- | `allowTools` | `true` | Allows tool calls (experimental; upstream emulates them with prompts). When `false`, requests with tools get a 400 |
44
- | `allowImages` | `false` | Allows image input |
45
- | `baseURL` | `http://127.0.0.1:8083/v1` | Default backend URL |
46
- | `contextLimit` / `outputLimit` | `1000000` / `8192` | Context and output limits reported to clients |
47
- | `requestTimeoutMs` / `modelTimeoutMs` | `240000` / `10000` | Timeouts in ms for requests and for fetching the model list. The request timeout counts each wait on the backend, so a reply that keeps coming is never cut off |
48
- | `stripCitations` | `true` | Removes the citation markers Gemini adds to replies, `[cite: 1]` and `[cite_start]`, tool call arguments included. Set it to `false` while Gemini edits code that contains such text itself |
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) |
49
21
 
50
- ## Thinking effort
22
+ ---
51
23
 
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)).
24
+ ## Quick Start
53
25
 
54
- ## Security and data
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.
55
27
 
56
- - The backend listens on `127.0.0.1` only. Your cookie goes only to that local backend, and Magpie stores a locally generated API key instead.
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.
28
+ ### Option 1: Google AI Studio (`ai-studio`)
60
29
 
61
- ## Usage
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.
62
34
 
63
- Magpie's usage cards show each Google account's **5-hour** and **weekly** usage and reset times, as <https://gemini.google.com/usage> does. Each Google account gets a card of its own, named by its email:
35
+ ### Option 2: Gemini Web (`gemini-web`)
64
36
 
65
- - An account added by one-click setup becomes its own card.
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).
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.
67
44
 
68
- Note that the backend picks the Google account for each request from its pool in turn: how Magpie spreads requests over the cards doesn't decide which account serves them. Only the one-click local backend has usage; a backend you connect to yourself keeps its cookies out of the plugin's reach.
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.
69
46
 
70
- To send Google fewer requests, usage isn't read on every refresh. An account is read again once the backend has used it or one of its windows has reset, and never twice within 10 minutes. An idle account is read at most every 6 hours, which also picks up what you used in the Gemini web app.
47
+ ---
71
48
 
72
- Usage and emails are read the way the backend reaches Google for that account. When that way isn't certain, nothing is read and the card says why:
49
+ ## Multiple Accounts & Usage Cards
73
50
 
74
- - the backend has a proxy pool, but the account isn't bound to a proxy yet (the backend binds it on its first request);
75
- - the account's proxy is disabled, or is a SOCKS proxy.
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.
76
57
 
77
- So with a proxy pool, an account just added by one-click setup has no email yet. Send one request with it, sign in to it again with **「添加本地后端里已有的 Google 账号」**, then remove the sign-in without an email.
58
+ ---
78
59
 
79
- ## Limitations (Gemini Web)
60
+ ## Configuration & Advanced Usage
80
61
 
81
- - Upstream emulates tool calls with prompts, so they aren't always reliable. Flash models often don't call tools.
82
- - Only text models whose names start with `gemini-` are exposed. A `cost` of 0 doesn't reflect your actual Google quota.
62
+ <details>
63
+ <summary><b>⚙️ Plugin Options & Proxy Setup</b> (image input, proxy configuration, custom backends)</summary>
83
64
 
84
- ## Google AI Studio (`ai-studio`)
65
+ <br>
85
66
 
86
- Uses Google AI Studio through [AIStudio2API](https://github.com/Mag1cFall/AIStudio2API) (pinned to v0.2.12). Unlike Gemini Web, tool calls use native Function Calling, thinking models offer four levels in Magpie, `minimal` / `low` / `medium` / `high` (`minimal` is the fastest and uses the least quota), and generation needs no browser.
67
+ Tool calling is enabled by default; image input is disabled by default. Configure plugin options via the CLI:
87
68
 
88
- ### Getting started
69
+ ```bash
70
+ # Enable image input (applies to both providers)
71
+ magpie plugin options magpie-gemini-web '{"allowImages":true}'
89
72
 
90
- 1. Sign in to Google AI Studio and choose **一键配置本地 Google AI Studio(推荐)** (one-click local setup). The plugin downloads AIStudio2API, verifies its SHA-256 and starts it in the background.
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 is downloaded first, so the window can take a few minutes to appear; the login must finish within 15 minutes.
73
+ # Configure a proxy for AI Studio
74
+ magpie plugin options magpie-gemini-web '{"studio":{"proxy":"http://127.0.0.1:7890"}}'
75
+ ```
92
76
 
93
- To add another account, run the one-click setup again. All accounts share one sign-in card: the local service picks the account for each request, using one until it cools down, then the next.
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 |
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) |
94
88
 
95
- Other sign-in options:
89
+ **Using a proxy to reach Google:**
90
+ - **AI Studio:** Set `studio.proxy` in plugin options or the `AI_STUDIO_PROXY` environment variable.
91
+ - **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).
92
+ - *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).
96
93
 
97
- - **使用本机已有的 AI Studio 服务** (use the local service already set up): signs in when the machine already has accounts (added from the command line, say), without a login window.
98
- - **重新登录失效的 AI Studio 账号** (sign an expired account in again): when an account's Google login expires, choose it here to sign in again.
99
- - **连接已有 AIStudio2API** (connect an existing AIStudio2API): if you run AIStudio2API yourself, enter its address (default `http://127.0.0.1:2048/v1`) and `PROXY_API_KEY`.
94
+ **Connecting a self-hosted backend:**
95
+ 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.
100
96
 
101
- Usage card: AI Studio reports no remaining quota, so the card shows the pool's accounts and the models they are cooling down on. Each model gets a meter; a full one means no account can use it for now, with the time it comes back.
97
+ **Refreshing the model list:**
98
+ After upgrading the plugin, run `magpie provider models gemini-web` to refresh available models.
102
99
 
103
- ### Plugin options
100
+ </details>
104
101
 
105
- `allowTools`, `allowImages`, `requestTimeoutMs` and `modelTimeoutMs` apply to both providers; the other AI Studio options go under `studio`. The root `baseURL`, `contextLimit`, `outputLimit` and `stripCitations` apply to Gemini Web only.
102
+ <details>
103
+ <summary><b>🛠️ AI Studio CLI Commands</b> (service status, re-login, offline install)</summary>
106
104
 
107
- ```bash
108
- magpie plugin options magpie-gemini-web '{"studio":{"proxy":"http://127.0.0.1:7890"}}'
109
- ```
105
+ <br>
110
106
 
111
- | Option | Default | Description |
112
- | :--- | :--- | :--- |
113
- | `studio.proxy` | none | Proxy for reaching Google (http / https / socks5). The `AI_STUDIO_PROXY` environment variable works too |
114
- | `studio.baseURL` | `http://127.0.0.1:2048/v1` | Default address for connecting an existing AIStudio2API |
115
- | `studio.contextLimit` / `studio.outputLimit` | the model catalog's | Limits declared to clients; they can only lower the catalog's |
116
- | `studio.allowTools` etc. | as at the root | Override the root option of the same name for AI Studio only |
117
-
118
- AI Studio replies keep their citation marks such as `[cite: 1]`; they can't be stripped.
119
-
120
- ### Command line
107
+ 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:
121
108
 
122
- When an error from the plugin asks you to run a command, it gives the command with its full path, ready to copy. In the plugin's directory you can also use:
123
-
124
- | Command | What it does |
109
+ | Command | Description |
125
110
  | :--- | :--- |
126
- | `npm run studio:status` | Show the service and account status |
111
+ | `npm run studio:status` | Show local service and account status |
127
112
  | `npm run studio:start` / `studio:stop` | Start / stop the local service |
128
113
  | `npm run studio:login` | Add a Google account |
129
- | `npm run studio:relogin -- [<account>]` | Sign an expired account in again (optional when only one is) |
130
- | `npm run studio:install -- --archive <file>` | Install offline from a downloaded archive |
114
+ | `npm run studio:relogin -- [<account>]` | Re-authenticate an expired account (argument optional if only one) |
115
+ | `npm run studio:install -- --archive <file>` | Offline install from a pre-downloaded archive |
131
116
  | `node scripts/studio.mjs import <dir>` | Import existing accounts while the service is stopped |
132
- | `npm run studio:smoke` | Live acceptance run (uses account quota) |
133
-
134
- ### Security and data
117
+ | `npm run studio:smoke` | Run a live acceptance check (consumes account quota) |
135
118
 
136
- - The service listens on `127.0.0.1` only; Magpie keeps a locally generated API key.
137
- - 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.
138
- - 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`.
139
- - The downloaded archive stays in the data directory; installing again uses it when its checksum matches.
140
- - Supported on macOS, Linux (x64 / arm64) and Windows x64.
119
+ </details>
141
120
 
142
- ## Native Task on macOS (experimental)
121
+ <details>
122
+ <summary><b>🔒 Security, Data Directories & Backend Version Management</b> (logs, rollback, macOS Native Task)</summary>
143
123
 
144
- 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.
124
+ <br>
145
125
 
146
- This is an alpha: it supports only the verified Gemini.app build, needs a local setup first (Gemini.app signed in, plus session templates), has passed only one live tool round trip against real Argon, and shows no usage; if an agent is interrupted before it returns a tool result, that call holds the only Task slot for up to about 4 minutes. See [native-task/README.md](native-task/README.md) for setup, session requirements and limitations.
126
+ **Security & data directories:**
127
+ - Both backends listen on `127.0.0.1` only. Cookies and sessions remain on your machine; Magpie stores only a locally generated API key.
128
+ - **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).
129
+ - **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.
130
+ - Concurrency is capped at 1, but Google account rate-limiting or flagging cannot be completely ruled out—use at your own risk.
147
131
 
148
- ## Default optimized backend and rollback
132
+ **AI Studio upgrades and model selection:**
133
+ - 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.
134
+ - **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.
135
+ - 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.
136
+ - 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.
137
+ - 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.
138
+ - 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.
139
+ - 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.
140
+ - 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.
149
141
 
150
- Starting with plugin **0.4.1**, one-click setup uses [4.22.0-magpie.1](https://github.com/BUKOWSKIREAL/magpie-gemini-web/releases/tag/backend-v4.22.0-magpie.1). It includes the changes that previously required a manual build: stable XSRF caching, cancellation propagation for the main generation and upload requests, early completion after complete tool calls, browser headers, and verification of the returned Argon model. Your Google account still needs access to the requested model.
142
+ **Gemini Web optimized backend upgrades & rollback:**
143
+ - 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).
144
+ - **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.
145
+ - **Rollback to upstream / restore optimized build** (run in the plugin directory after stopping the backend):
146
+ ```bash
147
+ npm run backend:install:upstream # Roll back and pin to official v4.22.0
148
+ npm run backend:install # Restore default optimized build
149
+ ```
150
+ - For reproducible builds and release procedures, see [docs/backend-release.md](docs/backend-release.md).
151
151
 
152
- **Upgrading an existing installation:** the plugin leaves a running backend alone. Stop the existing backend process (its process ID is in `backend.pid` in the data directory), then start Magpie or send a request. A stopped old official backend is upgraded automatically, preserving configuration, the cookie database and API keys. Explicitly installed local Argon builds are kept; to replace one with the published build, stop it and run `backend:install` below.
153
-
154
- To roll back, stop the backend and run this from the plugin directory:
155
-
156
- ```bash
157
- npm run backend:install:upstream
158
- ```
152
+ **Native Task on macOS (experimental):**
153
+ 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).
159
154
 
160
- This installs the checksum-verified official v4.22.0 and saves the selection, so automatic starts keep using upstream. To restore the default optimized build:
161
-
162
- ```bash
163
- npm run backend:install
164
- ```
165
-
166
- A failed download or checksum verification keeps the previous binary. On Windows, stop the old process before replacing its executable.
167
-
168
- 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:
169
-
170
- ```bash
171
- npm run backend:release:build
172
- ```
155
+ </details>
173
156
 
174
- The script extracts clean sources from the pinned upstream commit and applies `patches/argon.patch`; it never changes the developer's `backend-source` working tree. See [docs/backend-release.md](docs/backend-release.md) for the release procedure.
157
+ ---
175
158
 
176
159
  ## License
177
160
 
178
- MIT. The upstream gemini-web2api-go project is also MIT (see `LICENSE-UPSTREAM`).
161
+ MIT. The upstream `gemini-web2api-go` project is also MIT (see `LICENSE-UPSTREAM`).