ai-provider-helper
v14.2.0
Published
Local AI helper for the AI Provider Library Foundry VTT module. Loopback proxy on 8090/8091: key vault, OAuth device flows, provider probes, chat, vision, and image calls.
Readme
AI Provider Helper runs on your computer alongside Foundry. It keeps the keys, connects to providers, and serves the AI tools used by modules such as Hex Atlas Survey and Imaginary Tiles. The AI Provider Library connects those modules to this helper. Start it before opening their AI tools and leave its window running while you play.
The helper listens on your computer rather than exposing your keys through the Foundry host. It uses two local ports:
- 8090 app: health, catalog, vault, OAuth, probes, chat, vision, images
- 8091 control: start/stop/status
The Foundry tab does not contact AI providers directly. For the exact HTTP contract and security model, see the server reference.
Get started
Windows
- Open the latest GitHub release.
- Download AI-Helper-windows.zip.
- Unzip it anywhere you like.
- Double-click AI Helper.bat and leave the window open.
If Foundry is hosted on The Forge, Molten, Foundry Server, or another service, run AI Helper (hosted).bat instead. The helper guide covers that setup.
macOS, Linux, and command-line users
Needs Python 3.11+ on PATH (or APL_PYTHON pointing at it). First run
creates a venv inside the package and installs requirements:
npx ai-provider-helper
# options
npx ai-provider-helper --port 8090 --ctl-port 8091 --hosted--hosted adds CORS for Forge-class hosts. Ctrl+C stops both servers.
From a checkout
cd backend
uv venv && uv pip install -r requirements.txt
uv run uvicorn app.main:app --host 127.0.0.1 --port 8090Linux systemd units: dev/install-backend.sh in the module repo, or run the
control server as a child like the npm entry does.
For contributors
Build the Windows zip with:
python companion/pack_windows.pyProduces companion/dist/AI-Helper-windows.zip: embeddable CPython, the
backend, and the launchers. No PATH, no venv dance for the GM.
Run tests with:
cd backend && pytestNo live provider spend.
Safety
- Loopback bind by default. No
0.0.0.0until v2 has a control token. - Hosted CORS only for the explicit origin list, never
*. /v1/fetch-imagerejects localhost,0.0.0.0,::1, and*.local.- Vault keys are AES-256-GCM at rest, token files are mode
0600. - Keys are never logged and never returned to consumers.
