Skip to content

fix(settings): General-tab model picker supports OpenRouter; enable devtools#15

Merged
mrdulasolutions merged 1 commit into
mainfrom
claude/general-tab-model-picker-openrouter
May 13, 2026
Merged

fix(settings): General-tab model picker supports OpenRouter; enable devtools#15
mrdulasolutions merged 1 commit into
mainfrom
claude/general-tab-model-picker-openrouter

Conversation

@mrdulasolutions
Copy link
Copy Markdown
Owner

Summary

Two of the three user-reported issues today land here. PR #14 covers the third (API key not propagating to sidecar).

1. General → AI Models picker was Claude-tier-only

The picker only listed `MODEL_TIERS = ["haiku", "sonnet", "opus"]` and silently dropped any other selection. The Agents tab had a proper picker (Anthropic + OpenRouter optgroups, auto-save), but for a different subset of features. Net effect: the user couldn't switch the General-tab features (analysis, drafts, agentChat, etc.) to a free OpenRouter model at all — and the picker required clicking Save at the bottom of the page.

This PR rewrites the General picker to match the Agents picker shape:

  • Anthropic optgroup with the full `ANTHROPIC_MODEL_OPTIONS` list
  • OpenRouter (free) optgroup when free models are loaded
  • Auto-save on change — writes `modelConfig` immediately via `settings.set`, invalidates the `general-config` query
  • `senderLookup` keeps the existing `anthropicOnly` semantic (uses Anthropic web_search; no OpenRouter equivalent)

The sidecar's `resolveModelFor()` already accepts both legacy tier names (`"haiku"`) and concrete model ids (`"claude-haiku-4-5-…"`, `"deepseek/…:free"`), so the value-space change round-trips without a preferences migration.

The General tab's Save button still covers other fields (toggles, GitHub token, prerelease updates) — only the model picker became auto-save.

2. DevTools were disabled in release builds

User report: "i can't see dev for notifications. this worked before but its not working now." Tauri 2 only bundles devtools support when the `devtools` feature is enabled on the `tauri` crate. Without it, Cmd+Option+I in production builds does nothing.

Add `"devtools"` to the tauri features in `src-tauri/Cargo.toml`. Renderer-side devtools then open with the standard macOS chord. Helps diagnose the notifications issue and any future renderer-only bug.

Related

🤖 Generated with Claude Code

…evtools

Two user-reported issues, one PR.

## 1. General → AI Models picker hardwired to Claude tiers

The picker only listed `MODEL_TIERS = ["haiku", "sonnet", "opus"]`,
silently dropped any selection outside that list (the `if
(MODEL_TIERS.includes(tier))` guard), and only persisted when the
user clicked the Save button at the bottom of the General tab. The
Agents tab had a working picker (Anthropic + OpenRouter optgroups,
auto-save on change) but for a different *subset* of features —
the user couldn't switch the General-tab features (analysis,
drafts, agentChat, etc.) to a free OpenRouter model at all.

Replace the General tab picker with the same shape as the Agents
tab:

  - Anthropic optgroup with the full ANTHROPIC_MODEL_OPTIONS list.
  - OpenRouter (free) optgroup when freeModels are loaded.
  - Auto-save on change: writes modelConfig immediately via
    `settings.set`, invalidates the general-config React Query.
  - `senderLookup` keeps the existing `anthropicOnly` semantic
    (uses Anthropic web_search; no OpenRouter equivalent) — only
    Claude models, plus the "Anthropic-only" chip + non-Claude
    warning.

The sidecar's `resolveModelFor()` already accepts both legacy tier
names ("haiku") and concrete model ids ("claude-haiku-4-5-…",
"deepseek/…:free"), so storing concrete ids round-trips without a
preferences migration.

The Save button at the bottom of the General tab still covers
other fields (sender lookup toggle, sync-drafts toggle, GitHub
token, prerelease updates) — only the model picker became
auto-save.

## 2. DevTools disabled in release builds

User: "i can't see dev for notifications. this worked before but
its not working now." Tauri 2 bundles devtools support only when
the `devtools` feature is enabled on the `tauri` crate; without
it, `Cmd+Option+I` in production builds does nothing.

Add the feature to `tauri = { version = "2", features = [...] }`
in `src-tauri/Cargo.toml`. Renderer-side devtools then open with
the standard macOS chord. Useful for diagnosing the notifications
issue and any future renderer-only bug.

## Related but not in this PR

- PR #14 (still open) — fixes the underlying "OpenRouter API key
  not saving" by forwarding the key to the sidecar's in-memory
  store after the keychain write. Both PRs need to land for the
  end-to-end flow to work: PR #14 makes the key effective, this
  PR lets users actually select an OpenRouter model in General.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@mrdulasolutions mrdulasolutions merged commit e2fe194 into main May 13, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant