Skip to main content

What this does

Store your provider credential, then select it as your account’s default model. A fleet keeps the model reference saved in its setup. Your provider bills model usage. Setup chat offers models configured for your workspace owner and the enabled platform default.

Before you begin

Select the workspace that will own the credential. Have your provider’s API key ready, then list available models:
Copy <PROVIDER_ID> from PROVIDER and <MODEL_ID> from MODEL. Replace the fake API key below with your provider’s key. Add --advanced to include advanced models. Rates and context limits are exact; --json also includes price tiers, effective dates, and source evidence. A platform administrator must configure the model under Platform → Model library before you use it. Its settings define the API format, secure HTTP (HTTPS) endpoint, context window, and maximum output tokens. Supported formats are OpenAI-compatible chat, OpenAI Responses, Anthropic Messages, Google Gemini, and Ollama. Output tokens must be positive and fit within the context window.

Steps

  1. Store the provider credential. The provider id, API key, and model are all required.
    Provider identifiers ignore case. Model identifiers must match the catalogue exactly, including case.
  2. Select the stored credential for your account.
  3. Confirm the active provider.
New setup reviews resolve your account default unless the Definition selects a model. Check Runtime model in the review before saving. Changing the account default does not replace an existing fleet’s saved model reference. To change that reference, choose Edit setup in the fleet header. Update the model in the chat, then review and save the setup.

Point at your own endpoint

For a custom gateway, use openai-compatible. Ask an administrator to configure the matching provider and model in the Model library first. Copy <MODEL_ID> from that configuration. Replace the example URL with the configured HTTPS base URL. Private or unsafe destinations are refused.

Verify it works

Check that agentsfleet tenant provider show names your secret. Before testing a fleet, review its setup and confirm Runtime model uses your selected model reference. Save the updated setup if it still names the previous model. Send that fleet a message with agentsfleet steer <FLEET_ID>, using an identifier from agentsfleet list. Check the response and usage in your provider account.

Common problems

A saved key can expire or be revoked. If setup chat reports UZ-AUTHOR-008 after a credential rejection, replace the key or select another model. The rejected reply fails without requiring Stop. If the provider outcome is uncertain, follow setup-chat recovery. An unknown provider or model returns the accepted values. Run agentsfleet models --provider <PROVIDER_ID> to check your choice. Ask an administrator to add a missing model and its inference settings. Local coding tools such as claude-cli, codex-cli, gemini-cli, openai-codex, and claude-code cannot serve as model providers. They have no model API endpoint to connect to. --api-key or --model without --provider is refused. For openai-compatible, the API key is optional and the model identifier comes from your endpoint. --base-url with a named provider is refused. Named providers use the endpoint saved in the Model library. The flag belongs to openai-compatible alone.

Remove or undo

Return to the platform default:
The stored credential stays in the vault. Delete it with agentsfleet secret delete my-model after removing its model registry entries. Deletion fails with UZ-VAULT-004 while an entry still references the secret.