@badliveware/pi-model-catalog 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +48 -59
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # pi-model-catalog
2
2
 
3
- Exposes Pi's model registry to the agent as a tool so model choice can be based on the same data behind `pi --list-models`.
3
+ Adds a `list_pi_models` tool that lets agents inspect Pi's current model registry before choosing or recommending a model.
4
+
5
+ Use it when model choice should depend on what is actually available in your Pi setup: auth status, local support notes, enabled/cycling preferences, context size, capabilities, quota guidance, and optional price data.
4
6
 
5
7
  ## Install
6
8
 
@@ -8,77 +10,68 @@ Exposes Pi's model registry to the agent as a tool so model choice can be based
8
10
  pi install npm:@badliveware/pi-model-catalog
9
11
  ```
10
12
 
11
- For local testing from this repository:
13
+ No external services or credentials are required beyond the model credentials already configured in Pi.
12
14
 
13
- ```bash
14
- pi -e /path/to/pi/agent/extensions/public/model-catalog
15
- ```
15
+ ## Quick use
16
16
 
17
- ## Tool
17
+ Ask the agent to call `list_pi_models` before choosing a model, or use the UI command:
18
18
 
19
- Registers:
19
+ ```text
20
+ /models-guide mini
21
+ /models-guide --pricing --relative-to openai-codex/gpt-5.4-mini codex
22
+ ```
20
23
 
21
- - `list_pi_models`
24
+ Tool example:
22
25
 
23
- Parameters:
26
+ ```json
27
+ {
28
+ "query": "sonnet",
29
+ "includePricing": true,
30
+ "relativeTo": "openai-codex/gpt-5.4-mini"
31
+ }
32
+ ```
24
33
 
25
- - `query` optional substring filter such as `mini`, `codex`, or `sonnet`
26
- - `includeUnavailable` — include models without configured auth; defaults to `false`
27
- - `includeDetails` — include verbose use/avoid guidance; defaults to `false`
28
- - `includePricing` — include numeric registry prices in $/million tokens; defaults to `false`
29
- - `relativeTo` — optional baseline model id such as `openai-codex/gpt-5.4`; with `includePricing`, adds relative input/output/blended ratios
30
- - `unsupported` — how to handle locally unsupported models: `exclude` (default), `include`, or `only`
34
+ ## What it returns
31
35
 
32
- Default returned columns are intentionally concise:
36
+ Default output is intentionally compact:
33
37
 
34
- - full model id (`provider/model`, with `*` marking the current model)
38
+ - full model id, with `*` on the current model
35
39
  - `auth`, `support`, and `enabled` status
36
40
  - context and max output tokens
37
- - compact capability marker (`text`, `think`, `img`, or `think+img`)
38
- - price guidance tier (`price-tier`)
39
- - combined relative cost ratio (`rel-cost`) against the current model by default, or against `relativeTo` / `--relative-to` when supplied
40
- - quota guidance tier
41
+ - capability marker: `text`, `think`, `img`, or `think+img`
42
+ - price tier and rough relative cost
43
+ - quota/scarcity guidance
41
44
 
42
- Optional columns/details include:
45
+ Pass `includeDetails: true` for verbose use/avoid guidance. Pass `includePricing: true` for numeric input/output prices and relative ratios.
43
46
 
44
- - numeric pricing columns (`in$/M`, `out$/M`) and detailed relative ratios (`rel-in`, `rel-out`, `rel-blend`) with `includePricing`
45
- - verbose use/avoid guidance with `includeDetails`
47
+ ## Tool parameters
46
48
 
47
- For model overrides, agents should choose rows with both `support: yes` and `enabled: yes` unless the user explicitly authorizes configuration changes. `auth: yes` only means credentials exist.
49
+ | Parameter | What it does |
50
+ | --- | --- |
51
+ | `query` | Optional substring filter such as `mini`, `codex`, or `sonnet`. |
52
+ | `includeUnavailable` | Include models without configured auth. Default: `false`. |
53
+ | `includeDetails` | Include verbose use/avoid guidance. Default: `false`. |
54
+ | `includePricing` | Include numeric registry prices in $/million tokens. Default: `false`. |
55
+ | `relativeTo` | Baseline model id for relative price ratios. |
56
+ | `unsupported` | `exclude`, `include`, or `only` locally unsupported models. Default: `exclude`. |
48
57
 
49
- The `price-tier` and `quota` columns are guidance tiers, not live billing or remaining-quota data. They are meant to help the agent choose between cheap/lower-scarcity, premium low-latency, default, and scarce/strong models. `price-tier` is computed from local registry rates as `input $/M + output $/M`:
50
-
51
- | Tier | Rule |
52
- | --- | ---: |
53
- | `free/local` | locally run model; no metered API cost |
54
- | `unknown/sub` | no numeric input/output price |
55
- | `low` | `<= $1/M` blended |
56
- | `medium` | `<= $8/M` blended |
57
- | `high` | `<= $30/M` blended |
58
- | `premium` | `> $30/M` blended |
59
- | `premium-speed` | `-spark` models, special-cased |
58
+ ## Command
60
59
 
61
- Local models are usually free from API billing but can be much slower than hosted models. Treat local-model capability as installation-specific, use them mainly for non-interactive/background work when latency is acceptable, and avoid assuming high concurrency on a single local backend. `-spark` models are treated as premium very-low-latency options, not cheap defaults.
60
+ | Command | What it does |
61
+ | --- | --- |
62
+ | `/models-guide [query]` | Show the concise available-model table. |
63
+ | `/models-guide --verbose [query]` | Include verbose use/avoid guidance. |
64
+ | `/models-guide --pricing --relative-to <model> [query]` | Include numeric pricing and ratios. |
62
65
 
63
- Numeric pricing comes from Pi's local model registry (`model.cost`) and is expressed in dollars per million tokens. For direct API providers this usually mirrors provider pricing; for subscription-backed providers such as Codex or Copilot, treat it as nominal cost-weight data rather than a guarantee of live billing or quota burn. A zero/blank price outside the `free/local` tier can mean unknown, bundled, or non-metered rather than free.
66
+ ## Local support notes
64
67
 
65
- Example:
68
+ Some providers report a model as authenticated even when a specific account cannot use it. Add local unsupported-model notes in:
66
69
 
67
- ```json
68
- {
69
- "query": "openai-codex gpt-5.4",
70
- "includePricing": true,
71
- "relativeTo": "openai-codex/gpt-5.4"
72
- }
70
+ ```text
71
+ ~/.pi/agent/model-catalog.json
73
72
  ```
