>

pi byok forge

// generate BYOK config for the Pi coding agent

⊞ all tools
01

provider

set provider id, api, endpoint
Presets set base URL, API type and defaults. Choose custom for your own endpoint.
Used in model selectors as providerId/modelId (or via --provider / --model).
Wire protocol pi should speak: Chat Completions, Responses, or Anthropic Messages.
API endpoint URL. Ollama example: http://localhost:11434/v1.
Value resolution: $ENV_VAR or ${ENV_VAR} interpolation, a literal, or keep ollama placeholder for keyless servers.
02

model

model id + optional limits
Sent to the API as-is; select via pi --provider <id> --model <id> or /model.
⟂
⟂
Defaults: contextWindow 128000, maxTokens 16384. Set explicit values to help pi budget correctly.
03

target

where to write config
Default is ~/.pi/agent/models.json; Pi reloads it every time you open /model — no restart needed.

models.json

models.json

          

run with CLI

shell snippet

          
本工具由 Will 保哥的技術交流中心 設計、開發與維護
copied ✓