Platform AI
The keys and models every build on the installation runs on. Nothing works until this page is filled in, and this is where credit pricing is set.
/admin/ai holds the AI configuration the whole installation shares.
The keys and models Bookbag runs on — they power every user's builds, on the platform's bill. The starred default chat model is what runs unless a project pins its own.
Users who bring their own provider key bypass all of this. Everyone else builds on what is configured here, and their builds are charged in credits.
The status badge
At the top, beside the heading:
- Green, reading
<provider> · <model>— a usable model is configured. This is what builds run on. - Grey, reading "Not configured" — nothing usable. Every build on the installation will fail with a message naming this page.
Provider keys
Checked against the provider before they are stored, then encrypted. Only the last four characters are ever shown. Adding a key for a provider replaces the one it already has.
Four providers are supported:
| Provider | Key shape |
|---|---|
| OpenAI | sk-… |
| Anthropic | sk-ant-… |
| DeepSeek | sk-… |
| xAI (Grok) | xai-… |
Fill in Provider, an optional Label (e.g. Production key) and the API key, and press Add key. The key is tested against the provider before anything is stored. On success: Key verified and saved.
Each row then shows the provider, a hint of the key, its label, an active tick box and a delete button.
Two things to be careful of:
- One key per provider. Adding a second OpenAI key silently deletes the first.
- Deleting a key deletes every model for that provider, including ones you added by hand. With one key per provider there is nothing left to run them on.
Unticking active is the non-destructive way to take a provider out of service. The key and its models stay.
Failures: That API key was rejected by the provider. or The provider returned <status>.
Adding models
Browse what the provider offers right now. Models released after this app was built appear here on their own.
Choose a provider and press Browse models. Bookbag asks the provider what the key can reach and offers everything not already in your catalogue, each labelled by kind — Chat, Embedding, Speech to text, Text to speech, Realtime. Pick one and it is added.
If there is nothing new: Nothing new to add.
Capabilities are worked out from the model's name, because providers return names and not capabilities. Well-known families are recognised; anything unfamiliar is added as a plain chat model with no declared capabilities rather than hidden — better to surface a model that shipped after this code was written.
Add a custom model by identifier is the way in for a model that is not recognised, or one on a self-hosted server. Give the provider, the exact identifier and a display name. It is added as a chat model that supports tools — Bookbag takes you at your word.
The models table
| Column | What it is |
|---|---|
| Model | The display name. Click it and type to rename. |
| Provider | Which key it runs on. |
| Identifier | The provider's own name for it. |
| Capabilities | Up to three badges: Tools, Vision, Voice. |
| Credits/1k | The credit rate. Editable in place, 1 to 100. |
| Active | Whether it can be used at all. |
| Default | The star. One per kind. |
Tools are not optional
The starred default is what the builder runs — it must support tools, or it cannot read or write a file in the sandbox.
The builder works entirely by calling tools. A model without tool calling cannot read a file, cannot write one, and cannot build anything. If your active models all lack it, builds fail with:
The active models cannot call tools, so the builder cannot read or write a file. A platform admin can activate one that supports tools (GPT-4o or Claude Sonnet, for example) under Admin → Platform AI.
The star
Starring a model makes it the default for its kind, clears the star from every other model of that kind, and activates it — a default nobody can run is a trap.
Only chat models can be starred from the interface. Other kinds show the tooltip Defaults apply to chat models.
Credit pricing
Credits/1k is how many credits 1,000 weighted tokens cost. New models arrive at 1 and you set the real rate here — the field is ignored when a model is added, so a model you add always starts at 1 until you change it.
Use it to reflect the model's actual cost to you. A model three times the price of your baseline should be a 3. The full formula is in How a build spends credits.
Fields you cannot change
Renaming, activating, starring and pricing are the only edits. Provider, identifier, kind and capability flags are fixed once a model is added. If a model's capabilities were inferred wrongly, delete it and add it again by identifier with the right flags.
The warning at the bottom
If chat models exist but none is active:
No chat model is active, so the builder cannot call a model yet.
Platform key against a user's own key
A user's own key always wins. Concretely, when a build starts:
- If the user has an active, tool-capable chat model of their own with an active key for its provider, that is used, the run is unmetered and no credits are charged.
- If they have such a model but the key cannot be read, the build fails with a message telling them to re-add the key or deactivate their models. It does not fall back to the platform. Quietly spending platform credits while someone believed they were on their own key would be the worse outcome.
- Otherwise the platform's starred default is used, and the run is charged in credits.
Messages users see when this page is wrong
| Message | What to fix here |
|---|---|
| No models are configured yet. A platform admin can add a provider key and a model under Admin → Platform AI. | The catalogue is empty. |
| Models exist but none are switched on… | Tick Active on a chat model. |
| The active models cannot call tools… | Activate one with the Tools badge. |
No active <provider> API key is configured… |
The starred model's provider has no active key. |