> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentsfleet.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Use your own model provider

> Store a model-provider credential and run fleets on it instead of the platform default.

# Use your own model provider

## What this does

Fleets run on the platform's model by default. Your tenant can run them on a model you pay for instead. Store a provider credential in the workspace vault, then select it as the tenant provider.

`--provider` is checked against the model catalogue your server serves, so a
credential that could never work is never stored. Run `agentsfleet models` to
see that catalogue — the dashboard's model picker reads the same one.

## Before you begin

Select the workspace that should own the credential. Have the provider's API
key ready, and run `agentsfleet models` to pick a provider id and model this
server serves:

```bash theme={"theme":"vesper"}
agentsfleet models --provider anthropic
```

```text theme={"theme":"vesper"}
PROVIDER   MODEL              CONTEXT  IN/MTOK  OUT/MTOK
anthropic  claude-fable-5     1000k    $10.00   $50.00
anthropic  claude-haiku-4-5   200k     $1.00    $5.00
anthropic  claude-opus-4-8    1000k    $5.00    $25.00
anthropic  claude-sonnet-5    1000k    $3.00    $15.00
```

The provider column supplies `--provider` and the model column supplies
`--model` in the next step.

## Steps

1. Store the provider credential. The provider id, API key, and model are all required.

   ```bash theme={"theme":"vesper"}
   agentsfleet secret create my-openai --provider openai --api-key sk-... --model gpt-5.6-sol
   ```

   ```text theme={"theme":"vesper"}
   ✓ Secret 'my-openai' stored in vault.
   ```

   Provider ids are matched without case: `--provider Anthropic` stores
   `anthropic`, the catalogue's own spelling. A provider the catalogue does not
   price is refused, and the message names what it does price.

   `--model` is checked the same way, against that provider's models only.
   Model ids are matched exactly — they belong to the provider, and several are
   case-sensitive (`MiniMaxAI/MiniMax-M3`), so a wrong-case model is refused
   rather than silently corrected.

2. Select the stored credential as the tenant provider.

   ```bash theme={"theme":"vesper"}
   agentsfleet tenant provider create --secret my-openai
   ```

   ```text theme={"theme":"vesper"}
   Tenant provider added: mode=self_managed secret=my-openai
   ```

3. Confirm the active provider.

   ```bash theme={"theme":"vesper"}
   agentsfleet tenant provider show
   ```

   ```text theme={"theme":"vesper"}
   FIELD               VALUE
   mode                self_managed
   provider            openai
   model               gpt-5.6-sol
   context_cap_tokens  <varies>
   secret_ref          my-openai
   ```

Fleets you install or resume after this point run on your provider.

## Point at your own endpoint

A gateway or self-hosted server that speaks the OpenAI API takes the `openai-compatible` form. `--base-url` must be `https`; a plain `http` URL is refused before any request. The API key is optional, because some private gateways take none.

```bash theme={"theme":"vesper"}
agentsfleet secret create my-gateway --provider openai-compatible \
  --base-url https://vllm.corp.example/v1 --model qwen2.5-coder --api-key sk-...
```

```text theme={"theme":"vesper"}
✓ Secret 'my-gateway' stored in vault.
```

## Verify it works

Run `agentsfleet tenant provider show` and check it names your secret. Then steer any fleet; its responses now come from your provider, and its usage lands on your provider account.

## Common problems

A `--provider` value your catalogue does not price is refused, and the message
names what it does price. Run `agentsfleet models` for the full list. To use a
provider the catalogue does not carry, point at it directly:
`--provider openai-compatible --base-url https://host/v1 --model <MODEL>`.

The ids `claude-cli`, `codex-cli`, `gemini-cli`, `openai-codex`, and
`claude-code` are refused with their own message. They name local coding tools
that carry no API key, so a stored credential could never reach them. The
`openai-compatible` form does not help here — these tools have no endpoint.

`--api-key` or `--model` without `--provider` is refused. The three flags describe one credential and travel together.

A `--model` the provider does not serve is refused, and the message lists that
provider's models. Run `agentsfleet models --provider <ID>` for the list.

`--base-url` with a named provider is refused. A named provider carries its own endpoint; the flag belongs to `openai-compatible` alone.

## Remove or undo

Return to the platform default:

```bash theme={"theme":"vesper"}
agentsfleet tenant provider delete
```

```text theme={"theme":"vesper"}
Custom LLM provider removed — events will now run on agentsfleet's platform default.
```

The stored credential stays in the vault. Delete it with `agentsfleet secret delete my-openai` when no fleet needs it.

## Related pages

* [Manage secrets](/fleets/secrets)
* [Install a fleet](/fleets/install)
