vg-coder-cli 2.0.51 → 2.0.53

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/INTEGRATION.md CHANGED
@@ -110,14 +110,17 @@ Mỗi Google account muốn dùng → 1 Chrome profile riêng:
110
110
  "attempts": [
111
111
  { "workerEmail": "alice@gmail.com", "code": "rate_limit_exceeded", "at": 0 }
112
112
  ],
113
- "result": { "chatId": "...", "markdown": "..." },
113
+ "result": { "chatId": "...", "markdown": "...", "actualModel": "gemini-3-flash-preview" },
114
114
  "error": { "code": "...", "message": "..." },
115
115
  "timing": { "createdAt": 0, "queuedAt": 0, "startedAt": 0, "finishedAt": 0, "durationMs": 0 },
116
116
  "workingDir": "/abs/path"
117
117
  }
118
118
  ```
119
119
 
120
- `result.markdown` chỉ có khi `status="done"`. `attempts[]` ghi mọi lần worker bị rate-limit và task được requeue.
120
+ `result.markdown` chỉ có khi `status="done"`. `result.actualModel` (v2.0.53+) =
121
+ model ID thực thi task, scrape từ AI Studio sidebar — bắt được silent fallback
122
+ khi account thiếu access tới preview model. Có thể `null` nếu DOM chưa render.
123
+ `attempts[]` ghi mọi lần worker bị rate-limit và task được requeue.
121
124
 
122
125
  ### GET `/api/tasks` — list tasks
123
126
 
@@ -184,7 +187,7 @@ Server có thể chủ động list / đóng / mở tab AI Studio trong từng p
184
187
  |---|---|---|---|
185
188
  | `GET` | `/api/launcher/tabs` | `?label=<email>` (optional) | List tabs trong profile (hoặc all profiles nếu bỏ label) |
186
189
  | `POST` | `/api/launcher/close-tab` | `{ workerLabel?, tabId? }` | Đóng tab cụ thể, hoặc tất cả tab AI Studio nếu bỏ `tabId` |
187
- | `POST` | `/api/launcher/open-tab` | `{ workerLabel?, model?, url?, active? }` | Mở tab mới. `model` mặc định `gemini-3-flash-preview` |
190
+ | `POST` | `/api/launcher/open-tab` | `{ workerLabel?, model?, url?, active? }` | Mở tab mới. `model` mặc định `gemini-3-flash-preview`. Response v2.0.52+ kèm `requested_model` / `actual_model` / `fallback_occurred` để detect AI Studio silent-fallback (account thiếu access tới preview model) |
188
191
 
189
192
  ```bash
190
193
  # List tab tất cả profile
@@ -197,6 +200,26 @@ curl -X POST -d '{"workerLabel":"alice@gmail.com","model":"gemini-3-flash-previe
197
200
  -H 'Content-Type: application/json' http://127.0.0.1:6868/api/launcher/open-tab
198
201
  ```
199
202
 
203
+ `open-tab` response (v2.0.52+):
204
+
205
+ ```json
206
+ {
207
+ "ok": true,
208
+ "tabId": 477055248,
209
+ "windowId": 477055217,
210
+ "url": "https://aistudio.google.com/prompts/new_chat?model=gemini-3-flash-preview",
211
+ "requested_url": "https://aistudio.google.com/prompts/new_chat?model=gemini-3-pro-preview",
212
+ "requested_model": "gemini-3-pro-preview",
213
+ "actual_model": "gemini-3-flash-preview",
214
+ "fallback_occurred": true
215
+ }
216
+ ```
217
+
218
+ Khi `fallback_occurred: true` — AI Studio đã redirect sang model khác do account
219
+ không có access. Client nên check field này để fail-fast hoặc retry với model
220
+ khác. Trước v2.0.52, response chỉ trả URL request → silent quality degradation
221
+ không detect được.
222
+
200
223
  ### Modal auto-handling
201
224
 
202
225
  AI Studio thỉnh thoảng pop modal chặn task. Worker tự detect + click button đúng (poll mỗi 400 ms):