From d7aea944b8dda637cef9fd8960cf480d835b9d6b Mon Sep 17 00:00:00 2001 From: zpyoung Date: Thu, 15 Oct 2026 09:12:00 -0500 Subject: [PATCH 1/2] fix(pi-dev): port pi-watch to the pi 1.x SDK and fail on provider errors pi-watch crashed on import with any pi-coding-agent from 0.80.8 on, because AuthStorage and ModelRegistry were replaced by ModelRuntime. - Build a ModelRuntime and pass it to createAgentSession - Pin the SDK to ^1.2.0; 1.0.0 and 1.1.0 break on fresh installs upstream - Launcher reinstalls deps that are missing or older than the pin - Commit pnpm-workspace.yaml so pnpm 12's install doesn't exit 1 - Exit 1 with the provider's error when the final reply errored, aborted, or hit the token limit, instead of exiting 0 with an empty reply Resolves DEFER-16 and BUG-12. Logs DEFER-17 (alias ladders lag pi 1.x). --- BUGS.md | 8 +++++ DEFERRED.md | 9 +++++ skills/pi-dev/SKILL.md | 2 +- skills/pi-dev/scripts/pi-watch/README.md | 4 ++- skills/pi-dev/scripts/pi-watch/package.json | 4 +-- skills/pi-dev/scripts/pi-watch/pi-watch | 24 +++++++++++--- skills/pi-dev/scripts/pi-watch/pi-watch.mjs | 33 +++++++++++++++---- .../scripts/pi-watch/pnpm-workspace.yaml | 3 ++ 8 files changed, 72 insertions(+), 15 deletions(-) create mode 100644 skills/pi-dev/scripts/pi-watch/pnpm-workspace.yaml diff --git a/BUGS.md b/BUGS.md index edbf5a0d..6e7feb7b 100644 --- a/BUGS.md +++ b/BUGS.md @@ -108,3 +108,11 @@ entries' IDs; manual edits to fix typos are fine. - **Severity**: medium - **Proposed fix**: Have fold carry notes into the requirement (e.g. reviewNote) or print them on stderr so Claude must act on them; and either let the page set certainty directly or document that notes are advisory. Omit stage-1 items from the stage-2 record, or mark them as pinned. +## BUG-12: pi-watch dispatch prints nothing when the provider request fails +- **Observed**: 2026-10-15 +- **File**: skills/pi-dev/scripts/pi-watch/pi-watch.mjs:442 +- **Description**: With an expired anthropic OAuth token, pi-watch --alias sonnet --tools read --require-trailer STATUS wrote empty stdout and exited 6 (missing trailer). Without --require-trailer it exits 0 with empty output. Raw pi -p --provider anthropic --model claude-sonnet-4-6 prints 'OAuth refresh failed for anthropic: ... invalid_grant'. session.prompt() does not throw on a provider error, so pi-watch's catch never runs; the failure sits on the final assistant message (stopReason/errorMessage), which pi-watch never inspects. Callers such as adversarial-review read the empty reply as a reviewer result. This is the dispatch side of the expired-token case in BUG-9. Seen while verifying the 1.x SDK port on zpyoung/fix-pi-watch; BUG-9 shows the same empty-reply symptom on the pre-port SDK. +- **Severity**: high +- **Proposed fix**: After session.prompt(), check the last assistant message's stopReason; on error, write errorMessage to stderr and exit non-zero. +- **Resolved**: 2026-10-15. After session.prompt(), pi-watch reads the last assistant message the way pi's print mode does: stopReason error or aborted exits 1 with errorMessage on stderr, and length exits 1 as truncated. The check runs before --require-trailer, so a provider failure no longer surfaces as exit 6. BUG-9 (--check passing an expired token) stays open. + diff --git a/DEFERRED.md b/DEFERRED.md index 6f7ea4f6..a48f19d7 100644 --- a/DEFERRED.md +++ b/DEFERRED.md @@ -140,3 +140,12 @@ Reviewed every sprint planning. Use `/quirk:artifacts:defer` to append. - **Estimated effort**: M - **Priority**: P2 - **Proposed owner**: unassigned +- **Resolved**: 2026-10-15. pi-watch.mjs now builds a ModelRuntime and passes it to createAgentSession. package.json pins ^1.2.0, not ^1.0.0, because pi-coding-agent 1.0.0 and 1.1.0 fail on a fresh install: their caret range on pi-codemode resolves to 1.2.0, which dropped an export they import. The launcher reinstalls deps older than that floor, and a committed pnpm-workspace.yaml declines the two dependency build scripts so pnpm 12's install doesn't exit 1. + +## DEFER-17: Refresh pi-watch alias ladders for the pi 1.x model catalog +- **Deferred**: 2026-10-15 +- **Session context**: pi-watch 1.x SDK port on zpyoung/fix-pi-watch +- **Why deferred**: pi 1.1.0 --list-models lists anthropic/claude-sonnet-5-5, anthropic/claude-haiku-5-5 and openai/gpt-6.1-sol, which no ladder in skills/pi-dev/scripts/pi-watch/pi-watch.mjs ALIASES includes, so sonnet/haiku/codex resolve to older models. The launcher's --where staleness probe greps for gpt-5.6 and needs the same update. Left out of the 1.x SDK port because a ladder refresh is a separate model-choice decision. +- **Estimated effort**: S +- **Priority**: P2 + diff --git a/skills/pi-dev/SKILL.md b/skills/pi-dev/SKILL.md index 75924402..359eab70 100644 --- a/skills/pi-dev/SKILL.md +++ b/skills/pi-dev/SKILL.md @@ -120,7 +120,7 @@ QUIRK="$(node -e 'const fs=require("fs"),os=require("os"),p=require("path");cons install -m755 "$QUIRK/skills/pi-dev/scripts/pi-watch/pi-watch" ~/.local/bin/pi-watch # or any PATH dir ``` -Verify: `pi --version` → expect ≥ 0.65.1. `pi /login` for any subscription provider you want (Claude, ChatGPT, Copilot). Then `pi-watch --check` to confirm which aliases resolve to an authed model — the first run also auto-installs the current version's Node deps if they're missing. +Verify: `pi --version` → expect ≥ 0.65.1, and `node --version` → expect ≥ 22.19 (the pi SDK's floor). `pi /login` for any subscription provider you want (Claude, ChatGPT, Copilot). Then `pi-watch --check` to confirm which aliases resolve to an authed model — the first run also auto-installs the current version's Node deps if they're missing or outdated. **Updating:** `claude plugin update quirk` is enough — `pi-watch` auto-follows. Run `pi-watch --where` to see which version/dir it resolves to (and whether that copy has the current alias ladder). Re-run the `install` line above only if the launcher script itself changes (rare); mjs/alias updates are picked up automatically. diff --git a/skills/pi-dev/scripts/pi-watch/README.md b/skills/pi-dev/scripts/pi-watch/README.md index 784e0263..603f06d0 100644 --- a/skills/pi-dev/scripts/pi-watch/README.md +++ b/skills/pi-dev/scripts/pi-watch/README.md @@ -9,6 +9,8 @@ Bypasses pi's `DefaultResourceLoader` (extensions / skills / prompts / themes / ## Setup (one-time) +Needs Node ≥ 22.19 and pnpm. The SDK deps are pinned to pi-coding-agent `^1.2.0`; the launcher reinstalls them when they're missing or older than that. + ```bash cd pnpm install @@ -108,7 +110,7 @@ Pi has no built-in sandbox — `bash`, `edit`, and `write` operate at the caller | Code | Meaning | |---|---| | 0 | Success | -| 1 | Runtime error during prompt execution | +| 1 | Runtime error: the SDK threw, the provider returned an error (e.g. expired auth: run `pi /login`), the request was aborted, or the reply hit the output token limit | | 2 | Bad CLI args / unknown alias | | 3 | Model not in pi-ai registry (run `pnpm update` here) | | 4 | Cannot run `pi --list-models` (pi binary missing?) | diff --git a/skills/pi-dev/scripts/pi-watch/package.json b/skills/pi-dev/scripts/pi-watch/package.json index 27c41a9d..1dd7b865 100644 --- a/skills/pi-dev/scripts/pi-watch/package.json +++ b/skills/pi-dev/scripts/pi-watch/package.json @@ -5,7 +5,7 @@ "private": true, "bin": { "pi-watch": "./pi-watch.mjs" }, "dependencies": { - "@earendil-works/pi-ai": "*", - "@earendil-works/pi-coding-agent": "*" + "@earendil-works/pi-ai": "^1.2.0", + "@earendil-works/pi-coding-agent": "^1.2.0" } } diff --git a/skills/pi-dev/scripts/pi-watch/pi-watch b/skills/pi-dev/scripts/pi-watch/pi-watch index 11e7f275..b65aabb3 100755 --- a/skills/pi-dev/scripts/pi-watch/pi-watch +++ b/skills/pi-dev/scripts/pi-watch/pi-watch @@ -94,16 +94,32 @@ done # --- ensure deps for the resolved version ------------------------------------ # Published versions bundle node_modules, but self-heal if a version dir lacks -# the SDK (e.g. shipped without deps, or after a manual cache prune). -if [ ! -d "$PLUGIN_DIR/node_modules/@earendil-works/pi-coding-agent" ]; then +# the SDK (e.g. shipped without deps, or after a manual cache prune), or holds +# an SDK older than package.json's "^X.Y.Z" floor (e.g. a pre-1.x pin). +sdk_stale() { + node -e ' + const fs = require("fs"), path = require("path"); + const dir = process.argv[1]; + try { + const want = JSON.parse(fs.readFileSync(path.join(dir, "package.json"), "utf8")) + .dependencies["@earendil-works/pi-coding-agent"].replace(/^\^/, "").split(".").map(Number); + const have = JSON.parse(fs.readFileSync(path.join(dir, + "node_modules/@earendil-works/pi-coding-agent/package.json"), "utf8")).version.split(".").map(Number); + const ok = have[0] === want[0] && (have[1] > want[1] || (have[1] === want[1] && have[2] >= want[2])); + process.exit(ok ? 1 : 0); + } catch { process.exit(0); } + ' "$1" 2>/dev/null +} + +if sdk_stale "$PLUGIN_DIR"; then if command -v pnpm >/dev/null 2>&1; then - echo "pi-watch: installing dependencies in $PLUGIN_DIR (first run for this version)…" >&2 + echo "pi-watch: installing dependencies in $PLUGIN_DIR (missing or older than package.json requires)…" >&2 if ! (cd "$PLUGIN_DIR" && pnpm install --silent) >&2; then echo "pi-watch: 'pnpm install' failed in $PLUGIN_DIR." >&2 exit 1 fi else - echo "pi-watch: dependencies missing in $PLUGIN_DIR and pnpm is not on PATH." >&2 + echo "pi-watch: dependencies missing or outdated in $PLUGIN_DIR and pnpm is not on PATH." >&2 echo " Install pnpm (https://pnpm.io/installation) or run 'pnpm install' there." >&2 exit 1 fi diff --git a/skills/pi-dev/scripts/pi-watch/pi-watch.mjs b/skills/pi-dev/scripts/pi-watch/pi-watch.mjs index a2a129cb..f66e490c 100755 --- a/skills/pi-dev/scripts/pi-watch/pi-watch.mjs +++ b/skills/pi-dev/scripts/pi-watch/pi-watch.mjs @@ -20,10 +20,9 @@ import { spawnSync } from "node:child_process"; import { statSync } from "node:fs"; import { getBuiltinModel as getModel } from "@earendil-works/pi-ai/providers/all"; import { - AuthStorage, createAgentSession, createExtensionRuntime, - ModelRegistry, + ModelRuntime, SessionManager, SettingsManager, } from "@earendil-works/pi-coding-agent"; @@ -243,7 +242,8 @@ function scanTrailer(text, key) { // ---- Resolve provider/model/thinking ------------------------------------- function listAvailable() { - // pi --list-models writes the table to STDERR. Fast (~0.5s) and does not + // pi --list-models writes the table to stderr before 1.0 and to stdout + // from 1.0, so both streams are parsed. Fast (~0.5s) and does not // trigger pi's slow cwd resource scan, so safe to call from any directory. // We rely on `pi` (not the SDK registry) to resolve auth — it handles env // vars, ~/.pi/agent/auth.json, OAuth subscription tokens, and models.json @@ -392,30 +392,35 @@ const resourceLoader = { getThemes: () => ({ themes: [], diagnostics: [] }), getAgentsFiles: () => ({ agentsFiles: [] }), getSystemPrompt: () => "You are a coding assistant. Be concise and direct.", + getSystemPromptSource: () => undefined, getAppendSystemPrompt: () => [], + getAppendSystemPromptSources: () => [], extendResources: () => {}, reload: async () => {}, }; const cwd = opts.cwd ?? process.cwd(); const home = process.env.HOME ?? ""; -const authStorage = AuthStorage.create(`${home}/.pi/agent/auth.json`); -const modelRegistry = ModelRegistry.inMemory(authStorage); const settingsManager = SettingsManager.inMemory({ compaction: { enabled: false }, retry: { enabled: true, maxRetries: 2 }, + // warming refreshes the prompt cache with extra paid requests; a one-shot run never reuses it. + cacheWarming: "off", }); process.stderr.write(` ▶ resolved ${resolved.provider}/${resolved.model}:${resolved.thinking}${resolved.triedFromAlias ? ` (alias ${opts.alias})` : ""}\n`); try { + const modelRuntime = await ModelRuntime.create({ + authPath: `${home}/.pi/agent/auth.json`, + modelsPath: `${home}/.pi/agent/models.json`, + }); const { session } = await createAgentSession({ cwd, agentDir: `${home}/.pi/agent`, model, thinkingLevel: resolved.thinking, - authStorage, - modelRegistry, + modelRuntime, resourceLoader, tools: opts.tools, sessionManager: SessionManager.inMemory(cwd), @@ -436,6 +441,20 @@ try { await session.prompt(opts.prompt); + // provider failures (expired auth, aborts, output-limit cutoffs) resolve prompt() instead of throwing. + const last = session.state.messages.at(-1); + const failure = last?.role !== "assistant" ? null + : last.stopReason === "error" || last.stopReason === "aborted" ? (last.errorMessage || `request ${last.stopReason}`) + : last.stopReason === "length" ? "response truncated at the model's output token limit" + : null; + if (failure) { + await Promise.all([ + new Promise((resolve) => process.stdout.write("\n", resolve)), + new Promise((resolve) => process.stderr.write(`\n ✖ error: ${failure}\n`, resolve)), + ]); + process.exit(1); + } + let doneLine = " ✔ done\n"; if (opts.requireTrailer !== null) { const value = scanTrailer(assistantText, opts.requireTrailer); diff --git a/skills/pi-dev/scripts/pi-watch/pnpm-workspace.yaml b/skills/pi-dev/scripts/pi-watch/pnpm-workspace.yaml new file mode 100644 index 00000000..c4d7fc17 --- /dev/null +++ b/skills/pi-dev/scripts/pi-watch/pnpm-workspace.yaml @@ -0,0 +1,3 @@ +allowBuilds: + '@google/genai': false + protobufjs: false From 3f0827b99a316a2450039f712b7d32d4f8debce6 Mon Sep 17 00:00:00 2001 From: zpyoung Date: Thu, 15 Oct 2026 10:13:15 -0500 Subject: [PATCH 2/2] feat(pi-dev): refresh pi-watch alias ladders for the pi 1.x catalog - codex/codex-max lead with GPT-6.1 and GPT-6 Sol, codex-mini with GPT-6 Luna - sonnet/opus/haiku lead with Claude 5.5 - New opt-in fable alias for Claude Fable 5.1/5 - grok routes to grok-4.7/4.6 via xai, then Copilot; grok-code-fast-1 is gone - Exclude GPT-6 Astra as pro-priced; terra stays on GPT-5.6 Terra - Drop entries the pinned pi-ai 1.2.0 catalog doesn't ship - --where probes for gpt-6.1-sol; adversarial-review ladder heads match - models.md: fix PI_AVAILABLE snippet for pi 1.x stdout output Resolves DEFER-17. Logs DEFER-18 (stale per-provider dumps in models.md). --- DEFERRED.md | 8 ++ .../scripts/adversarial-review | 8 +- skills/pi-dev/SKILL.md | 25 +++--- skills/pi-dev/reference/models.md | 79 +++++++++---------- skills/pi-dev/scripts/pi-watch/README.md | 27 ++++--- skills/pi-dev/scripts/pi-watch/pi-watch | 8 +- skills/pi-dev/scripts/pi-watch/pi-watch.mjs | 62 ++++++++------- 7 files changed, 114 insertions(+), 103 deletions(-) diff --git a/DEFERRED.md b/DEFERRED.md index a48f19d7..16e03740 100644 --- a/DEFERRED.md +++ b/DEFERRED.md @@ -148,4 +148,12 @@ Reviewed every sprint planning. Use `/quirk:artifacts:defer` to append. - **Why deferred**: pi 1.1.0 --list-models lists anthropic/claude-sonnet-5-5, anthropic/claude-haiku-5-5 and openai/gpt-6.1-sol, which no ladder in skills/pi-dev/scripts/pi-watch/pi-watch.mjs ALIASES includes, so sonnet/haiku/codex resolve to older models. The launcher's --where staleness probe greps for gpt-5.6 and needs the same update. Left out of the 1.x SDK port because a ladder refresh is a separate model-choice decision. - **Estimated effort**: S - **Priority**: P2 +- **Resolved**: 2026-10-15. The ladders now lead with GPT-6.1/6 Sol, GPT-6 Luna, and Claude 5.5. A new opt-in `fable` alias covers Claude Fable, and grok routes to grok-4.7/4.6 via xai, then Copilot. GPT-6 Astra is excluded as pro-priced, and terra stays on GPT-5.6 Terra because GPT-6 has no Terra tier. Entries the pinned pi-ai 1.2.0 catalog doesn't ship were removed. The --where probe now looks for gpt-6.1-sol, and adversarial-review's ALIAS_LADDER heads match. + +## DEFER-18: Replace the per-provider model dumps in pi-dev's models.md +- **Deferred**: 2026-10-15 +- **Session context**: DEFER-17 alias ladder refresh on zpyoung/fix-pi-watch +- **Why deferred**: skills/pi-dev/reference/models.md has a hand-copied pi --list-models table for each provider (openai-codex, openai, anthropic, google, github-copilot). It's a pre-1.x snapshot that lacks GPT-6, Claude 5.x and Grok 4.x and still lists grok-code-fast-1. Either regenerate it from the pi-ai catalog or replace it with a pointer to pi --list-models . Left out of the DEFER-17 ladder refresh because it's a doc restructure, not a ladder change. +- **Estimated effort**: S +- **Priority**: P3 diff --git a/skills/adversarial-review/scripts/adversarial-review b/skills/adversarial-review/scripts/adversarial-review index f2905400..8e726393 100755 --- a/skills/adversarial-review/scripts/adversarial-review +++ b/skills/adversarial-review/scripts/adversarial-review @@ -851,11 +851,11 @@ def run_prepass( # within each family; the ladder is walked in this order once the author's family # is filtered out. ALIAS_LADDER = ( - ("codex", "openai", "openai-codex/gpt-5.6-sol", "high"), - ("gemini", "google", "google/gemini-3.2-pro-preview", "high"), + ("codex", "openai", "openai-codex/gpt-6.1-sol", "high"), + ("gemini", "google", "google/gemini-3.1-pro-preview", "high"), ("terra", "openai", "openai-codex/gpt-5.6-terra", "high"), - ("opus", "anthropic", "anthropic/claude-opus-4-7", "high"), - ("sonnet", "anthropic", "anthropic/claude-sonnet-4-7", "high"), + ("opus", "anthropic", "anthropic/claude-opus-5-5", "high"), + ("sonnet", "anthropic", "anthropic/claude-sonnet-5-5", "high"), ("flash", "google", "google/gemini-flash-latest", "medium"), ) diff --git a/skills/pi-dev/SKILL.md b/skills/pi-dev/SKILL.md index 359eab70..b2941e18 100644 --- a/skills/pi-dev/SKILL.md +++ b/skills/pi-dev/SKILL.md @@ -42,21 +42,22 @@ The ✓/✗ report prints to **stderr** (like pi-watch's other progress output) | Alias | Default thinking | Routes to | |---|---|---| -| `codex` (default coding) | `medium` | gpt-5.6-sol → 5.5 → 5.4 → 5.3-codex (across `openai-codex`/`openai`/`github-copilot`) | -| `codex-max` | `max` | gpt-5.6-sol → 5.5-codex-max → 5.4-codex-max → 5.1-codex-max | -| `codex-mini` | `medium` | gpt-5.6-luna → 5.4-mini → 5.1-codex-mini | -| `codex-spark` | `high` | gpt-5.4-codex-spark → 5.3-codex-spark | +| `codex` (default coding) | `medium` | gpt-6.1-sol → 6-sol → 5.6-sol → 5.5 (across `openai-codex`/`openai`/`github-copilot`) | +| `codex-max` | `max` | gpt-6.1-sol → 6-sol → 5.6-sol, at `max` effort | +| `codex-mini` | `medium` | gpt-6-luna → 5.6-luna | +| `codex-spark` | `high` | gpt-5.3-codex-spark | | `terra` (balanced) | `high` | gpt-5.6-terra → 5.4 | -| `sonnet` | `high` | claude-sonnet-4-7 → 4-6 (anthropic + copilot) | -| `opus` | `high` | claude-opus-4-7 → 4-6 | -| `haiku` | `medium` | claude-haiku-4-6 → 4-5 | -| `gemini` | `high` | gemini-3.2-pro-preview → 3.1 → 3 | -| `flash` | `medium` | gemini-flash-latest → 3-flash-preview | -| `grok` | `medium` | github-copilot/grok-code-fast-1 | +| `sonnet` | `high` | claude-sonnet-5-5 → 5 → 4-6 (anthropic + copilot) | +| `opus` | `high` | claude-opus-5-5 → 5 → 4-8 → 4-7 | +| `haiku` | `medium` | claude-haiku-5-5 → 4-5 | +| `fable` (opt-in) | `high` | claude-fable-5-1 → 5 | +| `gemini` | `high` | gemini-3.1-pro-preview | +| `flash` | `medium` | gemini-flash-latest → 3.8-flash → 3-flash-preview | +| `grok` | `medium` | grok-4.7 → 4.6 (xai, then copilot) | -GPT-5.6 replaced the suffix ladder with three capability tiers: **Sol** (flagship, $5/$30, the only tier that unlocks `max` reasoning effort), **Terra** (balanced, $2.50/$15), **Luna** (fast/cheapest, $1/$6). Sol takes over `codex`/`codex-max`, Luna takes over `codex-mini`, and Terra gets its own `terra` alias. +GPT-6 ships three tiers: **Sol** (flagship, $2/$10) backs `codex` and `codex-max`, **Luna** (fastest and cheapest, $0.10/$0.50) backs `codex-mini`, and **Astra** ($10/$50) is excluded like a pro tier. GPT-6 has no Terra tier, so `terra` stays on GPT-5.6 Terra ($2/$12), which now costs more than GPT-6 Sol. Claude **Fable** ($10/$50, 2.5× Opus 5.5) gets the opt-in `fable` alias and never appears in the `opus` ladder. -Aliases auto-upgrade as new models ship — newest entries at the top of each ladder are speculative and skipped if not yet in `pi --list-models`. **OpenAI pro / deep-research tiers are deliberately excluded** from alias ladders: `gpt-5-pro`, `gpt-5.x-pro`, `o1-pro`, `o3-pro`, `o3-deep-research`, `o4-mini-deep-research` (~10–30× cost, multi-minute latency). GPT-5.6's **Sol Pro** and **Ultra mode** are the same lever — they're request-time params (`reasoning.mode`), not separate model IDs, so there's no alias for them. Dispatch pro-tier only on explicit user request via `--provider`/`--model`. *(Note: `gemini-*-pro-preview` is Google's standard tier, not a pro tier — it routes via the `gemini` alias.)* +Aliases auto-upgrade as new models ship — newest entries at the top of each ladder are speculative and skipped if not yet in `pi --list-models`. **OpenAI pro / deep-research tiers are deliberately excluded** from alias ladders: `gpt-5-pro`, `gpt-5.x-pro`, `o1-pro`, `o3-pro`, `o3-deep-research`, `o4-mini-deep-research` (~10–30× cost, multi-minute latency), and `gpt-6-astra` (5× GPT-6 Sol). GPT-5.6's **Sol Pro** and **Ultra mode** are the same lever — they're request-time params (`reasoning.mode`), not separate model IDs, so there's no alias for them. Dispatch pro-tier only on explicit user request via `--provider`/`--model`. *(Note: `gemini-*-pro-preview` is Google's standard tier, not a pro tier — it routes via the `gemini` alias.)* To see the full ladders: `pi-watch --list-aliases`. diff --git a/skills/pi-dev/reference/models.md b/skills/pi-dev/reference/models.md index fe81bc5c..a4ce64d7 100644 --- a/skills/pi-dev/reference/models.md +++ b/skills/pi-dev/reference/models.md @@ -4,7 +4,7 @@ When the user says "use pi codex" or "with a pi gemini agent" they are picking a **Source of truth:** `pi --list-models`. This catalog reflects the providers/models the local pi install can actually dispatch to. The pi.dev catalog also lists `openrouter`, `mistral`, `groq`, `cerebras`, `fireworks`, `huggingface`, `cloudflare-*`, `vercel-ai-gateway`, `moonshotai`, `minimax`, `deepseek`, `xai`, `amazon-bedrock`, `azure-openai-responses`, but those will only resolve here if the user has authenticated to them. Always re-run `pi --list-models` to confirm before scripting against a non-default provider. -**Substring filter:** `pi --list-models ` scopes the output to entries whose model name contains ``. Use this instead of dumping the full table when you only need to confirm one family — e.g., `pi --list-models 5.5`, `pi --list-models opus-4-7`, `pi --list-models codex-max`. Output still goes to stderr. +**Substring filter:** `pi --list-models ` scopes the output to entries whose model name contains ``. Use this instead of dumping the full table when you only need to confirm one family — e.g., `pi --list-models 5.5`, `pi --list-models opus-5-5`, `pi --list-models luna`. pi writes the table to stderr before 1.0 and to stdout from 1.0, so capture both streams. ## Pro-tier variants — avoid by default @@ -15,6 +15,7 @@ Some catalog entries are "pro" / "deep-research" tiers that are **dramatically m | `gpt-5-pro`, `gpt-5.2-pro`, `gpt-5.4-pro`, `gpt-5.5-pro` | `openai` | ~10–30× cost vs base, multi-minute latency | | `o1-pro`, `o3-pro` | `openai` | Pro reasoning tier — same cost/latency profile | | `o3-deep-research`, `o4-mini-deep-research` | `openai` | Deep-research toolchains — extended duration | +| `gpt-6-astra` | `openai`, `openai-codex`, `github-copilot` | $10/$50, 5× GPT-6 Sol | GPT-5.6's high-cost lever is **not** a separate model: **Sol Pro** and **Ultra mode** are request-time params on `gpt-5.6-sol` (`reasoning.mode: "pro"`, parallel-sub-agent Ultra), gated to Pro/Enterprise plans. There is no `gpt-5.6-pro` catalog ID to alias, and these modes stay out of default routing for the same cost/latency reasons. @@ -39,29 +40,29 @@ Mixing them up will produce "model not found" errors. ## Default -If no provider/model is specified by the user, dispatch the codex alias and let it resolve through the fallback ladder. Currently lands on `openai-codex/gpt-5.6-sol` locally (the flagship GPT-5.6 tier), then `gpt-5.5` / `gpt-5.4` / `gpt-5.3-codex` as fallbacks — auto-upgrading as newer models ship. +If no provider/model is specified by the user, dispatch the codex alias and let it resolve through the fallback ladder. It lands on `gpt-6.1-sol` (the flagship GPT-6 tier) via whichever OpenAI provider is authed, then falls back to `gpt-6-sol` / `gpt-5.6-sol` / `gpt-5.5` — auto-upgrading as newer models ship. ```bash # Resolve via preference list (auto-upgrades as newer models ship): read PI_PROVIDER PI_MODEL PI_THINKING < <(resolve_pi_model medium \ + openai-codex/gpt-6.1-sol openai/gpt-6.1-sol github-copilot/gpt-6.1-sol \ + openai-codex/gpt-6-sol openai/gpt-6-sol github-copilot/gpt-6-sol \ openai-codex/gpt-5.6-sol openai/gpt-5.6-sol github-copilot/gpt-5.6-sol \ - openai-codex/gpt-5.5 openai/gpt-5.5 \ - openai-codex/gpt-5.4 openai/gpt-5.4 github-copilot/gpt-5.4 \ - openai-codex/gpt-5.3-codex openai/gpt-5.3-codex github-copilot/gpt-5.3-codex) + openai-codex/gpt-5.5 openai/gpt-5.5) pi --provider "$PI_PROVIDER" --model "$PI_MODEL" --thinking "$PI_THINKING" "..." ``` -`:medium` is the codex alias default; `:max` is the deepest reasoning level (native on GPT-5.6 Sol) — use the `codex-max` alias or pass `--thinking max` for a maximum-effort pass. Override the alias resolution only when the user explicitly names a different model. +`:medium` is the codex alias default; `:max` is the deepest reasoning level (native on Sol) — use the `codex-max` alias or pass `--thinking max` for a maximum-effort pass. Override the alias resolution only when the user explicitly names a different model. ## Newest-first principle -Generic aliases (`codex`, `sonnet`, `opus`, `haiku`, `gemini pro`) target the newest model that *might* exist on pi, then ladder down to versions that currently ship. This means each alias has speculative top entries — `gpt-5.6-sol`, `claude-opus-4-7`, `claude-sonnet-4-7`, `gemini-3.2-pro-preview` — that may not yet be in `pi --list-models` on every install. **That is intentional.** The fallback algorithm: +Generic aliases (`codex`, `sonnet`, `opus`, `haiku`, `gemini pro`) target the newest model that *might* exist on pi, then ladder down to versions that currently ship. This means each alias has top entries — `gpt-6.1-sol`, `claude-opus-5-5`, `claude-sonnet-5-5` — that an older pi binary may not list yet. **That is intentional.** The fallback algorithm: 1. Walks the preference list top-to-bottom. 2. Skips combos missing from `pi --list-models` (silently — they're not errors). 3. Dispatches the first combo that's both authed and available. -Net effect: the moment pi ships a newer model, the alias auto-upgrades with no skill edits. When bumping the ladder for a freshly-released model, only ever *prepend* new entries — never remove old ones, since they remain valid fallbacks. +Net effect: the moment pi ships a newer model, the alias auto-upgrades with no skill edits. When bumping the ladder for a freshly-released model, prepend the new entries. Remove an entry only when the pinned pi-ai catalog stops shipping it: pi-watch can't dispatch it, and if an older pi binary lists it, resolution stops there with an SDK-skew error instead of falling through. **Explicit version pins skip the ladder.** A user saying "gpt-5.4" or "claude-sonnet-4-6" wants that exact version — preference list collapses to just the providers offering that ID. @@ -71,21 +72,22 @@ When the user's request includes any of these phrases (case-insensitive), resolv | User phrase | Default thinking | Preference list (first authed wins; → = fall through) | |---|---|---| -| (no model specified), `use pi`, `pi agent`, `pi subagent`, `pi worker` | `medium` | `openai-codex/gpt-5.6-sol` → `openai/gpt-5.6-sol` → `github-copilot/gpt-5.6-sol` → `openai-codex/gpt-5.5` → `openai/gpt-5.5` → `openai-codex/gpt-5.4` → `openai/gpt-5.4` → `github-copilot/gpt-5.4` → `openai-codex/gpt-5.3-codex` → `openai/gpt-5.3-codex` → `github-copilot/gpt-5.3-codex` | +| (no model specified), `use pi`, `pi agent`, `pi subagent`, `pi worker` | `medium` | `openai-codex/gpt-6.1-sol` → `openai/gpt-6.1-sol` → `github-copilot/gpt-6.1-sol` → `openai-codex/gpt-6-sol` → `openai/gpt-6-sol` → `github-copilot/gpt-6-sol` → `openai-codex/gpt-5.6-sol` → `openai/gpt-5.6-sol` → `github-copilot/gpt-5.6-sol` → `openai-codex/gpt-5.5` → `openai/gpt-5.5` | | `pi codex`, `codex`, `with codex`, `codex agent` | `medium` | (same as above) | -| `pi codex max`, `codex max` | `max` | `openai-codex/gpt-5.6-sol` → `openai/gpt-5.6-sol` → `github-copilot/gpt-5.6-sol` → `openai-codex/gpt-5.5-codex-max` → `openai/gpt-5.5-codex-max` → `openai-codex/gpt-5.4-codex-max` → `openai/gpt-5.4-codex-max` → `openai-codex/gpt-5.1-codex-max` → `openai/gpt-5.1-codex-max` → `github-copilot/gpt-5.1-codex-max` | -| `pi codex mini`, `codex mini`, `pi mini` | `medium` | `openai-codex/gpt-5.6-luna` → `openai/gpt-5.6-luna` → `github-copilot/gpt-5.6-luna` → `openai-codex/gpt-5.4-mini` → `openai/gpt-5.4-mini` → `github-copilot/gpt-5.4-mini` → `openai-codex/gpt-5.1-codex-mini` → `openai/gpt-5.1-codex-mini` → `github-copilot/gpt-5.1-codex-mini` | -| `pi codex spark`, `codex spark` | `high` | `openai-codex/gpt-5.4-codex-spark` → `openai-codex/gpt-5.3-codex-spark` → `openai/gpt-5.3-codex-spark` | -| `pi terra`, `terra`, `codex terra` | `high` | `openai-codex/gpt-5.6-terra` → `openai/gpt-5.6-terra` → `github-copilot/gpt-5.6-terra` → `openai-codex/gpt-5.4` → `openai/gpt-5.4` → `github-copilot/gpt-5.4` | -| `pi flagship`, `pi gpt` | `xhigh` | `openai-codex/gpt-5.6-sol` → `openai/gpt-5.6-sol` → `github-copilot/gpt-5.6-sol` → `openai-codex/gpt-5.5` → `openai/gpt-5.5` → `openai-codex/gpt-5.4` → `openai/gpt-5.4` → `github-copilot/gpt-5.4` | +| `pi codex max`, `codex max` | `max` | `openai-codex/gpt-6.1-sol` → `openai/gpt-6.1-sol` → `github-copilot/gpt-6.1-sol` → `openai-codex/gpt-6-sol` → `openai/gpt-6-sol` → `github-copilot/gpt-6-sol` → `openai-codex/gpt-5.6-sol` → `openai/gpt-5.6-sol` → `github-copilot/gpt-5.6-sol` | +| `pi codex mini`, `codex mini`, `pi mini` | `medium` | `openai-codex/gpt-6-luna` → `openai/gpt-6-luna` → `github-copilot/gpt-6-luna` → `openai-codex/gpt-5.6-luna` → `openai/gpt-5.6-luna` → `github-copilot/gpt-5.6-luna` | +| `pi codex spark`, `codex spark` | `high` | `openai-codex/gpt-5.3-codex-spark` → `openai/gpt-5.3-codex-spark` | +| `pi terra`, `terra`, `codex terra` | `high` | `openai-codex/gpt-5.6-terra` → `openai/gpt-5.6-terra` → `github-copilot/gpt-5.6-terra` → `openai/gpt-5.4` → `github-copilot/gpt-5.4` | +| `pi flagship`, `pi gpt` | `xhigh` | `openai-codex/gpt-6.1-sol` → `openai/gpt-6.1-sol` → `github-copilot/gpt-6.1-sol` → `openai-codex/gpt-6-sol` → `openai/gpt-6-sol` → `github-copilot/gpt-6-sol` → `openai-codex/gpt-5.6-sol` → `openai/gpt-5.6-sol` → `github-copilot/gpt-5.6-sol` → `openai-codex/gpt-5.5` → `openai/gpt-5.5` | | `gpt-5.4` (explicit pin) | `xhigh` | `openai-codex/gpt-5.4` → `openai/gpt-5.4` → `github-copilot/gpt-5.4` | | `gpt-5.1` (explicit pin) | `xhigh` | `openai-codex/gpt-5.1` → `openai/gpt-5.1` → `github-copilot/gpt-5.1` | -| `pi sonnet`, `sonnet`, `claude sonnet`, `pi claude` | `high` | `anthropic/claude-sonnet-4-7` → `github-copilot/claude-sonnet-4.7` → `anthropic/claude-sonnet-4-6` → `github-copilot/claude-sonnet-4.6` | -| `pi opus`, `opus`, `claude opus` | `high` | `anthropic/claude-opus-4-7` → `github-copilot/claude-opus-4.7` → `anthropic/claude-opus-4-6` → `github-copilot/claude-opus-4.6` | -| `pi haiku`, `haiku`, `claude haiku` | `medium` | `anthropic/claude-haiku-4-6` → `github-copilot/claude-haiku-4.6` → `anthropic/claude-haiku-4-5` → `github-copilot/claude-haiku-4.5` | -| `pi gemini`, `gemini`, `gemini pro`, `pi gemini agent` | `high` | `google/gemini-3.2-pro-preview` → `google/gemini-3.1-pro-preview` → `github-copilot/gemini-3.1-pro-preview` → `google/gemini-3-pro-preview` → `github-copilot/gemini-3-pro-preview` | -| `pi gemini flash`, `gemini flash`, `pi flash` | `medium` | `google/gemini-flash-latest` → `google/gemini-3-flash-preview` → `github-copilot/gemini-3-flash-preview` | -| `pi grok`, `grok`, `xai grok` | `medium` | `github-copilot/grok-code-fast-1` | +| `pi sonnet`, `sonnet`, `claude sonnet`, `pi claude` | `high` | `anthropic/claude-sonnet-5-5` → `github-copilot/claude-sonnet-5.5` → `anthropic/claude-sonnet-5` → `github-copilot/claude-sonnet-5` → `anthropic/claude-sonnet-4-6` → `github-copilot/claude-sonnet-4.6` | +| `pi opus`, `opus`, `claude opus` | `high` | `anthropic/claude-opus-5-5` → `github-copilot/claude-opus-5.5` → `anthropic/claude-opus-5` → `github-copilot/claude-opus-5` → `anthropic/claude-opus-4-8` → `github-copilot/claude-opus-4.8` → `anthropic/claude-opus-4-7` → `github-copilot/claude-opus-4.7` | +| `pi fable`, `fable`, `claude fable` | `high` | `anthropic/claude-fable-5-1` → `github-copilot/claude-fable-5.1` → `anthropic/claude-fable-5` → `github-copilot/claude-fable-5` | +| `pi haiku`, `haiku`, `claude haiku` | `medium` | `anthropic/claude-haiku-5-5` → `github-copilot/claude-haiku-5.5` → `anthropic/claude-haiku-4-5` → `github-copilot/claude-haiku-4.5` | +| `pi gemini`, `gemini`, `gemini pro`, `pi gemini agent` | `high` | `google/gemini-3.1-pro-preview` | +| `pi gemini flash`, `gemini flash`, `pi flash` | `medium` | `google/gemini-flash-latest` → `google/gemini-3.8-flash` → `github-copilot/gemini-3.8-flash` → `google/gemini-3-flash-preview` | +| `pi grok`, `grok`, `xai grok` | `medium` | `xai/grok-4.7` → `github-copilot/grok-4.7` → `xai/grok-4.6` → `github-copilot/grok-4.6` | If the user names a model NOT in this table, run `pi --list-models ` to scope candidates, then either use the literal model ID (if exactly one match) or ask one `AskUserQuestion` multiple-choice clarification (if multiple matches or any pro-tier candidates appear). Never silently pick a `*-pro` variant. See "Disambiguation rule" above. @@ -95,23 +97,18 @@ Models exposed by more than one provider on this install. Use this when construc | Logical model | Providers (in fallback order) | |---|---| -| GPT-5.6 Sol (flagship) | `openai-codex` → `openai` → `github-copilot` | -| GPT-5.6 Terra (balanced) | `openai-codex` → `openai` → `github-copilot` | -| GPT-5.6 Luna (fast/cheap) | `openai-codex` → `openai` → `github-copilot` | -| Codex flagship (`gpt-5.3-codex`) | `openai-codex` → `openai` → `github-copilot` | -| Codex max (`gpt-5.1-codex-max`) | `openai-codex` → `openai` → `github-copilot` | -| Codex mini (`gpt-5.1-codex-mini`) | `openai-codex` → `openai` → `github-copilot` | +| GPT-6 / 6.1 Sol (flagship) | `openai-codex` → `openai` → `github-copilot` | +| GPT-6 Luna (fast/cheap) | `openai-codex` → `openai` → `github-copilot` | +| GPT-5.6 Sol / Terra / Luna | `openai-codex` → `openai` → `github-copilot` | | Codex spark (`gpt-5.3-codex-spark`) | `openai-codex` → `openai` | | GPT-5.4 | `openai-codex` → `openai` → `github-copilot` | | GPT-5.1 / GPT-5.2 | `openai-codex` → `openai` → `github-copilot` | | GPT-5 / GPT-5-mini | `openai` → `github-copilot` (not in `openai-codex`) | -| Claude sonnet 4.6 | `anthropic` (`-4-6`) → `github-copilot` (`-4.6`) | -| Claude opus 4.6 | `anthropic` (`-4-6`) → `github-copilot` (`-4.6`) | -| Claude haiku 4.5 | `anthropic` (`-4-5`) → `github-copilot` (`-4.5`) | -| Gemini 3.1 Pro | `google` → `github-copilot` | -| Gemini 3 Pro preview | `google` → `github-copilot` | -| Gemini 3 Flash preview | `google` → `github-copilot` | -| Grok-code-fast-1 | `github-copilot` only (locally) | +| Claude sonnet / opus / haiku 5.5, fable 5.1 | `anthropic` (`-5-5`, `-5-1`) → `github-copilot` (`-5.5`, `-5.1`) | +| Claude sonnet 4.6, opus 4.8, haiku 4.5 | `anthropic` (`-4-6`) → `github-copilot` (`-4.6`) | +| Gemini 3.1 Pro | `google` only | +| Gemini 3.8 Flash | `google` → `github-copilot` | +| Grok 4.6 / 4.7 | `xai` → `github-copilot` | Order rationale: direct API providers come first (lowest latency, highest rate limits, billed via their own credit), then `github-copilot` as a subscription fallback. Override the order if the user prefers Copilot for cost reasons. @@ -121,11 +118,11 @@ Steps: ``` 1. User says "use pi " → look up the alias's preference list above. -2. Run `pi --list-models 2>&1 >/dev/null` once per session (table is on STDERR); +2. Run `pi --list-models 2>&1` once per session (stderr before pi 1.0, stdout from 1.0); parse with `awk 'NR>1 && NF>=2 {print $1"/"$2}'`; cache as PI_AVAILABLE. 3. Walk preference list; first combo present in PI_AVAILABLE wins. 4. Dispatch with that (provider, model, default-thinking-level). -5. Log the resolved triple ("codex routed via github-copilot/gpt-5.3-codex — +5. Log the resolved triple ("codex routed via github-copilot/gpt-6.1-sol — direct OpenAI key not set"). Silent fallback hides bugs. 6. On runtime auth/billing failure: retry once with the next entry in the list (excluding the failed one). If that also fails or no fallback remains, ABORT. @@ -136,7 +133,7 @@ Steps: Bash implementation: ```bash -PI_AVAILABLE="$(pi --list-models 2>&1 >/dev/null | awk 'NR>1 && NF>=2 {print $1"/"$2}')" +PI_AVAILABLE="$(pi --list-models 2>&1 | awk 'NR>1 && NF>=2 {print $1"/"$2}')" resolve_pi_model() { local thinking="$1"; shift @@ -151,10 +148,10 @@ resolve_pi_model() { # Usage — codex alias: read PI_PROVIDER PI_MODEL PI_THINKING < <(resolve_pi_model medium \ + openai-codex/gpt-6.1-sol openai/gpt-6.1-sol github-copilot/gpt-6.1-sol \ + openai-codex/gpt-6-sol openai/gpt-6-sol github-copilot/gpt-6-sol \ openai-codex/gpt-5.6-sol openai/gpt-5.6-sol github-copilot/gpt-5.6-sol \ openai-codex/gpt-5.5 openai/gpt-5.5 \ - openai-codex/gpt-5.4 openai/gpt-5.4 github-copilot/gpt-5.4 \ - openai-codex/gpt-5.3-codex openai/gpt-5.3-codex github-copilot/gpt-5.3-codex \ ) || { echo "no codex provider authed"; exit 1; } ``` @@ -201,9 +198,9 @@ gpt-5.3-codex-spark gpt-5.4 gpt-5.4-mini gpt-5.5 -gpt-5.6-luna ← codex-mini alias (fast/cheap) -gpt-5.6-sol ← project default (flagship) -gpt-5.6-terra ← terra alias (balanced) +gpt-5.6-luna +gpt-5.6-sol +gpt-5.6-terra ``` ### `--provider openai` diff --git a/skills/pi-dev/scripts/pi-watch/README.md b/skills/pi-dev/scripts/pi-watch/README.md index 603f06d0..2d3b6db1 100644 --- a/skills/pi-dev/scripts/pi-watch/README.md +++ b/skills/pi-dev/scripts/pi-watch/README.md @@ -43,26 +43,27 @@ pi-watch --check codex && pi-watch --alias codex "..." # gate a dispatch on it pi-watch --list-aliases # Explicit override (skip alias resolution) -pi-watch --provider openai-codex --model gpt-5.6-sol --thinking max "..." +pi-watch --provider openai-codex --model gpt-6.1-sol --thinking max "..." ``` ## Aliases | Alias | Default thinking | Routes through (newest first) | |---|---|---| -| `codex` | `medium` | gpt-5.6-sol → 5.5 → 5.4 → 5.3-codex (openai-codex / openai / copilot) | -| `codex-max` | `max` | gpt-5.6-sol → 5.5-codex-max → 5.4-codex-max → 5.1-codex-max | -| `codex-mini` | `medium` | gpt-5.6-luna → 5.4-mini → 5.1-codex-mini | -| `codex-spark` | `high` | gpt-5.4-codex-spark → 5.3-codex-spark | +| `codex` | `medium` | gpt-6.1-sol → 6-sol → 5.6-sol → 5.5 (openai-codex / openai / copilot) | +| `codex-max` | `max` | gpt-6.1-sol → 6-sol → 5.6-sol | +| `codex-mini` | `medium` | gpt-6-luna → 5.6-luna | +| `codex-spark` | `high` | gpt-5.3-codex-spark | | `terra` | `high` | gpt-5.6-terra → 5.4 | -| `sonnet` | `high` | claude-sonnet-4-7 → 4-6 | -| `opus` | `high` | claude-opus-4-7 → 4-6 | -| `haiku` | `medium` | claude-haiku-4-6 → 4-5 | -| `gemini` | `high` | gemini-3.2-pro-preview → 3.1 → 3 | -| `flash` | `medium` | gemini-flash-latest → 3-flash-preview | -| `grok` | `medium` | github-copilot/grok-code-fast-1 | - -Aliases auto-upgrade as new models ship. **OpenAI pro/deep-research tiers are excluded** (`gpt-5*-pro`, `o1-pro`, `o3-pro`, `o3-deep-research`, `o4-mini-deep-research`) — ~10–30× cost, multi-minute latency. Dispatch only on explicit user request via `--provider`/`--model`. (Google's `gemini-*-pro-preview` is the standard tier, not a pro tier — it's the routing target of the `gemini` alias.) +| `sonnet` | `high` | claude-sonnet-5-5 → 5 → 4-6 | +| `opus` | `high` | claude-opus-5-5 → 5 → 4-8 → 4-7 | +| `haiku` | `medium` | claude-haiku-5-5 → 4-5 | +| `fable` | `high` | claude-fable-5-1 → 5 (opt-in, 2.5× Opus cost) | +| `gemini` | `high` | gemini-3.1-pro-preview | +| `flash` | `medium` | gemini-flash-latest → 3.8-flash → 3-flash-preview | +| `grok` | `medium` | grok-4.7 → 4.6 (xai, then copilot) | + +Aliases auto-upgrade as new models ship. **OpenAI pro/deep-research tiers are excluded** (`gpt-5*-pro`, `o1-pro`, `o3-pro`, `o3-deep-research`, `o4-mini-deep-research`, and `gpt-6-astra`), because they cost several times more, multi-minute latency. Dispatch only on explicit user request via `--provider`/`--model`. (Google's `gemini-*-pro-preview` is the standard tier, not a pro tier — it's the routing target of the `gemini` alias.) ## Tools diff --git a/skills/pi-dev/scripts/pi-watch/pi-watch b/skills/pi-dev/scripts/pi-watch/pi-watch index b65aabb3..450466eb 100755 --- a/skills/pi-dev/scripts/pi-watch/pi-watch +++ b/skills/pi-dev/scripts/pi-watch/pi-watch @@ -17,7 +17,7 @@ # 4. own dir — last-ditch, if it carries the code # # `pi-watch --where` prints the resolved source + dir (and whether the resolved -# copy has the GPT-5.6 alias ladder) and exits — use it to diagnose "which +# copy has the GPT-6 alias ladder) and exits — use it to diagnose "which # version am I actually running". set -euo pipefail @@ -80,10 +80,10 @@ fi # --- diagnostics: pi-watch --where ------------------------------------------- for a in "$@"; do if [ "$a" = "--where" ]; then - if grep -q "gpt-5.6" "$PLUGIN_DIR/pi-watch.mjs" 2>/dev/null; then - ladder="has gpt-5.6 alias ladder" + if grep -q "gpt-6.1-sol" "$PLUGIN_DIR/pi-watch.mjs" 2>/dev/null; then + ladder="has gpt-6 alias ladder" else - ladder="pre-5.6 alias ladder (stale)" + ladder="pre-gpt-6 alias ladder (stale)" fi echo "source : $SOURCE_KIND" echo "dir : $PLUGIN_DIR" diff --git a/skills/pi-dev/scripts/pi-watch/pi-watch.mjs b/skills/pi-dev/scripts/pi-watch/pi-watch.mjs index f66e490c..3ad30340 100755 --- a/skills/pi-dev/scripts/pi-watch/pi-watch.mjs +++ b/skills/pi-dev/scripts/pi-watch/pi-watch.mjs @@ -33,93 +33,97 @@ import { // auto-upgrade as new models ship. Pro-tier variants are intentionally absent // (~10–30× cost, multi-minute latency) — only dispatch on explicit request. const ALIASES = { - // Default coding alias — gpt flagship via codex routing. GPT-5.6 Sol is the - // flagship tier (successor to gpt-5.5, same $5/$30 price point). + // Default coding alias — GPT-6 Sol, the flagship tier. Falls back to the + // GPT-5.6 generation for pi binaries that predate GPT-6. codex: { thinking: "medium", prefs: [ + "openai-codex/gpt-6.1-sol", "openai/gpt-6.1-sol", "github-copilot/gpt-6.1-sol", + "openai-codex/gpt-6-sol", "openai/gpt-6-sol", "github-copilot/gpt-6-sol", "openai-codex/gpt-5.6-sol", "openai/gpt-5.6-sol", "github-copilot/gpt-5.6-sol", "openai-codex/gpt-5.5", "openai/gpt-5.5", - "openai-codex/gpt-5.4", "openai/gpt-5.4", "github-copilot/gpt-5.4", - "openai-codex/gpt-5.3-codex", "openai/gpt-5.3-codex", "github-copilot/gpt-5.3-codex", ], }, - // Deepest reasoning. GPT-5.6 folded the standalone -codex-max model into Sol, - // the only tier that natively supports the `max` reasoning effort; older - // fallback models clamp max→xhigh. + // Deepest reasoning: Sol at `max` effort. GPT-6 Astra ($10/$50, 5× Sol) is + // deliberately absent — it is priced like a pro tier. "codex-max": { thinking: "max", prefs: [ + "openai-codex/gpt-6.1-sol", "openai/gpt-6.1-sol", "github-copilot/gpt-6.1-sol", + "openai-codex/gpt-6-sol", "openai/gpt-6-sol", "github-copilot/gpt-6-sol", "openai-codex/gpt-5.6-sol", "openai/gpt-5.6-sol", "github-copilot/gpt-5.6-sol", - "openai-codex/gpt-5.5-codex-max", "openai/gpt-5.5-codex-max", - "openai-codex/gpt-5.4-codex-max", "openai/gpt-5.4-codex-max", - "openai-codex/gpt-5.1-codex-max", "openai/gpt-5.1-codex-max", "github-copilot/gpt-5.1-codex-max", ], }, - // Fast / cheapest coding tier. GPT-5.6 Luna is the mini/spark successor. + // Fast / cheapest coding tier — Luna. "codex-mini": { thinking: "medium", prefs: [ + "openai-codex/gpt-6-luna", "openai/gpt-6-luna", "github-copilot/gpt-6-luna", "openai-codex/gpt-5.6-luna", "openai/gpt-5.6-luna", "github-copilot/gpt-5.6-luna", - "openai-codex/gpt-5.4-mini", "openai/gpt-5.4-mini", "github-copilot/gpt-5.4-mini", - "openai-codex/gpt-5.1-codex-mini", "openai/gpt-5.1-codex-mini", "github-copilot/gpt-5.1-codex-mini", ], }, "codex-spark": { thinking: "high", - prefs: [ - "openai-codex/gpt-5.4-codex-spark", - "openai-codex/gpt-5.3-codex-spark", "openai/gpt-5.3-codex-spark", - ], + prefs: ["openai-codex/gpt-5.3-codex-spark", "openai/gpt-5.3-codex-spark"], }, - // Balanced everyday coding tier — GPT-5.6 Terra ($2.50/$15, ~gpt-5.5-class at - // half the cost). Falls back to gpt-5.4, the same-priced balanced predecessor. + // GPT-6 has no Terra tier, so this stays on GPT-5.6 Terra. terra: { thinking: "high", prefs: [ "openai-codex/gpt-5.6-terra", "openai/gpt-5.6-terra", "github-copilot/gpt-5.6-terra", - "openai-codex/gpt-5.4", "openai/gpt-5.4", "github-copilot/gpt-5.4", + "openai/gpt-5.4", "github-copilot/gpt-5.4", ], }, sonnet: { thinking: "high", prefs: [ - "anthropic/claude-sonnet-4-7", "github-copilot/claude-sonnet-4.7", + "anthropic/claude-sonnet-5-5", "github-copilot/claude-sonnet-5.5", + "anthropic/claude-sonnet-5", "github-copilot/claude-sonnet-5", "anthropic/claude-sonnet-4-6", "github-copilot/claude-sonnet-4.6", ], }, opus: { thinking: "high", prefs: [ + "anthropic/claude-opus-5-5", "github-copilot/claude-opus-5.5", + "anthropic/claude-opus-5", "github-copilot/claude-opus-5", + "anthropic/claude-opus-4-8", "github-copilot/claude-opus-4.8", "anthropic/claude-opus-4-7", "github-copilot/claude-opus-4.7", - "anthropic/claude-opus-4-6", "github-copilot/claude-opus-4.6", ], }, haiku: { thinking: "medium", prefs: [ - "anthropic/claude-haiku-4-6", "github-copilot/claude-haiku-4.6", + "anthropic/claude-haiku-5-5", "github-copilot/claude-haiku-5.5", "anthropic/claude-haiku-4-5", "github-copilot/claude-haiku-4.5", ], }, - gemini: { + // Opt-in only: Fable costs 2.5× Opus 5.5, so it never sits in the opus ladder. + fable: { thinking: "high", prefs: [ - "google/gemini-3.2-pro-preview", - "google/gemini-3.1-pro-preview", "github-copilot/gemini-3.1-pro-preview", - "google/gemini-3-pro-preview", "github-copilot/gemini-3-pro-preview", + "anthropic/claude-fable-5-1", "github-copilot/claude-fable-5.1", + "anthropic/claude-fable-5", "github-copilot/claude-fable-5", ], }, + gemini: { + thinking: "high", + prefs: ["google/gemini-3.1-pro-preview"], + }, flash: { thinking: "medium", prefs: [ "google/gemini-flash-latest", - "google/gemini-3-flash-preview", "github-copilot/gemini-3-flash-preview", + "google/gemini-3.8-flash", "github-copilot/gemini-3.8-flash", + "google/gemini-3-flash-preview", ], }, grok: { thinking: "medium", - prefs: ["github-copilot/grok-code-fast-1"], + prefs: [ + "xai/grok-4.7", "github-copilot/grok-4.7", + "xai/grok-4.6", "github-copilot/grok-4.6", + ], }, };