Skip to content

Commit 3776072

Browse files
Drop NVIDIA-as-default preseed (v0.2.1)
Pre-shipping a `defaultProvider=nvidia` + `defaultModel=qwen3-coder-480b` seed in settings.json baked in an implicit "NVIDIA is the recommended free option" without an actual key behind it. Fresh installs landed on NVIDIA active with an empty key file, and the first chat silently failed until the user dug into provider settings. - postinstall.sh: strip defaultProvider/defaultModel from settings.json instead of setting them. NVIDIA stays in models.json as one available provider alongside the others; no implicit preference. - build-bootstrap.sh: stop creating an empty `~/.config/nvidia/api-key` placeholder in the HOME skel. Provider keys are user-supplied through the dashboard's settings UI. - README: rewrite first-run flow accordingly; dashboard prompts for a provider on first launch. - Bump versionName to 0.2.1, versionCode 3.
1 parent 32c2ec9 commit 3776072

4 files changed

Lines changed: 23 additions & 19 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ A [Pi coding agent](https://pi.dev/) shipped as an Android APK. No Termux instal
66
77
## Install (team testers)
88

9-
1. Grab the latest APK — **v0.2.0** — from the [Releases page](https://github.com/CelestialCreator/pocket-pi/releases/latest), or directly: [pocket-pi-v0.2.0.apk](https://github.com/CelestialCreator/pocket-pi/releases/download/v0.2.0/pocket-pi-v0.2.0.apk).
10-
2. Sideload — tap the APK on the phone (allow install from unknown sources for your browser/file manager), or `adb install pocket-pi-v0.2.0.apk`.
9+
1. Grab the latest APK — **v0.2.1** — from the [Releases page](https://github.com/CelestialCreator/pocket-pi/releases/latest), or directly: [pocket-pi-v0.2.1.apk](https://github.com/CelestialCreator/pocket-pi/releases/download/v0.2.1/pocket-pi-v0.2.1.apk).
10+
2. Sideload — tap the APK on the phone (allow install from unknown sources for your browser/file manager), or `adb install pocket-pi-v0.2.1.apk`.
1111
3. Open the app. First launch runs the bootstrap (3–5 min on Wi-Fi: extracts Termux, installs Node + npm packages, registers Pi extensions).
12-
4. Once the dashboard loads, tap its **** in the top-right of the page chrome to add provider API keys, switch models, edit AGENTS.md, etc. NVIDIA NIM is pre-seeded (free) so you can chat immediately; OpenRouter / OpenAI / Anthropic / Groq are also wired up — paste a key (or use the Claude Pro/Max OAuth Sign-In, which opens your device's default browser) and pick a model.
12+
4. Once the dashboard loads, tap its **** in the top-right of the page chrome to add a provider. Wired up: OpenAI, Anthropic (API key or Claude Pro/Max OAuth Sign-In), Google Gemini, Groq, Mistral, NVIDIA NIM, OpenRouter, plus device-code OAuth for ChatGPT / GitHub Copilot. Paste a key (or sign in via OAuth opens your device's default browser), pick a model, save.
1313
5. Chat away.
1414

1515
If the dashboard never finishes binding, the loading screen surfaces **Restart Pi** and **Re-run setup** buttons after a 15-second stall — those re-kick the service and re-run the bootstrap installer respectively. As a last resort, force-stop the app from Android Settings and reopen; the install state on disk is preserved.
@@ -73,7 +73,7 @@ The current build uses `applicationId = com.termux` so the upstream Termux boots
7373
|---|---|
7474
| Single-APK install on aarch64 phones ||
7575
| pi-agent-dashboard as the WebView UI (slash commands, model switcher, session history all native) ||
76-
| NVIDIA NIM + OpenRouter end-to-end (chat, tool use, cost tracking) ||
76+
| OpenAI / Anthropic API / NVIDIA NIM / OpenRouter end-to-end (chat, tool use, cost tracking); Claude Pro/Max OAuth round-trips through the device's default browser ||
7777
| Recovery UI when the dashboard doesn't bind within 15s (inline Restart Pi / Re-run setup buttons) ||
7878
| `pi-anthropic-messages` for tool-call rendering ||
7979
| Shell-session feature inside the dashboard | not yet — `node-pty` has no android-arm64 prebuild and is stubbed; chat/files/tasks work, terminal tab will fail |
@@ -86,4 +86,4 @@ MIT. Third-party runtime components keep their own licenses (Termux GPL, Pi MIT)
8686

8787
## Status
8888

89-
v0.2.0 — POC, shippable. The Termux-fork-inside-an-APK approach works: pi-agent-dashboard is the chat UI, single-tap APK install handles the rest. Whether to invest in productizing it (custom prefix bootstrap, real applicationId, signed release builds, Play Store, etc.) or rewrite this as a proper native Android client that talks to Pi over the network is the question this POC is meant to inform.
89+
v0.2.1 — POC, shippable. The Termux-fork-inside-an-APK approach works: pi-agent-dashboard is the chat UI, single-tap APK install handles the rest. Whether to invest in productizing it (custom prefix bootstrap, real applicationId, signed release builds, Play Store, etc.) or rewrite this as a proper native Android client that talks to Pi over the network is the question this POC is meant to inform.

android/app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ android {
2626
// legacy semantics that allow exec from app-data, which Pi (and the
2727
// entire Termux runtime) relies on.
2828
targetSdk = 28
29-
versionCode = 2
30-
versionName = "0.2.0"
29+
versionCode = 3
30+
versionName = "0.2.1"
3131

3232
ndk { abiFilters += listOf("arm64-v8a") }
3333
}

bootstrap/build-bootstrap.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,15 @@ chmod +x "$WORK/prefix/etc/pocket-pi/postinstall.sh"
4949
chmod +x "$WORK/prefix/etc/pocket-pi/patches/"*.sh
5050

5151
# 2. HOME skel — copied into the user's $HOME on first launch by postinstall.
52+
# No api-key placeholders: provider keys are user-supplied through the
53+
# dashboard's settings UI on first run. Pre-creating a stub file for any
54+
# specific provider would imply we're endorsing it.
5255
SKEL="$WORK/prefix/etc/pocket-pi/skel"
53-
mkdir -p "$SKEL/.pi/agent/skills/proposed" "$SKEL/.config/nvidia"
56+
mkdir -p "$SKEL/.pi/agent/skills/proposed"
5457
cp "$ROOT/config/AGENTS.md" "$SKEL/.pi/agent/AGENTS.md"
5558
cp "$ROOT/config/claude-bridge.json" "$SKEL/.pi/agent/claude-bridge.json"
5659
cp "$ROOT/config/models.json" "$SKEL/.pi/agent/models.json"
5760
cp -R "$ROOT/skills/." "$SKEL/.pi/agent/skills/"
58-
: > "$SKEL/.config/nvidia/api-key"
59-
chmod 600 "$SKEL/.config/nvidia/api-key"
6061

6162
# 3. Repack
6263
OUT="$DIST/bootstrap-${ARCH}.zip"

bootstrap/postinstall.sh

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -195,26 +195,29 @@ if [ -f "$ETC/patches/node-pty-stub.js" ] && [ -d "$NODE_PTY_PKG" ]; then
195195
echo "==> node-pty stub installed; src/ removed so tsx uses lib/"
196196
fi
197197

198-
# --- 3b. Seed default provider/model ---------------------------------------
199-
# Pi reads defaultProvider/defaultModel from settings.json at boot to pick
200-
# the active model. Without these, the dashboard's model picker has nothing
201-
# selected and prompts have nowhere to go. Set NVIDIA's Qwen3 Coder 480B as
202-
# the default (free); only if the user hasn't already chosen.
198+
# --- 3b. Clean settings.json (no default provider preseed) ------------------
199+
# Earlier builds preseeded `defaultProvider=nvidia` so a fresh install could
200+
# chat immediately against free NVIDIA NIM. Pulled now: it bakes in an
201+
# implicit "NVIDIA is the recommended provider" without a real key behind
202+
# it, and the dashboard's first-run UX is better when it prompts the user
203+
# to pick a provider through its native settings UI. NVIDIA stays available
204+
# in models.json as one option among several — no preference applied.
203205
SETTINGS="$HOME/.pi/agent/settings.json"
204-
python3 - "$SETTINGS" <<'PY'
206+
python3 - "$SETTINGS" <<'PY' || echo "WARN: settings.json cleanup skipped"
205207
import json, pathlib, sys
206208
p = pathlib.Path(sys.argv[1])
207209
data = {}
208210
if p.exists():
209211
try: data = json.loads(p.read_text())
210212
except Exception: data = {}
211-
data.setdefault("defaultProvider", "nvidia")
212-
data.setdefault("defaultModel", "qwen/qwen3-coder-480b-a35b-instruct")
213+
# Strip any legacy preseeded defaults; modern flow has the dashboard prompt.
214+
data.pop("defaultProvider", None)
215+
data.pop("defaultModel", None)
213216
# Strip any legacy pi-webserver block — the dashboard is the UI now.
214217
data.pop("pi-webserver", None)
215218
p.parent.mkdir(parents=True, exist_ok=True)
216219
p.write_text(json.dumps(data, indent=2))
217-
print(f"merged default model into {p}")
220+
print(f"cleaned settings.json defaults at {p}")
218221
PY
219222

220223
# --- 3c. Write dashboard tool overrides ------------------------------------

0 commit comments

Comments
 (0)