Skip to content

docs(tutorials): run Pi with OpenRouter - #3722

Merged
johnnygreco merged 5 commits into
mainfrom
pi-openrouter-tutorial/jg
Sep 26, 2026
Merged

johnnygreco merged 5 commits into
mainfrom
pi-openrouter-tutorial/jg

Conversation

@johnnygreco

@johnnygreco johnnygreco commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Switch the Pi tutorial from Anthropic to OpenRouter and rename it to "Run Pi with OpenRouter". The Pi image now also installs fd: Pi downloads it from GitHub on first use when it's missing, and the sandbox blocks that download.

Related Issue

No issue required: documentation-only update to an existing tutorial.

Changes

  • Renamed docs/tutorials/run-pi.mdx to docs/tutorials/run-pi-with-openrouter.mdx. The nav entry sets a relative slug so the URL matches the file path; from the label alone, Fern would produce run-pi-with-open-router. The page only exists on dev (added in docs: refresh architecture and agent guides #3705), so there's no redirect.
  • Replaced the pi-anthropic profile with an openrouter profile (provider-openrouter.yaml). It sends OPENROUTER_API_KEY as a bearer token to openrouter.ai and allows /usr/local/bin/node, the runtime that runs Pi.
  • Updated the lint, import, provider, and sandbox commands for OpenRouter. The profile commands now use openshell profile instead of the openshell provider profile alias, matching the other tutorials.
  • Added fd-find, symlinked as fd, to the Dockerfile, with a note on why it's needed.
  • Noted that readers can pick any OpenRouter model with Pi's /model command, including :free models for testing without spending credits.
  • Reworked the page for readers new to OpenShell. It now follows the other tutorials: prerequisites, numbered steps, a clean-up step, and a separate troubleshooting section. It explains in plain terms what a provider does and what each profile field controls. The reader inspects the sandbox while Pi is still running, and the page covers how to exit Pi and how to get changes back out. The Adapt section is folded into Next Steps.
  • Troubleshooting now checks the profile's node path instead of command -v pi and npm root -g.
  • Updated the tutorials index card and the link in about/run-an-agent.mdx.

#3713 also renames about/run-an-agent.mdx and edits the Tutorials nav, so whichever PR merges second needs a small rebase.

Testing

  • mise run pre-commit passes
  • Unit tests added/updated
  • E2E tests added/updated (if applicable)

Also verified:

  • Built the tutorial's Dockerfile with Docker. node resolves to /usr/local/bin/node, pi is a Node.js script, fd and rg run, and Pi 0.87.1 installs.
  • Confirmed in Pi 0.87.1's source and changelog that Pi downloads missing fd and rg from GitHub, reports fd is not available and could not be downloaded when the download fails, and lists OpenRouter :free models in its bundled catalog.
  • mise run docs (fern check) passes with 0 errors. Its 3 warnings also appear on main.
  • The docs:nav check from docs: keep page URLs aligned with file paths #3713 reports no problems for this page.

Not run: an end-to-end sandbox on a live gateway with an OpenRouter key. openshell profile lint needs a gateway, so the profile wasn't linted here. It has the same structure as providers/openai.yaml and providers/deepinfra.yaml.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

Switch the Pi tutorial from Anthropic to OpenRouter, add fd to the Pi image
so Pi does not try to download it from GitHub inside the sandbox, and rename
the page to Run Pi with OpenRouter with a dev redirect from the old URL.

Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Sep 25, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions

Copy link
Copy Markdown

Add prerequisites and steps, explain providers and the profile fields in
plain terms, inspect the sandbox while Pi is still running, and add clean-up
and troubleshooting sections.

Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Signed-off-by: Johnny Greco <jogreco@nvidia.com>
@johnnygreco

Copy link
Copy Markdown
Collaborator Author

/ok to test 573728e

Signed-off-by: Johnny Greco <jogreco@nvidia.com>
@drew
drew enabled auto-merge September 25, 2026 22:16
@drew

drew commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

/ok to test ff13442

@drew
drew disabled auto-merge September 25, 2026 22:39
@johnnygreco
johnnygreco added this pull request to the merge queue Sep 25, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 26, 2026
@johnnygreco
johnnygreco added this pull request to the merge queue Sep 26, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 26, 2026
@johnnygreco
johnnygreco added this pull request to the merge queue Sep 26, 2026
Merged via the queue into main with commit f155899 Sep 26, 2026
73 checks passed
@johnnygreco
johnnygreco deleted the pi-openrouter-tutorial/jg branch September 26, 2026 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants