@jsynowiec/pi-provider-logger
A Pi extension that logs every provider request and response to a file, and shows a short notification in the UI.
Package details
Install @jsynowiec/pi-provider-logger from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@jsynowiec/pi-provider-logger- Package
@jsynowiec/pi-provider-logger- Version
0.1.0- Published
- Jun 30, 2026
- Downloads
- 133/mo · 12/wk
- Author
- jsynowiec
- License
- MIT
- Types
- extension
- Size
- 5.7 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-provider-logger
A pi extension that logs every provider request and response to a file, and shows a short notification in the UI.
What it does
- On
before_provider_request: writes the request payload (plus model API and base URL) to a log file and shows a→ Request: provider/id (api)notification. - On
after_provider_response: writes the response status and headers to the same log file and shows a← Response: <status>notification (red on 4xx/5xx).
Log location
~/.pi/logs/provider-requests.log
The directory is created on first write. Each entry is delimited by === banners, e.g.:
=== PROVIDER REQUEST ===
Time: 2025-01-01T00:00:00.000Z
Model api: openai-completions
Model baseUrl: https://api.openai.com/v1/
Payload (provider-specific request parameters):
{
"model": "gpt-5.4-mini",
"messages": [...]
}
========================
Install
From npm (recommended):
Instal globally
pi install npm:@jsynowiec/pi-provider-logger
Project-local install:
pi install -l npm:@jsynowiec/pi-provider-logger
Using git:
pi install git:github.com/jsynowiec/pi-provider-logger
Development
npm run check # biome check --write --error-on-warnings src
npm run typecheck # tsc --noEmit
Logging failures (permissions, full disk, etc.) are caught and printed to stderr; they never abort the agent.