---
metadata:
  - name: generator
    content: Diplodoc Platform v5.66.0
alternate:
  - https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/ai-models.md
  - https://sourcecraft.dev/portal/docs/ru/sourcecraft/operations/ai-models.md
  - href: https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/ai-models.md
    type: text/markdown
    title: Markdown version
  - href: https://sourcecraft.dev/portal/docs/en/llms.txt?revision=r21973087
    rel: describedby
title: Configuring AI models in SourceCraft
description: How to enable or disable AI models for a SourceCraft organization and select a model in the chat, IDE plugin, or CLI.
---
> **Documentation Index:** Fetch the complete configuration index at https://sourcecraft.dev/portal/docs/en/llms.txt?revision=r21973087


# Configuring AI models in SourceCraft

<!-- source: en/_includes/sourcecraft/ai-models-intro.md -->
SourceCraft offers a wide range of _AI models_. They are used in the [SourceCraft UI chat](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/ca-chat.md), [AI coworkers](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/ai-coworkers.md), [Code Assistant](https://sourcecraft.dev/portal/docs/en/code-assistant/index.md) IDE plugins, and [SourceCraft CLI](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/cli-quickstart.md).

<!-- source: en/_includes/sourcecraft/ai-models-vibecraft-note.md -->
{% note info %}

Model selection in [VibeCraft](https://sourcecraft.dev/portal/docs/en/vibecraft/index.md) will become available later.

{% endnote %}
<!-- endsource: en/_includes/sourcecraft/ai-models-vibecraft-note.md -->

{% note tip %}

We are constantly updating the list of models. You can view the current list and descriptions of models on the ![image](../../_assets/sourcecraft/ai-models.svg) [AI models](https://sourcecraft.dev/me/settings/models) page of your personal organization. To view, log in or [sign up](https://sourcecraft.dev/portal/docs/en/sourcecraft/security/registration.md) to SourceCraft. You can view another organization's models in the organization settings.

{% endnote %}
<!-- endsource: en/_includes/sourcecraft/ai-models-intro.md -->

For more information, see [AI models in SourceCraft](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/ai-models.md).

## Configuring AI models in an organization {#organization}

<!-- source: en/_includes/sourcecraft/ai-model-control-intro.md -->
{% note info %}

To manage models, you need the organization [Administrator](https://sourcecraft.dev/portal/docs/en/sourcecraft/security/index.md#organization-manager-admin) or [Owner](https://sourcecraft.dev/portal/docs/en/sourcecraft/security/index.md#organization-manager-organizations-owner) role. They determine which models may be used by the organization's members. For example, you can leave only the internal models accessible. The setting is available regardless of the administrator's or organization owner's subscription.

{% endnote %}
<!-- endsource: en/_includes/sourcecraft/ai-model-control-intro.md -->

1. Open the SourceCraft [home page](https://sourcecraft.dev).
1. Under ![image](../../_assets/console-icons/briefcase.svg) **Organizations**, select the appropriate one.
1. Under ![image](../../_assets/console-icons/circle-ruble.svg) **Usage and billing**, navigate to ![image](../../_assets/sourcecraft/ai-models.svg) **AI models**.

    {% note tip %}

    To open the [personal organization](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/index.md#org) models, follow the [direct link](https://sourcecraft.dev/me/settings/models). If necessary, log in to SourceCraft or [sign up](https://sourcecraft.dev/portal/docs/en/sourcecraft/security/registration.md).

    {% endnote %}

1. Find the model in the **Internal** or **External** group. If necessary, use the search function to search by name.
1. To find out details about the model, click ![image](../../_assets/console-icons/circle-info.svg) **Overview** on its card. Consider the [model's placement and neurocredit consumption](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/ai-models.md#model-types).
1. On the card for the model, click **Enable** or **Disable**.

    {% note tip %}

    To disable all external models, click **Disable all models** in the **External** group.

    {% endnote %}

These settings apply to users who have selected this organization for neurocredit deduction in the SourceCraft chat, Code Assistant plugins, or SourceCraft CLI.

If an enabled model displays the **Unavailable from provider** status, it [will not appear in the users' selection list](#unavailable).

## Selecting an AI model for a task {#select-model}

<!-- source: en/_includes/sourcecraft/ai-model-access-conditions.md -->
Model switching becomes available to the user if the following conditions are met:
* A [paid subscription](https://sourcecraft.dev/portal/docs/en/sourcecraft/pricing.md) has been set up for the user within the organization they selected for neurocredit deductions.
* An administrator or organization owner has configured the use of models other than the [default model](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/ai-models.md#default-model).

If a user has subscriptions assigned across multiple organizations, they can choose which organization to deduct neurocredits from. Access to models is determined by the subscription and the settings of the selected organization.

{% note info %}

Without a [paid subscription](https://sourcecraft.dev/portal/docs/en/sourcecraft/pricing.md), models appear in the list, but you can only use the default model.

{% endnote %}

<!-- source: en/_includes/sourcecraft/ai-models-legacy-tariff-note.md -->
{% note warning %}

Archived **Code Assistant Pro** plan does not grant access to [selecting AI models](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/ai-models.md#select-model).

{% endnote %}
<!-- endsource: en/_includes/sourcecraft/ai-models-legacy-tariff-note.md -->
<!-- endsource: en/_includes/sourcecraft/ai-model-access-conditions.md -->

You can spend your [gift neurocredits](https://sourcecraft.dev/portal/docs/en/sourcecraft/pricing.md#gift) only on internal models.

{% list tabs %}

- Chat in the SourceCraft interface

  1. [Open](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/ca-chat.md#open) the Code Assistant chat in the SourceCraft interface.
  1. On the bottom chat panel, click the model's name and select the one you want.

- Plugin for VS Code

  1. In the left-hand panel, click ![image](../../_assets/code-assistant/vsc-icon-small.svg).
  1. On the bottom chat panel, click ![image](../../_assets/console-icons/chevron-up.svg) displaying the model name and select the one you want.

  {% note tip %}

  In Visual Studio Code, you can also create [configuration profiles](https://sourcecraft.dev/portal/docs/en/code-assistant/operations/agent/api-configuration-profiles.md) to connect AI providers using your own API keys.

  {% endnote %}

- Plugin for JetBrains IDEs

  1. [Run](https://sourcecraft.dev/portal/docs/en/code-assistant/operations/jb-agent.md) the agent mode.
  1. In the SourceCraft CLI interface, enter the `/models` command or press **Ctrl** + **P** and select **Switch model**.
  1. Select the relevant model from the list.

- SourceCraft CLI

  1. Start your OpenCode:

      ```bash
      src code
      ```

  1. In the OpenCode interface, enter the `/models` command or press **Ctrl** + **P** and select **Switch model**.
  1. Select the relevant model from the list.

{% endlist %}

To have SourceCraft automatically select a model for the task, use the [default model](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/ai-models.md#default-model).

## Troubleshooting {#troubleshooting}

### When selecting a model in the interface, you are prompted to sign up for a paid subscription {#subscription}

<!-- source: en/_includes/sourcecraft/ai-models-qa-subscription.md -->
Ensure that a [paid subscription](https://sourcecraft.dev/portal/docs/en/sourcecraft/pricing.md) has been assigned to you in the organization selected for neurocredit deductions in the [SourceCraft UI chat](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/ca-chat.md), [Code Assistant](https://sourcecraft.dev/portal/docs/en/code-assistant/index.md) plugin, or [SourceCraft CLI](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/cli-quickstart.md).

<!-- source: en/_includes/sourcecraft/ai-models-legacy-tariff-note.md -->
{% note warning %}

Archived **Code Assistant Pro** plan does not grant access to [selecting AI models](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/ai-models.md#select-model).

{% endnote %}
<!-- endsource: en/_includes/sourcecraft/ai-models-legacy-tariff-note.md -->
<!-- endsource: en/_includes/sourcecraft/ai-models-qa-subscription.md -->

### The model is disabled in the organization {#disabled}

<!-- source: en/_includes/sourcecraft/ai-models-qa-disabled.md -->
Contact your organization's [Administrator](https://sourcecraft.dev/portal/docs/en/sourcecraft/security/index.md#organization-manager-admin) or [Owner](https://sourcecraft.dev/portal/docs/en/sourcecraft/security/index.md#organization-manager-organizations-owner) for them to [update](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/ai-models.md#organization) the available list of models.
<!-- endsource: en/_includes/sourcecraft/ai-models-qa-disabled.md -->

### The model is not available from the provider {#unavailable}

<!-- source: en/_includes/sourcecraft/ai-models-qa-unavailable.md -->
Administrator or organization owner may see the **Unavailable from provider** status on the **AI models** page within the organization settings. The respective model is temporarily unable to process requests and does not appear part of the user-available selection options, even if its use is allowed within the organization.
<!-- endsource: en/_includes/sourcecraft/ai-models-qa-unavailable.md -->

#### Useful links {#see-also}

* [AI models in SourceCraft](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/ai-models.md)
* [Viewing Code Assistant usage statistics in SourceCraft](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/code-assistant-stats.md)
* [SourceCraft pricing policy](https://sourcecraft.dev/portal/docs/en/sourcecraft/pricing.md)
