> ## Documentation Index
> Fetch the complete documentation index at: https://ai-kb.automationanywhere.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Predefined and Custom Models

> Configure LLM models for your agents - use default models or bring your own API keys

EKB not only brings you the latest and most popular models available, we enable you to connect to your own custom model with our "Bring Your Own Keys" (BYOK) feature. This gives you the ability to create custom Agents and test how they respond or complete the tasks you give them so that you can use the LLM that produces the best results for your use case. In this article you'll learn about the different LLMs that are available and how to connect your own custom LLM to your Agents.

Your agents can use two types of models:

<CardGroup cols={2}>
  <Card title="Predefined Models" icon="sparkles">
    Pre-configured models available to all users — no API key required.
  </Card>

  <Card title="Custom Models (BYOK)" icon="key">
    Models you configure with your own API keys for full cost control and flexibility.
  </Card>
</CardGroup>

## Predefined Models

Predefined models are available by default and don't require API key configuration. These models are managed by EKB and are ready to use.

EKB provides access to a wide range of models from leading AI providers, including OpenAI, Anthropic, Google AI, and more. The full list of available models is displayed in the model selector when configuring your agent.

### Available Models by Provider

All available models are visible in the model selector dropdown when configuring your agent. Models are organized by provider and show their cost, capabilities, and availability status.

| Model                          | Provider  | Version                                     | Credits / 1M Input | Credits / 1M Output | Deprecation                  |
| ------------------------------ | --------- | ------------------------------------------- | ------------------ | ------------------- | ---------------------------- |
| [**Hoshi 1.0**](/agents/hoshi) | Shogo     | `hoshi-1.0`                                 | 150                | 300                 | N/A                          |
| **Haiku 4.5**                  | Anthropic | `claude-haiku-4-5-20251001`                 | 1,000              | 5,000               | Not sooner than Oct 15, 2026 |
| **Sonnet 4.5**                 | Anthropic | `claude-sonnet-4-5-20250929`                | 3,000              | 15,000              | Not sooner than Sep 29, 2026 |
| **Sonnet 4.6**                 | Anthropic | `claude-sonnet-4-6`                         | 3,000              | 15,000              | Not sooner than Feb 17, 2027 |
| **Sonnet 5**                   | Anthropic | `claude-sonnet-5`                           | 2,000              | 10,000              | N/A                          |
| **DeepSeek Chat**              | DeepSeek  | `deepseek-chat`                             | 140                | 280                 | Jul 24, 2026                 |
| **Gemini 2.5 Flash**           | Google AI | `gemini-2.5-flash`                          | 300                | 2,500               | Oct 16, 2026                 |
| **Gemini 3.1 Flash-Lite**      | Google AI | `gemini-3.1-flash-lite`                     | 250                | 1,500               | May 7, 2027                  |
| **Gemini 3.5 Flash**           | Google AI | `gemini-3.5-flash`                          | 1,500              | 9,000               | N/A                          |
| **Llama 4 Scout**              | Groq      | `meta-llama/llama-4-scout-17b-16e-instruct` | 80                 | 300                 | Jul 17, 2026                 |
| **GPT 4o**                     | OpenAI    | `gpt-4o`                                    | 2,500              | 10,000              | Oct 23, 2026                 |
| **GPT 4o Mini**                | OpenAI    | `gpt-4o-mini`                               | 150                | 600                 | N/A                          |
| **GPT 4.1**                    | OpenAI    | `gpt-4.1-2025-04-14`                        | 2,000              | 8,000               | N/A                          |
| **GPT 4.1 Mini**               | OpenAI    | `gpt-4.1-mini-2025-04-14`                   | 400                | 1,600               | N/A                          |
| **GPT 4.1 Nano**               | OpenAI    | `gpt-4.1-nano-2025-04-14`                   | 100                | 400                 | Oct 23, 2026                 |
| **GPT 5**                      | OpenAI    | `gpt-5`                                     | 1,250              | 10,000              | Dec 11, 2026                 |
| **GPT 5 Mini**                 | OpenAI    | `gpt-5-mini`                                | 250                | 2,000               | Dec 11, 2026                 |
| **GPT 5 Nano**                 | OpenAI    | `gpt-5-nano`                                | 50                 | 400                 | Dec 11, 2026                 |
| **GPT 5.1**                    | OpenAI    | `gpt-5.1`                                   | 1,250              | 10,000              | N/A                          |
| **GPT 5.2**                    | OpenAI    | `gpt-5.2`                                   | 1,750              | 14,000              | N/A                          |
| **GPT 5.4**                    | OpenAI    | `gpt-5.4-2026-03-05`                        | 2,500              | 15,000              | N/A                          |
| **GPT 5.4 Mini**               | OpenAI    | `gpt-5.4-mini-2026-03-17`                   | 750                | 4,500               | N/A                          |
| **GPT 5.4 Nano**               | OpenAI    | `gpt-5.4-nano-2026-03-17`                   | 200                | 1,250               | N/A                          |
| **GPT 5.5**                    | OpenAI    | `gpt-5.5`                                   | 5,000              | 30,000              | N/A                          |
| **GPT 5.6 Terra**              | OpenAI    | `gpt-5.6-terra`                             | 2,500              | 15,000              | N/A                          |
| **o3 Mini**                    | OpenAI    | `o3-mini`                                   | 1,100              | 4,400               | Oct 23, 2026                 |

