@tritard/waterbrother 0.16.43 → 0.16.44

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.
Files changed (3) hide show
  1. package/README.md +1 -0
  2. package/package.json +1 -1
  3. package/src/cli.js +27 -3
package/README.md CHANGED
@@ -204,6 +204,7 @@ waterbrother "Search the web for the latest model provider docs about tool calli
204
204
  /runtime-profiles
205
205
  /model anthropic/claude-sonnet-4-20250514
206
206
  /models
207
+ /models all
207
208
 
208
209
  # config
209
210
  waterbrother config set provider anthropic --scope project
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tritard/waterbrother",
3
- "version": "0.16.43",
3
+ "version": "0.16.44",
4
4
  "description": "Waterbrother: bring-your-own-model coding CLI with local tools, sessions, operator modes, and approval controls",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -209,8 +209,8 @@ const INTERACTIVE_COMMANDS = [
209
209
  { name: "/provider", description: "Show active provider" },
210
210
  { name: "/provider <id>", description: "Switch provider for this session" },
211
211
  { name: "/providers", description: "Select provider from list" },
212
- { name: "/model", description: "Show current model" },
213
- { name: "/model <id>", description: "Switch model for this session" },
212
+ { name: "/model", description: "Show current model for this session" },
213
+ { name: "/model <id>", description: "Switch model directly for this session" },
214
214
  { name: "/read <url>", description: "Read and summarize a public URL" },
215
215
  { name: "/search <query>", description: "Search the web and summarize results" },
216
216
  { name: "/open <url|index>", description: "Open a URL or last search result in browser" },
@@ -220,7 +220,8 @@ const INTERACTIVE_COMMANDS = [
220
220
  { name: "/update", description: "Pull latest code, install deps, and run checks" },
221
221
  { name: "/onboarding", description: "Print onboarding/API key guide" },
222
222
  { name: "/onboarding <telegram|discord|signal>", description: "Print messaging service onboarding" },
223
- { name: "/models", description: "Select model from list" },
223
+ { name: "/models", description: "Select model from active provider" },
224
+ { name: "/models all", description: "Browse all known models across providers" },
224
225
  { name: "/feedback", description: "Report a bug or share feedback" },
225
226
  { name: "/cost", description: "Show session token usage and cost breakdown" },
226
227
  { name: "/diff", description: "Show git changes in the current repo" },
@@ -9854,6 +9855,7 @@ Be concrete about surfaces — name actual pages/flows. Choose the best stack fo
9854
9855
  if (line === "/models") {
9855
9856
  try {
9856
9857
  const providerSpec = getProviderSpec(context.runtime.provider);
9858
+ console.log(dim(`Browsing models for active provider: ${context.runtime.provider}`));
9857
9859
  const selectedModel = await chooseRuntimeModelInteractive(agent.getModel(), context.runtime.provider, {
9858
9860
  apiKey: context.runtime.apiKey,
9859
9861
  baseUrl: context.runtime.baseUrl,
@@ -9868,12 +9870,34 @@ Be concrete about surfaces — name actual pages/flows. Choose the best stack fo
9868
9870
  model: selectedModel
9869
9871
  });
9870
9872
  console.log(`model set to ${nextRuntime.model}`);
9873
+ console.log(dim('Use /models all to browse the cross-provider catalog.'));
9871
9874
  } catch (error) {
9872
9875
  console.log(`model selection canceled: ${error instanceof Error ? error.message : String(error)}`);
9873
9876
  }
9874
9877
  continue;
9875
9878
  }
9876
9879
 
9880
+ if (line === "/models all") {
9881
+ try {
9882
+ const selectedModel = await chooseAllModelsInteractive(agent.getModel());
9883
+ const { config } = await loadConfigLayers(context.cwd);
9884
+ const nextRuntime = await applyRuntimeSelection({
9885
+ config,
9886
+ context,
9887
+ agent,
9888
+ session: currentSession,
9889
+ model: selectedModel
9890
+ });
9891
+ const keyStatus = runtimeRequiresApiKey(nextRuntime) && (!nextRuntime.apiKey || isLikelyPlaceholderApiKey(nextRuntime.apiKey))
9892
+ ? ' (API key missing)'
9893
+ : '';
9894
+ console.log(`model set to ${nextRuntime.model} (${nextRuntime.provider})${keyStatus}`);
9895
+ } catch (error) {
9896
+ console.log(`model catalog selection canceled: ${error instanceof Error ? error.message : String(error)}`);
9897
+ }
9898
+ continue;
9899
+ }
9900
+
9877
9901
  if (line === "/providers") {
9878
9902
  try {
9879
9903
  const selectedProvider = await chooseProviderInteractive(context.runtime.provider);