@tryinget/pi-model-selection
Shared Pi model selection and auth resolution primitives.
Package details
Install @tryinget/pi-model-selection from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@tryinget/pi-model-selection- Package
@tryinget/pi-model-selection- Version
0.2.0- Published
- Jul 13, 2026
- Downloads
- 220/mo · 185/wk
- Author
- tryinget
- License
- SEE LICENSE IN LICENSE
- Types
- prompt
- Size
- 17.3 KB
- Dependencies
- 0 dependencies · 0 peers
Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
summary: "@tryinget/pi-model-selection package overview." read_when:
- "Orienting to this package or directory before changing its behavior."
@tryinget/pi-model-selection
Shared Pi model-selection and auth-resolution primitives.
This is a top-level support package at packages/pi-model-selection, not a pi-interaction subpackage. Consumers should depend on @tryinget/pi-model-selection directly rather than depending on @tryinget/pi-interaction for model-selection helpers.
This package owns prompt-template-model-compatible model resolver semantics that are needed by more than one extension:
- exact
modelId - exact
provider/modelId - comma-separated fallback lists
- current-model preservation when the active model matches any candidate
- provider-priority ordering for ambiguous bare model IDs:
openai-codexanthropicgithub-copilotopenrouter
- auth-aware selection via
getAvailable(),isUsingOAuth(),getApiKey(), andgetApiKeyAndHeaders() - preservation of model-level
headers
It intentionally does not own prompt-template slash-command registration, compaction preset parsing, loops/workflows, or subagent execution.
Template baseline
This package was reconciled through ../pi-extensions-template in simple-package mode, then intentionally adapted as a root-managed support library. It keeps template lineage and baseline files such as .copier-answers.yml, biome.jsonc, policy/engineering-lane.json, and docs/engineering.local.md, but it deliberately omits package.json#pi.extensions and package.json#pi.prompts so it cannot register slash commands or package prompts by accident.