Luigit
repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by admin

extensions/model-info/README.md

Raw
Rendered preview

model-info

Compact executor, transport, and advisor telemetry for Pi.

Install / load

Loaded through the root pi-ext package. See root README.

Commands / tools / settings

Commands: none.

Tools: none.

Settings read: none.

Hooks:

  • session_start, model_select, session_compact: publish telemetry from the current session state.
  • thinking_level_select: publish telemetry using the selected thinking level from the event.
  • message_end: records the served model from an assistant reply's responseModel.
  • session_shutdown: clears the footer segment and status fallback.

Events consumed:

  • model-route:fast: updates the executor transport indicator.
  • model-route:angel: updates the advisor model and thinking level.

Events emitted:

  • footer:segment: publishes or clears the grouped provider, subscription, model, served, fast, and angel segments in the llm zone.

UI status:

  • model-info status fallback when @bugabinga/pi-ext-footer is not loaded.

Behavior

Shows a compact current model label plus thinking level:

sol:medium
opus:high

Known model families are shortened according to their naming grammar rather than a maintained model alias list. Unknown families retain the last /-separated model id segment. Missing model becomes no-model.

Thinking level comes from thinking_level_select; otherwise from the latest thinking_level_change session entry; fallback is off.

When the shared footer is loaded, the extension publishes one atomic model-route group containing the provider, optional subscription marker, executor, optional fast icon, and optional Angel advisor. Known providers use brand icons; unknown providers retain their text identifier.

  󱏐  sol:medium 󱐋 → 󰧑 astra:max

When a router model such as grts/auto, OpenRouter auto, or kilo-auto/free answers through a different model, the last reply's served model follows the executor:

auto:off → dots-3-note-preview:free

It comes from Pi's responseModel on the reply, restores from the session branch on start, and clears when the model changes.

Without the shared footer, it clears the footer segment and writes the model-info UI status fallback.

Publishing only runs when UI is available. On shutdown, the extension clears its footer segment and status fallback.

Debugging

Opt-in metadata-only tracing follows debug contract. Safe events: session.start, session.shutdown, route.refresh (no_ui | status | footer | fallback outcome).

# model-info

Compact executor, transport, and advisor telemetry for Pi.

## Install / load

Loaded through the root `pi-ext` package.
See [root README](../../README.md).

## Commands / tools / settings

Commands:
none.

Tools:
none.

Settings read:
none.

Hooks:

- `session_start`, `model_select`, `session_compact`:
  publish telemetry from the current session state.
- `thinking_level_select`:
  publish telemetry using the selected thinking level from the event.
- `message_end`:
  records the served model from an assistant reply's `responseModel`.
- `session_shutdown`:
  clears the footer segment and status fallback.

Events consumed:

- `model-route:fast`:
  updates the executor transport indicator.
- `model-route:angel`:
  updates the advisor model and thinking level.

Events emitted:

- `footer:segment`:
  publishes or clears the grouped `provider`, `subscription`, `model`, `served`, `fast`, and `angel` segments in the `llm` zone.

UI status:

- `model-info` status fallback when `@bugabinga/pi-ext-footer` is not loaded.

## Behavior

Shows a compact current model label plus thinking level:

```text
sol:medium
opus:high
```

Known model families are shortened according to their naming grammar rather than a maintained model alias list.
Unknown families retain the last `/`-separated model id segment.
Missing model becomes `no-model`.

Thinking level comes from `thinking_level_select`; otherwise from the latest
`thinking_level_change` session entry; fallback is `off`.

When the shared footer is loaded, the extension publishes one atomic `model-route` group containing the provider, optional subscription marker, executor, optional fast icon, and optional Angel advisor.
Known providers use brand icons; unknown providers retain their text identifier.

```text
  󱏐  sol:medium 󱐋 → 󰧑 astra:max
```

When a router model such as `grts/auto`, OpenRouter `auto`, or `kilo-auto/free` answers through a different model, the last reply's served model follows the executor:

```text
auto:off → dots-3-note-preview:free
```

It comes from Pi's `responseModel` on the reply, restores from the session branch on start, and clears when the model changes.

Without the shared footer, it clears the footer segment and writes the
`model-info` UI status fallback.

Publishing only runs when UI is available.
On shutdown, the extension clears its footer segment and status fallback.

## Debugging

Opt-in metadata-only tracing follows [debug contract](../DEBUG.md).
Safe events: `session.start`, `session.shutdown`, `route.refresh` (`no_ui` | `status` | `footer` | `fallback` outcome).