Repository navigation
fix(pi-dev): port pi-watch to pi 1.x, fail on provider errors, refresh alias ladders - #48
Merged
Merged
Conversation
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).
- 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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pi-watch works with pi-coding-agent 1.x again. It now exits 1 with the provider's error when a dispatch fails, instead of printing an empty reply and exiting 0. Its aliases now resolve to the GPT-6 and Claude 5.5 models in the 1.x catalog.
The 1.x port (DEFER-16)
Every fresh install crashed on import (
does not provide an export named 'AuthStorage').package.jsonallowed any version, and the SDK replacedAuthStorageandModelRegistrywithModelRuntimeback in 0.80.8.pi-watch.mjsbuilds aModelRuntimeand hands it tocreateAgentSession. It also adds the two methods the 1.xResourceLoaderrequires and setscacheWarming: "off", since a one-shot run never reuses the cache those extra paid requests would keep warm.^1.2.0. I tried^1.0.0first, but a fresh install of 1.0.0 or 1.1.0 crashes upstream: they take anypi-codemode1.x, andpi-codemode1.2.0 dropped an export they import.pnpm-workspace.yamldeclines the@google/genaiandprotobufjsbuild scripts. pnpm 12 exits 1 on unapproved builds, which made the launcher's own reinstall fail. pi-watch doesn't need either script.Failed dispatches now exit 1 (BUG-12)
A failed provider request doesn't throw.
session.prompt()returns normally and marks the final reply with an error status. pi-watch never checked it, so an expired login looked like an empty review to callers such as adversarial-review. It now reads that reply the waypi -pdoes:This check runs before
--require-trailer, so these failures exit 1 instead of 6.Alias ladders for the 1.x catalog (DEFER-17)
codexandcodex-maxnow lead with GPT-6.1 Sol and GPT-6 Sol.codex-minileads with GPT-6 Luna, andsonnet,opusandhaikulead with Claude 5.5.fablealias covers Claude Fable 5.1 and 5. It costs 2.5× Opus 5.5, so it isn't in theopusladder.groknow routes to grok-4.7 and 4.6, via xai first and then Copilot.grok-code-fast-1is no longer in the catalog, so the old ladder could never resolve.terrastays on GPT-5.6 Terra.gemini-3.2-pro-previewandclaude-sonnet-4-7. If an older pi binary listed one of them, resolution stopped on it with an SDK-skew error instead of falling through to the next entry.--wherenow checks forgpt-6.1-sol, and the default model at the top of each adversarial-reviewALIAS_LADDERrung matches the new ladders.PI_AVAILABLEsnippet piped only stderr, which comes back empty on pi 1.x. It now reads both streams.Testing
All runs used the SDK at 1.2.0.
--list-aliasesand--checkwork; 10 of 11 aliases are ready (grok isn't logged in).OKand exits 0.codex-minidispatch with thereadtool and--require-trailerexits 0.--alias sonnetexits 1 withOAuth refresh failed … invalid_grant. Before this change it exited 0 with an empty reply.--checkresolvescodex→openai/gpt-6.1-sol,codex-mini→gpt-6-luna,sonnet/opus/haiku→ Claude 5.5 andfable→claude-fable-5-1. grok is ✗ because xai and Copilot aren't logged in here.codex(GPT-6.1 Sol),codex-mini(GPT-6 Luna) andflashdispatches printOK.pytest -q: 1285 passed, 1 skipped.Still open: BUG-9 (
--checkmarks an alias ready when its login has expired) and DEFER-18 (the per-provider model dumps in models.md are a pre-1.x snapshot).