### Model Selection

<Steps>
  <Step title="Navigate to Agents">
    Go to **Agents** in the sidebar.
  </Step>

  <Step title="Open an agent">
    Create a new agent or select an existing one.
  </Step>

  <Step title="Go to the General tab">
    Open the **General** tab in the agent configuration.
  </Step>

  <Step title="Select a model">
    Find the **Model** drop-down selector next to the agent's name and select a predefined model from the dropdown.
  </Step>
</Steps>

### Model Information

Each predefined model shows:

| Field           | Description                                                 |
| --------------- | ----------------------------------------------------------- |
| **Model Name**  | Display name (e.g., "GPT 4o")                               |
| **Provider**    | API provider (OpenAI, Anthropic, Google AI, DeepSeek, Groq) |
| **Cost**        | Credits per 1M input and output tokens                      |
| **Deprecation** | Tentative retirement or deprecation date                    |

## Custom Models (BYOK)

Bring Your Own Key (BYOK) allows you to configure custom models using your own API keys. This gives you:

<CardGroup cols={2}>
  <Card title="Cost Control" icon="circle-dollar-to-slot">
    Use your own API keys and billing.
  </Card>

  <Card title="Model Flexibility" icon="sliders">
    Access models not available in the predefined list.
  </Card>

  <Card title="Custom Endpoints" icon="link">
    Connect to private or custom model endpoints.
  </Card>

  <Card title="Provider Choice" icon="building">
    Use any compatible API provider.
  </Card>
</CardGroup>

### Supported Providers

<AccordionGroup>
  <Accordion title="OpenAI">
    Supports standard OpenAI API models, Azure OpenAI endpoints, and custom OpenAI-compatible endpoints.

    | Field          | Value                                 |
    | -------------- | ------------------------------------- |
    | **API Key**    | Your OpenAI API key                   |
    | **API URL**    | `https://api.openai.com/v1` (default) |
    | **Model Name** | e.g., `gpt-4`, `gpt-3.5-turbo`        |
  </Accordion>

  <Accordion title="Anthropic">
    Supports Claude models via Anthropic API and custom Anthropic-compatible endpoints.

    | Field          | Value                                 |
    | -------------- | ------------------------------------- |
    | **API Key**    | Your Anthropic API key                |
    | **API URL**    | `https://api.anthropic.com` (default) |
    | **Model Name** | e.g., `claude-sonnet-4-6`             |
  </Accordion>

  <Accordion title="Google AI">
    Supports Gemini models via Google AI API and custom Google AI endpoints.

    | Field          | Value                                                  |
    | -------------- | ------------------------------------------------------ |
    | **API Key**    | Your Google AI API key                                 |
    | **API URL**    | `https://generativelanguage.googleapis.com/` (default) |
    | **Model Name** | e.g., `gemini-2.5-flash`                               |
  </Accordion>

  <Accordion title="OpenRouter">
    Provides access to multiple model providers through a unified API for various models.

    | Field          | Value                             |
    | -------------- | --------------------------------- |
    | **API Key**    | Your OpenRouter API key           |
    | **API URL**    | OpenRouter endpoint               |
    | **Model Name** | Any model available on OpenRouter |
  </Accordion>

  <Accordion title="AWS Bedrock">
    Supports Amazon Bedrock models and various foundation models.

    | Field               | Value                    |
    | ------------------- | ------------------------ |
    | **AWS Credentials** | Configured separately    |
    | **API URL**         | Bedrock endpoint         |
    | **Model Name**      | Bedrock model identifier |
  </Accordion>

  <Accordion title="Custom Endpoints">
    Supports any OpenAI-compatible API endpoint, including private deployments and self-hosted models.

    | Field          | Value                             |
    | -------------- | --------------------------------- |
    | **API Key**    | Your custom API key (if required) |
    | **API URL**    | Your custom endpoint URL          |
    | **Model Name** | Your model identifier             |
  </Accordion>
</AccordionGroup>

## Adding Custom Models

