Add custom provider model selection and capability options - #112
Add custom provider model selection and capability options#112sambitcreate wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Important
The override plumbing is sound on the desktop runtime path, but three gaps should be addressed before merge: the per-message image limit counts assistant-displayed images (a chat can become permanently unable to generate), the Bot catalog and Telegram picker ignore the new overrides, and the stale manual-add path drops previously configured manual models and overrides.
Reviewed changes
- Portable model intent:
customModelOptionsis split out ofmodelMetadataon save and re-merged on read, with explicit-reset semantics insaveProviderand validation inisPortableProvider. - Runtime enforcement:
resolveProviderRuntimeLimitsapplies context/output/reasoning/vision overrides (maxImages: 0forces text-only), and generation enforces the image limit and removes tools whentoolCall === false. - Display and native projection:
withProviderFallbackoverlays overrides and exposesdetectedCapabilities;AidenRemoteModelServicenow honors overrides forsupportsImages. - Settings UI: new
CustomModelOptionsEditorunder a "More options" disclosure with manual model IDs, per-model switches, numeric limits, and reset; model visibility moved into the same disclosure. - Tests: focused
custom-model-options.test.ts, config-store restart/reset test, Android/iOS decode tests, and an Electron e2e spec covering save/rediscovery/reset/manual entry.
ℹ️ Nitpicks
- The new
toolCall === falseruntime gate (llm-client.ts:2068-2071) has no test; only its persistence is covered. A focused test that tools are actually removed would pin the behavior.
DeepSeek Flash | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed 96958601 since the prior pullfrog review at 7351057e — the four inline concerns are addressed and pinned by new regressions.
- Role-aware image limit: The limit now counts only user-authored attachments, so assistant-displayed images can no longer block generation.
- Bot and Telegram projection: Bot inventory applies
overrides.vision ?? visionwithmaxImages !== 0, and Telegram model choices route through the new override-awaretelegramModelChoice. - Numeric override clearing: Clearing a numeric field deletes the key instead of storing explicit
undefined, restoring the detected placeholder before save. - Stale manual-add: Adding a manual ID while discovery is stale now retains prior manual IDs and their overrides.
- Tool policy extraction:
applyCustomModelToolPolicy/prepareCustomModelToolContextcentralize thetoolCall: falsegate, with a harness test showing base and extension tools are removed from a frozen snapshot without mutating it. - Regression coverage: Added focused tests for assistant images, Telegram reasoning overrides, Bot image flags, deferred browser discovery, and the Electron save/rediscovery/reset/manual flows.
Verified with npm run type-check, the focused custom-model-options, telegram-controls, and bot-capability-inventory-ports suites, and the new harness test — all pass.
DeepSeek Flash | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed 2c9e90b1 since the prior pullfrog review at 9695860 — a test-only follow-up that removes the CI race in the Git push cancellation fixture.
- Deterministic cancellation handshake: the wrapper now writes its completion marker as soon as
git pushexits successfully and stays alive, so the test aborts into the cancellation-reconciliation path instead of racing a two-second process-exit window. - Bounded wait and cleanup drain:
waitForFile(marker, 15_000)replaces the fixed 150-attempt poll, and afinallyblock aborts and awaits the operation so fixture cleanup never races a live push;pushTimeoutMsrises to30_000as a backstop above the marker wait. - Papercuts note: records the pre-existing fixture race for future reference.
Verified locally by running the updated test four times and the full push-related subset of git.test.ts (19/19 pass). The head-SHA E2E, Android, and verify checks were still in progress at review time.
DeepSeek Flash | 𝕏

Custom and Tailscale endpoints can now expose More options for model visibility, manual model IDs, and per-model capabilities and limits. Users can override vision, reasoning, tool calling, open weights, server video support, context length, output tokens, and images per message, or reset to detected capabilities.
User-authored model settings persist in portable configuration separately from discovery metadata. Explicit rediscovery preserves overrides and manual IDs; manual setup also works without a discovery endpoint. Runtime limits, tool availability, and native image capabilities respect the overrides. Video records server support; Aiden does not add video uploads.
The existing Git push-cancellation test now waits for an explicit completion marker and drains cancellation before fixture cleanup, fixing a timing race exposed by CI. Its upstream-safety assertions are unchanged.
Validation: