Pi fails after the first execution on a blank exe.dev box

GitHub issue #218 Feature Shipped harperreedvia github Jul 17, 2026 View original

Repro:

  1. create a new exe.dev box
  2. ssh into box
  3. launch pi
  4. confirm pi works
  5. exit pi
  6. launch pi
  7. error "Error: Extension "/home/exedev/.pi/agent/extensions/exe-dev/index.ts" error: Provider xai, model grok-4.5: no "api" specified."
  8. cry in our pasta while thinking of all the things we could accomplish if pi ran a second time

Transcripts:

Personal Account

exe.dev ▶ new
Creating egg-marimba using image boldsoftware/exeuntu...
Ready in 1.4s!

Coding agent
https://egg-marimba.shelley.exe.xyz

App (HTTPS proxy → :8000)
https://egg-marimba.exe.xyz

SSH
ssh egg-marimba.exe.xyz

exe.dev ▶ ssh egg-marimba
Tip: connecting directly with "ssh egg-marimba.exe.xyz" is typically faster.

You are on egg-marimba.exe.xyz. The disk is persistent. You have 'sudo'.

For support and documentation, "ssh exe.dev" or visit https://exe.dev/

Docker is installed and works; try "docker run --rm alpine:latest echo hello world"

exedev@egg-marimba:~$ pi

 pi v0.80.7
 escape interrupt · ctrl+c/ctrl+d clear/exit · / commands · ! bash · ctrl+o more
 Press ctrl+o to show full startup help and loaded resources.

 Pi can explain its own features and look up its docs. Ask it how to use or extend Pi.

[Extensions]
  exe-dev


────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 Update Available
 New version 0.80.10 is available. Run pi update
 Changelog: https://pi.dev/changelog
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────


 hello


 Hello! How can I help you today?

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
~
↑2 ↓13 W2.1k CH0.0% $0.014 0.2%/1.0M (auto)                                                                                                                                                                                                                                 (anthropic) claude-opus-4-8 • medium

To resume this session: pi --session 019f7065-6342-7090-8c10-47b57c7aa714
exedev@egg-marimba:~$ pi
Error: Extension "/home/exedev/.pi/agent/extensions/exe-dev/index.ts" error: Provider xai, model grok-4.5: no "api" specified.
exedev@egg-marimba:~$

Work Account:

exedev@volleyball-vs-opening:~$ pi

 pi v0.80.7                                                                                                                                                                 
 escape interrupt · ctrl+c/ctrl+d clear/exit · / commands · ! bash · ctrl+o more                                                                                            
 Press ctrl+o to show full startup help and loaded resources.                                                                                                               
                                                                                                                                                                            
 Pi can explain its own features and look up its docs. Ask it how to use or extend Pi.                                                                                      

[Extensions]                                                                                                                                                                
  exe-dev                                                                                                                                                                   


────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 Update Available                                                                                                                                                           
 New version 0.80.10 is available. Run pi update                                                                                                                            
 Changelog: https://pi.dev/changelog                                                                                                                                        
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

                                                                                                                                                                            
 hello                                                                                                                                                                      
                                                                                                                                                                            

 Hello! How can I help you today?                                                                                                                                           

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                                                                                            
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
~
↑2 ↓13 R2.1k CH99.9% $0.001 0.2%/1.0M (auto)                                                                                            (anthropic) claude-opus-4-8 • medium

To resume this session: pi --session 019f7068-9cad-7451-a593-a3881844534e
exedev@volleyball-vs-opening:~$ pi
Error: Extension "/home/exedev/.pi/agent/extensions/exe-dev/index.ts" error: Provider xai, model grok-4.5: no "api" specified.
exedev@volleyball-vs-opening:~$ 

2 Comments

harperreedvia github Jul 17, 2026

from pi (on a first run!)

What was happening

  1. On first launch, the exe-dev extension registers gateway providers from a bundled catalog (anthropic/openai/fireworks), then kicks off a background refresh that writes the live gateway catalog to ~/.cache/pi-exe-dev/catalog.json.
  2. The live catalog now includes a new provider, xai (grok-4.5), with full model metadata but no api field.
  3. On the next launch, the extension reads that cached catalog and calls pi.registerProvider("xai", …) with models but no api.
  4. pi validates every provider that defines models and throws Provider xai, model grok-4.5: no "api" specified. — and because that validation runs after the extension factory returns, it escapes the extension's registerGateway try/catch and kills pi entirely.

So the very first successful run poisoned the cache, and every launch afterward died.

The fix

In /home/exedev/.pi/agent/extensions/exe-dev/integration_catalog.ts, configFromCatalogProvider now defaults api to openai-completions whenever the catalog ships models but no usable api:

if (config.models && !config.api) config.api = "openai-completions";                                                                                                     

This is safe because the exe.dev gateway exposes these providers over OpenAI-compatible endpoints (e.g. xai/v1), and providers that don't ship their own models (anthropic/openai) are untouched — they keep relying on pi's built-in catalog and API.

Verified by reproducing the crash, applying the fix, and running pi twice in a row (both EXIT=0).

Note: the underlying data bug is server-side — the gateway catalog should include an api for xai — but this extension change makes pi resilient to it so it can no longer be crashed by a new catalog entry.

maisemvia github Jul 17, 2026

Thank you for the report! The LLM integration was returning incomplete metadata for Grok4.5 which resulted in the pi extension not being super happy. This should be fixed now, please let us know/re-open if you run into any more issues.