<Steps>
  <Step title="Navigate to Agents">
    Go to **Agents** in the sidebar.
  </Step>

  <Step title="Open an agent">
    Create a new agent or select an existing one to edit.
  </Step>

  <Step title="Go to the Settings tab">
    Open the **Settings** tab in the agent configuration.
  </Step>

  <Step title="Open Custom Models">
    Scroll to the **Custom Models** section and click **+Add Model**.
  </Step>

  <Step title="Fill in the model details">
    The model configuration modal will open. Enter the following:

    | Field                   | Description                                                                                                        |
    | ----------------------- | ------------------------------------------------------------------------------------------------------------------ |
    | **Model Name**          | The exact model name as recognized by the API (e.g., `gpt-4`, `claude-sonnet-4-6`)                                 |
    | **Model Provider**      | Select the provider from the dropdown (OpenAI, Anthropic, Azure, Google AI, OpenRouter, AWS Bedrock, Custom, etc.) |
    | **API Key**             | Your API key for the selected provider. Stored securely.                                                           |
    | **API URL**             | The API endpoint URL                                                                                               |
    | **Timeout**             | Timeout for API requests. Default is 300s. Increase for long-running reasoning models.                             |
    | **Max Input Tokens**    | Maximum input tokens. Default is 3000. Adjust based on your model's capabilities.                                  |
    | **Max Response Tokens** | Maximum response tokens. Default is 1000. Adjust based on your needs and model limits.                             |
  </Step>

  <Step title="Create the model">
    Click **Create**. EK will validate the API connection and model configuration. If successful, the model will be saved and available for use in your agents.
  </Step>
</Steps>

## Using Custom Models

### Selecting a Custom Model

<Steps>
  <Step title="Open the General tab">
    In the agent editor, go to the **General** tab and find the **Model** section.
  </Step>

  <Step title="Choose your custom model">
    The dropdown shows both predefined and custom models. Custom models are marked or shown in a separate section. Select your custom model.
  </Step>
</Steps>

<Note>
  Custom models are **project-specific**. They are available to all agents in the project, and each project can have its own set of custom models.
</Note>

## Managing Custom Models

<AccordionGroup>
  <Accordion title="Viewing Custom Models">
    1. Go to **Agents** → **Edit Agent** → **General** tab.
    2. Click the **Custom** tab in the AI Models section.
    3. See all your custom models listed.
  </Accordion>

  <Accordion title="Editing Custom Models">
    1. Find the model in the Custom models list.
    2. Click the **Edit** icon (three dots menu).
    3. Modify configuration settings.
    4. Click **Save** to update.

    <Warning>
      Editing the API key will replace the existing key. Make sure you have the correct key before saving.
    </Warning>
  </Accordion>

  <Accordion title="Deleting Custom Models">
    1. Find the model in the Custom models list.
    2. Click the **Delete** icon (three dots menu).
    3. Confirm deletion.
    4. The model is removed from your project.

    <Warning>
      Deleting a custom model will affect all agents using that model. Make sure to update those agents first.
    </Warning>
  </Accordion>
</AccordionGroup>

## Model Configuration Examples

<CodeGroup>
  ```json OpenAI Custom Model theme={null}
  {
    "model_name": "My GPT-4",
    "version": "gpt-4",
    "api_provider": "openai",
    "api_type": "openai",
    "api_key": "sk-...",
    "api_url": "https://api.openai.com/v1",
    "max_input_tokens": 60000,
    "max_response_tokens": 4096
  }
  ```

  ```json Azure OpenAI theme={null}
  {
    "model_name": "Azure GPT-4",
    "version": "gpt-4",
    "api_provider": "openai",
    "api_type": "azure",
    "api_key": "your-azure-key",
    "api_url": "https://your-resource.openai.azure.com",
    "api_version": "2024-12-01-preview",
    "max_input_tokens": 60000,
    "max_response_tokens": 4096
  }
  ```

  ```json Anthropic Claude theme={null}
  {
    "model_name": "Company Claude",
    "version": "claude-sonnet-4-6",
    "api_provider": "anthropic",
    "api_type": "anthropic",
    "api_key": "sk-ant-...",
    "api_url": "https://api.anthropic.com",
    "max_input_tokens": 60000,
    "max_response_tokens": 4000
  }
  ```

  ```json Custom Endpoint theme={null}
  {
    "model_name": "Private Model",
    "version": "custom-model-v1",
    "api_provider": "custom",
    "api_type": "custom",
    "api_key": "your-custom-key",
    "api_url": "https://your-custom-endpoint.com/v1",
    "max_input_tokens": 100000,
    "max_response_tokens": 8000,
    "auth_header_template": "{\"Authorization\": \"Bearer <API_KEY>\"}"
  }
  ```
</CodeGroup>

## Best Practices

