@stagefright5/pi-provider-url-logger
Log the provider, model, and base URL selected for pi provider requests
Package details
Install @stagefright5/pi-provider-url-logger from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@stagefright5/pi-provider-url-logger- Package
@stagefright5/pi-provider-url-logger- Version
0.1.1- Published
- Sep 22, 2026
- Downloads
- 120/mo · 3/wk
- Author
- stagefright5
- License
- Unlicense
- Types
- extension
- Size
- 4.2 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
Provider URL Logger
Most of this extension was written with the pi agent CLI.
Records which provider endpoint pi selects for each request.
Back to the extension workspace
Logged data
Each before_provider_request event appends one line in this format:
2026-07-15T12:58:12.345Z provider/model-id https://provider.example/v1
The fields are:
- UTC timestamp in ISO 8601 format
- provider name and model ID
- the model's configured base URL
The extension does not log prompts, response content, request payloads, headers, or API keys.
Log file
The extension appends entries to:
~/.pi/agent/provider-urls.log
The file is never truncated or rotated automatically. Remove or rotate it yourself if it grows too large. A base URL may still reveal private infrastructure or query parameters, so treat the log as potentially sensitive.
Installation
Install the standalone package:
pi install npm:@stagefright5/pi-provider-url-logger
For source development, load this directory with pi -e ./extensions/provider-url-logger or expose it through the workspace's development symlink. Run /reload after source changes.
Limitations
- Logging is synchronous and occurs immediately before provider request handling.
- If the log cannot be opened or written, pi reports the extension hook error and continues according to pi's extension error handling.
- There is no command, filter, retention policy, or automatic redaction of the configured base URL.