privateer-agent 0.12.41 → 0.12.42

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.
@@ -31,6 +31,7 @@ import {
31
31
  fetchAccountCatalog,
32
32
  } from "../src/providers/account.ts";
33
33
  import { writePiDefaultModel } from "../src/providers/defaultModel.ts";
34
+ import { acceptsImages } from "../src/providers/vision.ts";
34
35
 
35
36
  // A minimal view of Pi's theme (passed to the ui.custom factory) — enough to color
36
37
  // text without pulling Pi's internal theme types into an extension.
@@ -402,6 +403,9 @@ export default function privateerModels(pi: {
402
403
  `Model: ${match.provider}/${match.id} · ${TIERS[tier].label}`,
403
404
  "info",
404
405
  );
406
+ if (!acceptsImages(`${match.provider}/${match.id}`)) {
407
+ ui?.notify?.(`${match.provider}/${match.id} can't see images — files will be dropped silently.`, "warning");
408
+ }
405
409
  return;
406
410
  } catch (e) {
407
411
  ui?.notify?.(`Couldn't switch model: ${(e as Error).message}`, "error");
@@ -448,6 +452,9 @@ export default function privateerModels(pi: {
448
452
  `Model: ${chosen.provider}/${chosen.id} · ${TIERS[chosen.tier].label}`,
449
453
  "info",
450
454
  );
455
+ if (!acceptsImages(`${chosen.provider}/${chosen.id}`)) {
456
+ ui.notify?.(`${chosen.provider}/${chosen.id} can't see images — files will be dropped silently.`, "warning");
457
+ }
451
458
  } catch (e) {
452
459
  ui.notify?.(`Couldn't switch model: ${(e as Error).message}`, "error");
453
460
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "privateer-agent",
3
- "version": "0.12.41",
3
+ "version": "0.12.42",
4
4
  "description": "Privacy-first terminal coding agent — bring your own model across 20 providers (Anthropic, OpenAI, OpenRouter, Google, local Ollama…). Safe-by-default permissions, MCP, sub-agents, workflows, and verifiable TEE inference. Built on the Pi toolkit.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/cli/chat.ts CHANGED
@@ -55,6 +55,7 @@ async function main() {
55
55
  const { pickerCatalog, hiddenAccountNotice, hiddenAccountTitleSuffix } = await import("../providers/modelCatalog.ts");
56
56
  const { resolveDefaultModel, resolveSignedInModel, savedPiDefaultSpec, writePiDefaultModel } =
57
57
  await import("../providers/defaultModel.ts");
58
+ const { acceptsImages } = await import("../providers/vision.ts");
58
59
  const { postOutbox } = await import("../outbox/cloudOutbox.ts");
59
60
  const { addPendingCloud } = await import("../routines/store.ts");
60
61
 
@@ -434,6 +435,14 @@ async function main() {
434
435
  }
435
436
 
436
437
  console.log(`${DIM}privateer-agent — lean REPL. Loading ${provider}/${modelId}…${RESET}`);
438
+ // A saved pick (settings.json) or an old BYO/env default can silently outrank the
439
+ // vision-capable account default (see defaultModel.ts's precedence). Pi drops image
440
+ // blocks for a model that doesn't declare the modality with NO error — `read` on a
441
+ // screenshot just quietly answers about nothing — so make that failure visible
442
+ // instead of letting a user discover it turn by turn. /model to switch.
443
+ if (!acceptsImages(spec)) {
444
+ console.log(`${YELLOW}⚠ ${provider}/${modelId} can't see images — @file/read on a picture or video frame will be dropped silently. Run /model to switch.${RESET}`);
445
+ }
437
446
  if (noQuarterActive()) applyNoQuarter(true); // launched with --no-quarter: say so up front
438
447
 
439
448
  const services = await createAgentSessionServices({
@@ -732,6 +741,9 @@ async function main() {
732
741
  writePiDefaultModel(sp);
733
742
  const m = `model → ${sp}`;
734
743
  console.log(`${DIM}${m}${RESET}`);
744
+ if (!acceptsImages(sp)) {
745
+ console.log(`${YELLOW}⚠ ${sp} can't see images — @file/read on a picture will be dropped silently.${RESET}`);
746
+ }
735
747
  relay?.sendContext({ model: currentSpec, cwd, version: agentVersion() }); // banner follows the switch
736
748
  if (remote) relay?.sendNotice(m);
737
749
  } catch (e) {