<AccordionGroup>
  <Accordion title="API Key Security">
    * **Never Share Keys** - Keep API keys confidential
    * **Use Environment Variables** - For development, use secure storage
    * **Rotate Keys Regularly** - Update keys periodically
    * **Monitor Usage** - Track API usage to detect issues
  </Accordion>

  <Accordion title="Model Selection">
    * **Match Use Case** - Choose models appropriate for your task
    * **Consider Cost** - Balance performance and cost
    * **Test Performance** - Evaluate model quality for your needs
    * **Monitor Limits** - Watch token limits and quotas
  </Accordion>

  <Accordion title="Configuration">
    * **Accurate Model Names** - Use exact model identifiers
    * **Correct URLs** - Verify API endpoint URLs
    * **Appropriate Limits** - Set realistic token limits
    * **Test Connections** - Verify model connectivity
  </Accordion>

  <Accordion title="Cost Management">
    * **Track Usage** - Monitor API usage and costs
    * **Set Budgets** - Configure spending limits if available
    * **Optimize Tokens** - Use appropriate token limits
    * **Review Regularly** - Audit model usage periodically
  </Accordion>
</AccordionGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Model Not Available — Custom model doesn't appear in dropdown">
    **Possible causes:**

    * Model not saved correctly
    * API key invalid
    * Model configuration error

    **Solutions:**

    * Verify model was saved successfully
    * Check API key is correct
    * Review model configuration
    * Refresh the page
  </Accordion>

  <Accordion title="API Key Errors — Invalid API key or authentication errors">
    **Possible causes:**

    * Incorrect API key
    * Expired API key
    * Wrong API provider selected
    * Key doesn't have required permissions

    **Solutions:**

    * Verify API key is correct
    * Check key hasn't expired
    * Confirm correct provider selected
    * Ensure key has necessary permissions
  </Accordion>

  <Accordion title="Connection Failures — Cannot connect to model endpoint">
    **Possible causes:**

    * Incorrect API URL
    * Network connectivity issues
    * Endpoint not accessible
    * Firewall blocking connection

    **Solutions:**

    * Verify API URL is correct
    * Check network connectivity
    * Ensure endpoint is accessible
    * Review firewall rules
  </Accordion>

  <Accordion title="Token Limit Errors — Token limit exceeded">
    **Possible causes:**

    * Input too long
    * Response limit too high
    * Model limits exceeded

    **Solutions:**

    * Reduce input length
    * Lower max response tokens
    * Check model's actual limits
    * Split large inputs
  </Accordion>
</AccordionGroup>

## Model Compatibility

<Warning>
  When using Knowledge Base v2, only **OpenAI** (openai, azure) and **Anthropic** models are supported. Other providers are not compatible with Knowledge Base v2.
</Warning>

Different models support different features:

| Feature              | Supported Models                          |
| -------------------- | ----------------------------------------- |
| **Streaming**        | Most models                               |
| **Function Calling** | OpenAI and Anthropic models               |
| **Vision**           | GPT-4o, Claude 4 Sonnet, Gemini 2.5 Flash |
| **Long Context**     | Claude Sonnet 4.6, GPT 4.1                |

## API Key Management

### Getting API Keys

<AccordionGroup>
  <Accordion title="OpenAI">
    1. Go to [OpenAI Platform](https://platform.openai.com).
    2. Navigate to **API Keys**.
    3. Create a new secret key.
    4. Copy the key (starts with `sk-`).
  </Accordion>

  <Accordion title="Anthropic">
    1. Go to [Anthropic Console](https://console.anthropic.com).
    2. Navigate to **API Keys**.
    3. Create a new key.
    4. Copy the key (starts with `sk-ant-`).
  </Accordion>

  <Accordion title="Google AI">
    1. Go to [Google AI Studio](https://makersuite.google.com/app/apikey).
    2. Create a new API key.
    3. Copy the key.
  </Accordion>

  <Accordion title="OpenRouter">
    1. Go to [OpenRouter](https://openrouter.ai).
    2. Navigate to **Keys**.
    3. Create a new key.
    4. Copy the key.
  </Accordion>
</AccordionGroup>

### Key Security

* **Store Securely** - Keys are encrypted in the database
* **Don't Share** - Never share API keys
* **Rotate Regularly** - Update keys periodically
* **Monitor Usage** - Watch for unauthorized use

## Cost Considerations

<CardGroup cols={2}>
  <Card title="Predefined Models" icon="sparkles">
    * Costs managed by EKB
    * Billed through your EKB subscription
    * Credits-based pricing
    * Transparent pricing model
  </Card>

  <Card title="Custom Models (BYOK)" icon="key">
    * You pay directly to the provider
    * No additional EKB fees
    * Full control over costs
    * Direct billing from provider
  </Card>
</CardGroup>

**Cost optimization tips:**

* **Choose the right model** - Use the appropriate model for your task.
* **Optimize prompts** - Reduce token usage where possible.
* **Set limits** - Configure max tokens appropriately.
* **Monitor usage** - Track API usage regularly.
