# AI providers

> Add the AI service Corfedo AI answers with, test its credential, and set the limits and prices of its models.

Source: https://docs.corfedo.ai/workspace/ai/providers/

A provider is the AI service that answers members' questions, such as Anthropic or OpenAI. Each [profile](https://docs.corfedo.ai/workspace/ai/profiles/) answers with one provider and one of its models. Search and coding agents work without a provider.

## Before you begin

- You are a workspace administrator or have the **AI administrator** role.
- A credential from the provider's console. The setup page links to it.

## Add a provider

### Choose the service

Open **Settings** › **Providers** and select **Add provider**.

| Provider | Credential | Also asks for |
| --- | --- | --- |
| **Anthropic**, **OpenAI**, **DeepSeek**, **OpenRouter**, **Gemini API** | An API key | |
| **OpenAI-compatible**, such as vLLM or LiteLLM | A key your endpoint accepts. Endpoints without keys accept any value. | **Base URL**, the address that ends before `/chat/completions` |
| **Amazon Bedrock** | A Bedrock API key, or the access key of an IAM user that may call and list Bedrock models | **Region** and **Models** |
| **Microsoft Foundry** | The resource's API key, or an application with the Cognitive Services User role on the resource | **Resource** and **Models** |
| **Google Vertex AI** | A JSON key of a service account with the Vertex AI User role | **Project ID**, **Location** and **Models** |

Under **Models**, choose **Claude models**, **OpenAI GPT models** or **Other models** (Vertex AI offers **Gemini models** or **Claude models**). Add another provider for another choice.

### Save and test

Enter a **Name** and the credential, and select **Save and test**. The test checks the credential and lists the models without spending tokens.

**Check:** the provider shows **Working** and lists its models under **Models, limits and prices**. Microsoft Foundry and Google Vertex AI list no models, so profiles name a deployment or model ID instead.

Select **Create profile** next so members can ask questions with it.

## Set limits and prices

Under **Models, limits and prices**, select **Add limits** or **Add price**. For Microsoft Foundry and Google Vertex AI, enter the deployment or model ID your profiles use. Each model can have:

- **Limits**: the context window and the longest reply in tokens. Without them Corfedo assumes 128,000 and 8,192 tokens. Set them for a model with a larger window, so long conversations are not summarized early.
- **Price per million tokens**: what this workspace pays for input, output, cache reads and writes and reasoning, with up to 4 tiers by input size. [Spending limits](https://docs.corfedo.ai/workspace/ai/spending-limits/) and a profile's cost cap need a price for every model they cover.

Prices are in US dollars and only used to count spend. Corfedo does not bill.

## Change or remove a provider

| Action | Effect |
| --- | --- |
| **Replace** the credential | New answers use the new one. Select **Test again** afterwards. |
| **Disable** | Profiles that use the provider cannot answer until it is enabled again. Answers in progress stop at their next step. |
| **Delete provider** | Removes it. Delete or change the profiles that use it first. |

## Troubleshooting

| What you see | Why | What to do |
| --- | --- | --- |
| **Test failed**: the provider rejected the API key | The key is wrong, expired or lacks access | Create a new key, select **Replace**, then **Test again** |
| The provider could not be reached | The address is wrong, or the installation cannot reach the provider | Check the address. Tell whoever runs Corfedo if the network blocks it. |
| This deployment does not allow calls to this address | The installation only allows calls to some addresses | Tell whoever runs Corfedo |
| The provider is limiting requests | Rate limit at the provider | Test again later |

A failed test does not stop answers. Profiles keep trying the provider.

## Related

- [AI profiles](https://docs.corfedo.ai/workspace/ai/profiles/) choose the model and tools members use.
