LLM & Billing: choose a model and watch what it costs

    Rig uses a language model to read your warehouse, build context and answer questions. This page is where an owner decides whose model that is, and sees what it has cost.

    Where it is

    Open Settings and choose LLM & Billing in the Workspace group. The section is headed Language model, with Usage & cost below it.

    Only workspace owners see it in Settings, and only owners can change it. If it is missing from your Settings, an owner has to make any change for you. In a self-serve workspace, the same panel is also the Language model step of the setup wizard under Connections → Connectors. With the Manage connections permission you can see it there read-only, without the Change button, and before a model is set it asks you to have an owner pick one.

    If Rig set up your workspace and you see both options, ask Rig before choosing, so you don't replace the setup Rig made.

    Rig-hosted or your own key

    Rig has two options:

    • Use Rig-hosted LLM needs no key. Rig provisions a dedicated OpenAI project for your workspace, with its own keys, isolated from every other customer, and with do-not-train enforced. Click Provision dedicated keys to set it up.
    • Bring your own key runs Rig on your own provider account. Pick the Provider (OpenAI, Anthropic, Gemini, AWS Bedrock or Azure OpenAI), paste the key and click Save LLM choice. AWS Bedrock takes no single key: it asks for an AWS region, an AWS access key id and an AWS secret access key instead. Azure OpenAI asks for a Resource endpoint and an API version as well as the key.

    With an OpenAI, Anthropic or Gemini key, Default model (optional) can be left blank, and Rig then picks a model for each kind of task. AWS Bedrock needs a Bedrock model id and Azure OpenAI a Chat deployment name. Bedrock has no embeddings model, so Rig embeds on an OpenAI key: leave OpenAI embeddings key (optional) blank to use Rig's, or paste your own. For Azure OpenAI, set API version to one that supports the Responses API, 2025-03-01-preview or later. Older versions only support chat completions, and the tool calls Rig's chat relies on fail. Whichever option you choose, keys are stored in AWS Secrets Manager and never in Rig's database or logs.

    Rig checks the key before saving it
    When you save your own key, Rig calls the provider to confirm it works. If the provider rejects it, or it looks like a key for a different provider, nothing is saved and the message tells you why. For AWS Bedrock the check confirms the AWS credentials only, so a missing permission for the model shows up on the first question instead.

    A separate builder key

    With your own key you can tick Add a separate builder key (optional, recommended). Rig then builds context on that second key while live chat stays on the first, so building and chatting are metered separately. The builder key can be OpenAI, Anthropic or Gemini. The option does not appear when the main provider is AWS Bedrock or Azure OpenAI.

    Changing provider or key

    Click Change on the summary of your current choice, then pick an option again and save, as above. Change acts as soon as you click it, with no confirmation, so have the new key ready first:

    • It deletes the keys Rig has stored for you, including a builder key.
    • On Rig-hosted, it archives your dedicated provider project and revokes its keys. Choosing Rig-hosted again provisions new ones.
    • It clears any monthly spend cap Rig has set for your workspace, because the cap is stored with your provider choice. Ask Rig support to set it again.

    Swapping providers needs no re-sync of any data. Your sources and your context layer stay as they are.

    Usage and cost

    Usage & cost shows the tokens and cost of every model call the workspace makes. Switch between Today, Month and All; it opens on Month. Today starts at midnight UTC, and Month at midnight UTC on the 1st. The cards at the top give Total cost, Calls and Tokens (in / out), and two tables split the same figures By model and By agent, so you can see which part of Rig is doing the spending. Calls that failed or were refused are shown in red beside the count, as N failed, and are not included in it. Their tokens and cost still count, because the provider may have billed them. On a busy period the page may say Showing the most recent calls only — totals are capped for this period. The figures then cover only the most recent calls.

    Cost is Rig's estimate at the provider's list price, with cached prompt tokens at the provider's lower cached rate, so it can differ from your invoice if you have agreed other rates. When the published rates do not cover a model, such as an Azure deployment name, Rig prices it from its own table of model prices. A model with no known price still counts its tokens but shows its cost as $0.00. There is no spend cap to set on this page; if you want one, ask Rig support.

    When the model fails

    When the model provider refuses a call, the answer stops and Rig shows you the provider's own error. In a chat it is a red line that starts This turn ended with an error: Turn failed: and usually goes on with the type of error, such as RateLimitError, and then the provider's message. In Slack, @rig replies with Query failed: and the same text, then a line reading View details: followed by a link. Look for these words in the message:

    If the error mentionsWhat to do
    quota, insufficient_quota or credit balance is too lowThe provider account is out of credit. On your own key, top up the account with the provider or save a key that has credit. On Rig-hosted, contact Rig support.
    rate limit, rate_limit or 429Too many requests in a short time. Wait a minute and ask again. If it keeps happening on your own key, ask your provider for a higher limit.
    invalid_api_key or authenticationThe provider no longer accepts the key. On your own key, an owner saves a working key in LLM & Billing. On Rig-hosted, contact Rig support.
    overloaded, 502 or 503The provider is busy. Wait a moment and ask again.
    LLM monthly budget exceededYour workspace has spent its monthly cap, and Rig stops model calls until the next month starts (midnight UTC on the 1st). Ask Rig support to raise the cap.
    context_length_exceeded or maximum context lengthThe conversation has grown too long for the model. Start a new chat or ask a narrower question.

    A few places in Rig replace the provider's text with a shorter message, such as The AI provider key for this workspace was rejected — contact your Rig admin. Those mean the same as the matching row above.

    For a failed step in a data app, see When a data app run fails.

    Was this guide helpful?