Yuu_jiang_ on X (#6849): 100milionseek and Coarena take at most 8 images a request, counted over the whole conversation, tool results included, and every turn after the ninth screenshot failed with no way on but /clear. ID-VerNe's max-images (the commit before) set one number from the CLI. This builds on it: - The cap is per provider, and optionally per model: max-images=8, or max-images=8,gemini-3-flash=10. The exact model is looked up first, then its upstream name, then "*" for all. The provider's cap moves with a model's local id like the other per-model limits. - 100milionseek's "At most 8 images per request (MAX_IMAGES)." and Coarena's "A request may carry at most 8 images." are learned as Copilot's words are, by provider and model, so the first refusal is the last. A user's own number is fitted before any refusal; a learned one that is smaller still lowers it. - Images are counted everywhere, a tool_result's too; the oldest are left out first and the latest user turn keeps its own. Only the request sent changes; session files are not touched. A request with no cap, or within it, goes out byte for byte as it came. - The provider editor's Advanced (folded unless set) has Images per request under Max output, in maximages.js, imported as that field is drawn, in every language. A GUI save keeps the value when the field isn't drawn. An editor opened and closed is not dirty (the draft takes the value only when typed), and the import, like keyrates.js's, draws nothing once the editor has closed: before that, a quick close threw "Cannot read properties of null (reading 'maxImages')" and ('keyPriceRates'), which add-sheet and key-box-once caught. - Budgets: app.js and the core +354, said in core_budget_test.go. What was run: - go test -count=1 -timeout 45m ./... on mote at618bfc1a9+ these two commits: 102 packages ok; internal/tui red on TestEveryWordHasZh ("subagent pool", red on main, fixed by6fbc24a05). After rebasing on origin/mainc9e8422fa: internal/gui (budgets), tui, agent, testenv, gateway and provider: all ok. gofmt clean; GOOS=linux go vet -tags nogui ./... and GOOS=windows go vet ./... ok on mica. - At618bfc1a9+ these commits, on mote: provider-max-images 60/0, add-sheet 6/0, add-button 6/0, key-box-once 20/0, nokey-editor 4/0, provider-base-api 4/0, add-sheet-custom 32/0, kimi-subagent-pool 20/0, sync-signins-except 20/0; old-webkit 4/2 (#6030 headerpresets, #5919), i18n-keys 3/1 (#6877), provider-max-output 4/20 (#6209), editor-hints 30/10 (the same at origin/main, in #6934). - The whole GUI suite (1569 files, chromium + webkit, every language) on mote at the pre-fix head under another session's suite: 153 files red. Each red file rerun at the fixed head and at origin/mainad585ccd6on mica (and mote for the close ones). Red at head only: add-button (Escape showed the discard confirm: the dirty draft, fixed), add-sheet and key-box-once (the null draft above, fixed); now 3/0, 6/0, 20/0, provider-max-images 60/0. Every other red file is red the same at origin/main, the same subtests: filed with its numbers as #6934 (the #6782 class). i18n-keys' ", with an image" is #6877, old-webkit #6030/#5919, provider-max-output #6209. Broken by hand (each red, then put back): the relay words left out (TestImageCapLearnedFromRelayWords), per-model lookup by upstream name gone (TestMaxImagesOnAModelListedByItsOwnID), a copy made when nothing applies (TestImageCapNoneIsTheSameBytes), the learned cap over the user's (TestMaxImagesStandsOverTheLearnedCap), the GUI save dropping it (TestProviderSaveKeepsMaxImages), the CLI's empty value (TestProviderSetMaxImages), the cap not moving with a local id, the JS parse without its 1000 limit and the field not unfolding Advanced (provider-max-images), and the draft written on open (provider-max- images' Escape check, 20 red). Not tried: no real 100milionseek or Coarena account (the words are the reporter's literal ones); no GUI run on Windows or Linux; the suite's GUI half ran under load, so many reds are shared timeouts. Co-authored-by: ID-VerNe <yuu_seeing@foxmail.com>
Subsystem design references
These pages describe current responsibilities, runtime paths, state, and contracts. Start with the subsystem relevant to your task, then follow its source links to verify the implementation you change.
| Subsystem | Reference |
|---|---|
| Built-in subscriptions moving to plugins | Provider and plugin ownership |
| Built-in plugins: registry, lifecycle, plugins.yml, presets, settings schemas, the window's kernel (slots, error boundary, kit) | Plugin runtime |
| Plugins that run on the gateway's requests and replies | Gateway middleware |
| Tools that plugins give, offered to every agent as an MCP server | Plugin tools |
| Plugins that await context recall and observe completed replies | Asynchronous gateway request hooks |
| Claude subscription turns across Claude Code runs | Claude subscription bridge |
| How the gateway picks a provider, key or account, and falls back | Gateway routing and fallback |
| Gateway Session Aggregation | Gateway Session Aggregation |
| Connecting an agent's config to the gateway, drift, disconnect, WSL twins | Agent wiring |
| Providers, keys, subscription accounts, refresh and allowance | Providers and accounts |
| Instructions, MCP servers, skills and RTK written into agents | Library |
| One MCP server, magpie, given to every agent in place of the Library's servers | MCP router |
| Memory shared by every agent: the memory MCP server, the digest in instructions, the Memory tab | Memory |
| One skill, magpie-skills, listing the Library's skills in place of each agent's own | Skill router |
Tray, panel, window, magpie web and the page's JSON API |
GUI app shell |
| Encrypted backups and setup synchronization over WebDAV, S3 or GitHub | Sync and backup |
A subsystem can span several packages or repositories. Its reference describes the behavior those parts provide together; it does not need to list every function.
Maintain a reference
Update the owning reference in the same PR when a change alters a documented responsibility, interface, state transition, runtime path, compatibility rule, or failure behavior. An internal refactor that preserves these contracts does not require a prose change.
Keep each fact in one reference and link to it from agent instructions or other pages. Link to source files and named symbols rather than copying implementation details that change frequently. Explain field meanings and constraints that signatures alone do not express.
For a new reference, include the responsibilities and boundaries, source of truth, main runtime paths, state transitions, important constraints, and existing verification commands. Include failure and compatibility behavior where relevant. Document current behavior separately from proposed changes; the proposal belongs in its issue or PR.
Describe a PR's semantic changes
For each affected subsystem, explain the observable change with its trigger and before/after behavior. Include changes to interfaces, state, compatibility, and failure behavior when relevant. Link the affected reference, implementation, and verification evidence. State when a refactor preserves the documented behavior.
For example, a change to plugin adoption should explain which migration state and account condition trigger it, which implementation handles requests before and after adoption, and which test exercises that transition.
This is an author-provided explanation that a reviewer verifies against the diff and surrounding code. It is not an automatically proven compatibility verdict.
Review a change
- Identify the affected subsystem and the actual runtime path, including plugin or built-in ownership.
- Compare the claimed before/after behavior with the base and head implementation. Trace relevant callers and state transitions beyond the changed lines.
- Check that changed contracts appear in the owning reference and that source links still resolve.
- Check that the cited tests or runtime evidence exercise the claimed behavior. Report checks that were not run.
A documentation update alone does not prove the implementation. Existing tests and runtime evidence remain necessary for behavior changes.