Repository navigation
Conversation
Fixes cannot find module '@earendil-works/pi-ai/api/*.lazy' in pi >= 0.84.2 and 1.x. Resolves ravshansbox#2 Resolves ravshansbox#3
Author
|
Closing PR temporarily for further testing. |
added 4 commits
October 10, 2026 05:30
- Generate canonical session id (ses_) and message id (msg_) - Update User-Agent to opencode/1.18.31 and client identity to cli - Inject required core gate tools (bash, read) into system message - Set Accept to text/event-stream
- Populate models dynamically from models.dev and opencode /models endpoint - Route dynamic models cleanly via getEndpointConfig - Support all 12+ live free models (nemotron, mimo, space-bunny, exo, etc.)
Author
|
Reopening PR: Module compatibility, free-tier gate validation, dynamic model discovery, and protocol routing fixes have now been implemented, tested live on Pi 1.1.0, and verified. |
added 5 commits
October 12, 2026 09:12
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.
Overview
This pull request resolves module compatibility issues, OpenCode free-tier gateway validation requirements, dynamic live model discovery, protocol routing, zero-configuration public key support, and Pi-Bolt Ahead-of-Time (AOT) optimizations.
Closes #2
Closes #3
Changes
Fix Extension Import Resolution (
9c650f2)anthropicMessagesApi,googleGenerativeAIApi,openAICompletionsApi, andopenAIResponsesApidirectly from@earendil-works/pi-ai/compat.Cannot find module '@earendil-works/pi-ai/api/anthropic-messages.lazy'on Pi runtimes.Satisfy OpenCode Free-Tier Gate & Verification (
febf6ca)canonicalId).User-Agent: opencode/1.18.31,x-opencode-client: cli,x-opencode-session, andAccept: text/event-stream.bashandread) into system context (ensureOpencodeGateTools).403: {"type":"FreeTierError","message":"OpenCode's free tier can only be used from within OpenCode"}.Dynamic Model Discovery with Offline Cache & Resilient Timeout (
6f2dc29,14a67da)models.devon startup with a bounded 3-second timeout.~/.pi/agent/cache/opencode-zen-models.json) to guarantee reliable startup even when offline.refreshModelshook for on-demand catalog refreshes.Zero-Configuration Automatic Public Key Default (
14a67da)apiKey = 'public'.OPENCODE_API_KEY,~/.pi/agent/auth.json, or--api-key.Pi-Bolt Ahead-of-Time (AOT) Optimisations & Manifest (
603b313,14a67da)plugins.tsmanifest conforming toInlineExtension[]for compiling directly into Pi-Bolt binaries (scripts/build-pi.sh --plugins plugins.ts).Dynamic Protocol Routing for Meta Muse Spark Series (
571aff1)muse-spark-*models to theopenai-responsesprotocol endpoint (/zen/v1/responses).Documentation & Install Guide (
14f2439,b73e887)README.mdwith installation instructions, Pi-Bolt compilation guide, and configuration examples.Verification
npm run checkpasses cleanly (typecheck, lint, prettier).big-pickle(openai-completions)muse-spark-1.3-contributor-free(openai-responses)