Repository navigation
Add searchable Pi model picker to interactive setup - #17
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Model completion mishandles separators, and existing agent-directory paths are not normalized consistently.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Adds an interactive, searchable Pi model picker while preserving scripted setup behavior.
Changes:
- Queries Pi’s model catalog and provides fuzzy selection with manual fallback.
- Supports preserving or resetting model defaults.
- Adds tests, dependency updates, and documentation.
| File | Description |
|---|---|
pi_gateway/cli.py |
Implements catalog loading and model selection. |
tests/test_model_setup.py |
Tests picker, fallback, and reset behavior. |
pyproject.toml |
Adds prompt-toolkit. |
uv.lock |
Locks new dependencies. |
README.md |
Documents interactive selection. |
docs/02-startup-and-cli-flow.md |
Updates setup flow documentation. |
docs/06-configuration-and-deployment.md |
Documents picker operation and fallback. |
AGENTS.md |
Updates repository guidance. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+275
to
+276
| if pi.get("agentDir"): | ||
| env["PI_CODING_AGENT_DIR"] = str(pi["agentDir"]) |
|
|
||
| print(f"\nSearch {len(models)} Pi models (type to filter; Tab/arrow keys to select).") | ||
| print(f"Current: {current or 'Pi default'}. Enter on empty to keep it; type 'default' to use Pi default.") | ||
| completer = FuzzyCompleter(WordCompleter(models, ignore_case=True)) |
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.

$## Summary\n- Read models from the configured Pi executable and agent directory and offer fuzzy-search selection in interactive init/configure.\n- Keep the previous selection on empty input, support explicit
defaultreset, and fall back to manual entry when Pi model listing is unavailable.\n- Keep scripted--modelunchanged and document selection, authentication caveat, and fallback.\n\n## Verification\n- Python 3.11/3.14: ruff, mypy, pytest, uv build.\n- compileall and git diff --check.