74
73
 
75
- ## Locally unsupported models
76
-
77
- Some models can appear in Pi's registry and pass auth checks but still fail for a specific account/provider pairing. Public package defaults do not mark any account-specific model as unsupported; add local entries when your provider/account has known incompatibilities.
78
-
79
- Locally unsupported models are excluded by default so agents do not choose them accidentally. Call `list_pi_models` with `unsupported: "include"` to show them with a `support: no` column and reason, or `unsupported: "only"` to inspect only unsupported entries.
80
-
81
- You can add local unsupported entries in `~/.pi/agent/model-catalog.json`:
74
+ Example:
82
75
 
83
76
  ```json
84
77
  {
@@ -91,12 +84,8 @@ You can add local unsupported entries in `~/.pi/agent/model-catalog.json`:
91
84
  }
92
85
  ```
93
86
 
94
- ## Command
95
-
96
- - `/models-guide [query]` — show the concise available-model table in the UI
97
- - `/models-guide --verbose [query]` — include verbose use/avoid guidance
98
- - `/models-guide --pricing --relative-to openai-codex/gpt-5.4 openai-codex gpt-5` — include numeric pricing and ratios in the UI table
87
+ Unsupported models are excluded by default so agents do not choose them accidentally.
99
88
 
100
- ## Intended use
89
+ ## Price and quota caveats
101
90
 
102
- Agents should call `list_pi_models` before choosing or recommending a model when availability, cost, quota, or capability matters. This is especially useful for subagent delegation and deciding whether to downshift routine work or upshift difficult bounded work.
91
+ `price-tier`, numeric prices, and quota labels are guidance from Pi's local model registry, not live billing or remaining quota. For subscription-backed providers, numeric prices may be nominal weights rather than direct billing.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@badliveware/pi-model-catalog",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Expose Pi model listings and selection guidance as an agent tool.",
5
5
  "type": "module",
6
6
  "keywords": [