From 5bab6531ffe9754350ef109afa75e67a5a01bee4 Mon Sep 17 00:00:00 2001 From: algometrix Date: Sat, 18 Jul 2026 18:04:26 -0400 Subject: [PATCH] Default Claude provider to the sonnet model The Claude Code CLI's own default model is far more token expensive for note generation. The plugin now passes --model sonnet unless the user sets a different model in settings. Co-Authored-By: Claude Fable 5 --- README.md | 4 ++-- src/main.ts | 6 +++--- src/settings-tab.ts | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 9097217..b38ec68 100644 --- a/README.md +++ b/README.md @@ -192,7 +192,7 @@ npm install -g @anthropic-ai/claude-code claude # run once in a terminal to log in ``` -The plugin calls the CLI in read-only mode with file-modifying tools disabled. +The plugin calls the CLI in read-only mode with file-modifying tools disabled. It uses the Sonnet model by default because the CLI's own default model burns through plan limits much faster; set a different model in settings if you want. > **Note:** the plugin invokes `claude -p` (print mode). Anthropic has announced (currently paused) plans to bill programmatic usage like `claude -p` separately from Pro/Max subscription limits, as extra usage at API rates. If that change ships, plugin usage may no longer be covered by your plan. Also note that generating notes can consume a lot of tokens, especially with large selections or batch generation, so watch your usage limits. @@ -344,7 +344,7 @@ Rebuild. Both files are gitignored, so your prompts stay private. You can also a |---|---|---| | AI provider | `claude`, `gemini`, `codex`, or `ollama` | `claude` | | Claude CLI path | Path to the `claude` executable | `claude` | -| Claude model | Optional model override | *(CLI default)* | +| Claude model | Model override (e.g. `opus`, `claude-sonnet-4-6`) | `sonnet` | | Gemini CLI path / model | Same, for Gemini | `gemini` / *(default)* | | Codex CLI path / model | Same, for Codex | `codex` / *(default)* | | Ollama URL / model | Local API endpoint and model name | `http://localhost:11434` / `llama3` | diff --git a/src/main.ts b/src/main.ts index e8c0143..de6a2ab 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1835,9 +1835,9 @@ Rules: "--max-turns", "10", "--disallowedTools", "Edit,Write,Read,Bash,PowerShell,Glob,Grep", ]; - if (this.settings.modelFlag) { - args.push("--model", this.settings.modelFlag); - } + // Default to sonnet: the CLI's own default model is far more + // token expensive for note generation. + args.push("--model", this.settings.modelFlag || "sonnet"); } const providerLabel = PROVIDER_LABELS[this.settings.aiProvider]; diff --git a/src/settings-tab.ts b/src/settings-tab.ts index 5735d1b..7831726 100644 --- a/src/settings-tab.ts +++ b/src/settings-tab.ts @@ -72,10 +72,10 @@ export class ClaudeExplainerSettingTab extends PluginSettingTab { new Setting(containerEl) .setName("Claude model") - .setDesc("Optional model override (e.g. claude-sonnet-4-6). Leave empty for default.") + .setDesc("Model to use (e.g. sonnet, opus, claude-sonnet-4-6). Leave empty for sonnet, which keeps token use low.") .addText((text) => text - .setPlaceholder("") + .setPlaceholder("sonnet") .setValue(this.plugin.settings.modelFlag) .onChange(async (value) => { this.plugin.settings.modelFlag = value.trim();