Problem
Users behind a corporate proxy or an LLM gateway (Cloudflare AI Gateway, LiteLLM, Portkey, …) need generate and the live Q&A to reach their provider through a custom base URL instead of the vendor's default endpoint. Today nothing in balade's docs says whether that is possible, and the only known workaround is a network-level rewrite.
What likely already works
Balade's Pi state directory (~/.balade/pi/) includes models.json, and Pi's ModelConfig schema (@earendil-works/pi-coding-agent, core/model-config) accepts an optional baseUrl on both provider configs and model overrides. If that path works end to end with an API-key provider, the feature exists and is merely undocumented.
Proposal
- Verify: point an Anthropic or OpenAI API-key provider at a proxy via
~/.balade/pi/models.json baseUrl and run generate.
- Document the working shape in the README (or
docs/), including where the file lives and that OAuth subscription providers are out of scope for rerouting.
- If per-invocation override matters in practice (CI), consider surfacing it without editing the state file — an env var or a library
generate option — as a follow-up decision, not part of this issue.
Out of scope
- Any change to provider auth flows.
- Rerouting subscription OAuth providers.
Problem
Users behind a corporate proxy or an LLM gateway (Cloudflare AI Gateway, LiteLLM, Portkey, …) need
generateand the live Q&A to reach their provider through a custom base URL instead of the vendor's default endpoint. Today nothing in balade's docs says whether that is possible, and the only known workaround is a network-level rewrite.What likely already works
Balade's Pi state directory (
~/.balade/pi/) includesmodels.json, and Pi'sModelConfigschema (@earendil-works/pi-coding-agent,core/model-config) accepts an optionalbaseUrlon both provider configs and model overrides. If that path works end to end with an API-key provider, the feature exists and is merely undocumented.Proposal
~/.balade/pi/models.jsonbaseUrland rungenerate.docs/), including where the file lives and that OAuth subscription providers are out of scope for rerouting.generateoption — as a follow-up decision, not part of this issue.Out of scope