githubnext/chopinPublic

Let's compose rich plans together

Patch Pi to skip host context files and reject unknown models

Pi's resource loader read AGENTS.md and CLAUDE.md from the session's
working directory and its host parents into the system prompt, and an
unrecognized MODEL silently fell back to another Pi model while the
startup banner still printed the requested ID.

A bun patch to @ai-sdk/harness-pi 1.0.128 sets noContextFiles and fails
the turn when the requested model does not resolve. HARNESS=pi now
requires MODEL because the default is a Copilot ID Pi does not know.

Assistant-model: Claude Opus 5.5
Assistant-workflow: inline
Assistant-verification: bun test contract passed: pi.contract.test.ts keeps a temp-dir AGENTS.md out of the stub's system prompt and rejects gpt-6-luna before any model request
Assistant-verification: red check passed: with the patch hunks disabled both new contract tests fail, reproducing the host AGENTS.md injection and silent model fallback
Assistant-verification: bun test passed: 1594 pass, 2 skip, 0 fail
Assistant-verification: bun run types passed: all workspaces and E2E
Assistant-verification: bun run ci passed: dprint, oxlint, tokens
Assistant-verification: bun install --frozen-lockfile passed: patched lockfile installs unchanged
User-preference: Patch pinned dependencies with bun patch when the upstream adapter exposes no option for a needed safety fix
Co-authored-by: Alex Lavaee <lavaman131@github.com>
ALAlex Lavaee authored
4b48675Patch
Parent3a91c02
9 files changed+152-46
StackedSplit
apps/server/src/config.test.ts+7 โˆ’0
apps/server/src/config.ts+12 โˆ’2
apps/server/src/harness/pi.contract.test.ts+75 โˆ’24
apps/server/src/harness/pi/model-stub.ts+14 โˆ’2
bun.lock+1 โˆ’0
docs/hosted-agent.md+2 โˆ’5
docs/self-hosting.md+14 โˆ’12
package.json+2 โˆ’1
patches/@ai-sdk%2Fharness-pi@1.0.128.patch+25 โˆ’0