Skip to content

This guide shows you how to connect Sluice to a model provider. The provider powers three features: the assistant panel, flow authoring in the assistant, and failure triage. The MCP server at /mcp does not need a provider.

  • You have the admin role. Only an admin can change the provider and the global secrets.
  • You have an API key of the provider, and the ID of the model that you want to use.
  • The server has SLUICE_MASTER_KEYS, so that it can store a builtin secret. A secret from another provider, for example Vault, also works.
  1. Store the API key as a global secret.

    Open Secrets and click Add secret. Enter a key, for example ANTHROPIC_API_KEY. Keep the provider builtin, paste the API key into Value, and save. The page never shows the value again.

  2. Open Settings → AI provider.

  3. Fill in the fields of the provider:

    Field Value
    Type Anthropic
    Base URL Empty. Sluice uses https://api.anthropic.com.
    Model The model ID from the model list of Anthropic.
    API key secret key ANTHROPIC_API_KEY
  4. Click Save. The Status row changes to a green badge.

  5. Click Test provider. Sluice sends one short request. The page shows “The provider answered.” or the error of the provider.

  6. Click Assistant at the bottom right of any page, and ask a question about your flows.

  • An empty base URL uses the default URL of the type.
  • A base URL must use https://.
  • Plain http:// works only for a loopback host: localhost, 127.0.0.1 or ::1.
  • A base URL cannot hold a user name or a password.

The Sluice server sends the requests, not the browser. A loopback host thus means the host of the server. When Sluice runs in a container, localhost is the container itself.

Under Failure triage, select Triage failed and timed out executions automatically, then click Save. Sluice then queues a triage when an execution ends FAILED or TIMED_OUT. Without this option, an operator clicks Triage on the execution page.

Every instance takes queued triages. A triage has 3 minutes. See Triage a failed execution.

SLUICE_AI_MAX_CONTEXT_CHARS limits the characters of one triage request. The default is 120000, and the minimum is 1000. A smaller value costs less per triage and keeps fewer log lines. Set the same value on all instances.

Case Result
The provider answers 429 or 5xx, or the network fails Sluice tries 3 times in total, 0.5 and 1 second apart. Then the feature shows the error.
The API key secret does not resolve The operation answers 409 ai_key_unavailable. Test provider shows the message.
No provider exists The UI hides the assistant and the triage card. The AI operations answer 409 ai_disabled. MCP still works.

GET /api/v1/ai/status tells a client whether AI is on and whether triage is automatic.

On Settings → AI provider, click Remove, then confirm. The UI hides the AI features again. The global secret stays. Delete it on Secrets when you no longer need it.