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

# Chat Role

> Chat model role

export const ModelRecommendations = ({role = "all"}) => {
  const parseMarkdownLinks = text => {
    const regex = /\[([^\]]+)\]\(([^)]+)\)/g;
    const parts = [];
    let lastIndex = 0;
    let match;
    let key = 0;
    while ((match = regex.exec(text)) !== null) {
      if (match.index > lastIndex) {
        const beforeText = text.slice(lastIndex, match.index);
        if (beforeText) {
          parts.push(<span key={key++}>{beforeText}</span>);
        }
      }
      const [, linkText, url] = match;
      parts.push(<a key={key++} href={url} target="_blank" rel="noopener noreferrer" style={{
        color: "#0066cc",
        textDecoration: "underline"
      }}>
          {linkText}
        </a>);
      lastIndex = regex.lastIndex;
    }
    if (lastIndex < text.length) {
      const remainingText = text.slice(lastIndex);
      if (remainingText) {
        parts.push(<span key={key++}>{remainingText}</span>);
      }
    }
    return parts.length > 0 ? parts : text;
  };
  const modelRecs = {
    agent_plan: {
      open: ["[Qwen3 Coder (480B)](https://hub.gourmand.dev/openrouter/qwen3-coder)", "[Qwen3 Coder (30B)](https://hub.gourmand.dev/ollama/qwen3-coder-30b)", "[Devstral (27B)](https://hub.gourmand.dev/ollama/devstral)", "[Kimi K2 (1T)](https://hub.gourmand.dev/openrouter/kimi-k2)", "[gpt-oss (120B)](https://hub.gourmand.dev/openrouter/gpt-oss-120b)", "[gpt-oss (20B)](https://hub.gourmand.dev/ollama/gpt-oss-20b)", "[GLM 4.5 (355B)](https://hub.gourmand.dev/openrouter/glm-4-5)", "[GLM 4.5 Air (106B)](https://hub.gourmand.dev/openrouter/glm-4-5-air)"],
      closed: ["[Claude Opus 4.1](https://hub.gourmand.dev/anthropic/claude-4-1-opus)", "[Claude Sonnet 4](https://hub.gourmand.dev/anthropic/claude-4-sonnet)", "[GPT-5](https://hub.gourmand.dev/openai/gpt-5)", "[Gemini 2.5 Pro](https://hub.gourmand.dev/google/gemini-2.5-pro)"],
      notes: "Closed models are slightly better than open models"
    },
    chat_edit: {
      open: ["[Qwen3 Coder (480B)](https://hub.gourmand.dev/openrouter/qwen3-coder)", "[Qwen3 Coder (30B)](https://hub.gourmand.dev/ollama/qwen3-coder-30b)", "[gpt-oss (120B)](https://hub.gourmand.dev/openrouter/gpt-oss-120b)", "[gpt-oss (20B)](https://hub.gourmand.dev/ollama/gpt-oss-20b)"],
      closed: ["[Claude Opus 4.1](https://hub.gourmand.dev/anthropic/claude-4-1-opus)", "[Claude Sonnet 4](https://hub.gourmand.dev/anthropic/claude-4-sonnet)", "[GPT-5](https://hub.gourmand.dev/openai/gpt-5)", "[Gemini 2.5 Pro](https://hub.gourmand.dev/google/gemini-2.5-pro)"],
      notes: "Closed and open models have pretty similar performance"
    },
    autocomplete: {
      open: ["[QwenCoder2.5 (1.5B)](https://hub.gourmand.dev/ollama/qwen2.5-coder-1.5b)", "[QwenCoder2.5 (7B)](https://hub.gourmand.dev/ollama/qwen2.5-coder-7b)"],
      closed: ["[Codestral](https://hub.gourmand.dev/mistral/codestral)", "[Mercury Coder](https://hub.gourmand.dev/inception/mercury-coder)"],
      notes: "Closed models are slightly better than open models"
    },
    apply: {
      open: ["N/A"],
      closed: ["[Relace Instant Apply](https://hub.gourmand.dev/relace/instant-apply)", "[Morph Fast Apply](https://hub.gourmand.dev/morphllm/morph-v2)"],
      notes: "Open models are not good enough for this model role"
    },
    embed: {
      open: ["[Nomic Embed Text](https://hub.gourmand.dev/ollama/nomic-embed-text-latest)", "Qwen3 Embedding"],
      closed: ["[Voyage Code 3](https://hub.gourmand.dev/voyageai/voyage-code-3)", "[Morph Embeddings](https://hub.gourmand.dev/morphllm/morph-embedding-v2)", "Codestral Embed"],
      notes: "Closed models are slightly better than open models"
    },
    rerank: {
      open: ["zerank-1", "zerank-1-small", "Qwen3 Reranker"],
      closed: ["[Voyage Rerank 2.5](https://hub.gourmand.dev/voyageai/rerank-2-5)", "Relace Code Rerank", "[Morph Rerank](https://hub.gourmand.dev/morphllm/morph-rerank-v2)"],
      notes: "Open models are beginning to emerge for this model role"
    },
    next_edit: {
      open: ["[Instinct](https://hub.gourmand.dev/gobi/instinct)"],
      closed: ["[Mercury Coder](https://hub.gourmand.dev/inception/mercury-coder)"],
      notes: "Closed models are better than open models"
    }
  };
  let rolesToShow = [];
  if (!role || role === "all") {
    rolesToShow = Object.keys(modelRecs);
  } else {
    const key = role.toLowerCase().replace(/\s|\//g, "_").replace(/-/g, "_");
    if (modelRecs[key]) {
      rolesToShow = [key];
    }
  }
  if (rolesToShow.length === 0) {
    return <div>No recommendations found for role: {role}</div>;
  }
  return <table style={{
    width: "100%",
    borderCollapse: "collapse",
    marginTop: "1rem"
  }}>
      <thead>
        <tr>
          <th style={{
    textAlign: "left",
    borderBottom: "1px solid #ddd",
    padding: "8px"
  }}>
            Model role
          </th>
          <th style={{
    textAlign: "left",
    borderBottom: "1px solid #ddd",
    padding: "8px"
  }}>
            Best open models
          </th>
          <th style={{
    textAlign: "left",
    borderBottom: "1px solid #ddd",
    padding: "8px"
  }}>
            Best closed models
          </th>
          <th style={{
    textAlign: "left",
    borderBottom: "1px solid #ddd",
    padding: "8px"
  }}>
            Notes
          </th>
        </tr>
      </thead>
      <tbody>
        {rolesToShow.map(roleKey => {
    const rec = modelRecs[roleKey];
    if (!rec) return null;
    return <tr key={roleKey}>
              <td style={{
      fontWeight: 600,
      verticalAlign: "top",
      padding: "8px"
    }}>
                {roleKey.replace(/_/g, " ").replace(/\b\w/g, l => l.toUpperCase())}
              </td>
              <td style={{
      padding: "8px",
      verticalAlign: "top"
    }}>
                {rec.open.map((m, i) => <div key={i} style={{
      marginBottom: "4px"
    }}>
                    {parseMarkdownLinks(m)}
                  </div>)}
              </td>
              <td style={{
      padding: "8px",
      verticalAlign: "top"
    }}>
                {rec.closed.map((m, i) => <div key={i} style={{
      marginBottom: "4px"
    }}>
                    {parseMarkdownLinks(m)}
                  </div>)}
              </td>
              <td style={{
      padding: "8px",
      verticalAlign: "top"
    }}>
                {rec.notes}
              </td>
            </tr>;
  })}
      </tbody>
    </table>;
};

A "chat model" is an LLM that is trained to respond in a conversational format. Because they should be able to answer general questions and generate complex code, the best chat models are typically large, often 405B+ parameters.

In Gobi, these models are used for normal [Chat](../../ide-extensions/chat/quick-start). The selected chat model will also be used for [Edit](../../ide-extensions/edit/quick-start) and [Apply](./apply.mdx) if no `edit` or `apply` models are specified, respectively.

## Recommended Chat models

<ModelRecommendations role="chat_edit" />

## Best overall experience

For the best overall Chat experience, you will want to use a 400B+ parameter model or one of the frontier models.

### Claude Opus 4.1 and Claude Sonnet 4 from Anthropic

Our current top recommendations are Claude Opus 4.1 and Claude Sonnet 4 from [Anthropic](../model-providers/top-level/anthropic).

<Tabs>
  <Tab title="Hub">
    View the [Claude Opus 4.1 model block](https://hub.gourmand.dev/anthropic/claude-4-1-opus) or [Claude Sonnet 4 model block](https://hub.gourmand.dev/anthropic/claude-4-sonnet) on the hub.
  </Tab>

  <Tab title="YAML">
    ```yaml title="config.yaml" theme={null}
    models:
      - name: Claude Opus 4.1
        provider: anthropic
        model: claude-4-1-opus
        apiKey: <YOUR_ANTHROPIC_API_KEY>
    ```
  </Tab>
</Tabs>

### Gemma from Google DeepMind

If you prefer to use an open-weight model, then the Gemma family of Models from Google DeepMind is a good choice. You will need to decide if you use it through a SaaS model provider, e.g. [Together](../model-providers/more/together), or self-host it, e.g. [Ollama](../model-providers/top-level/ollama).

<Tabs>
  <Tab title="Hub">
    <Tabs>
      <Tab title="Ollama">
        Add the [Ollama Gemma 3 27B block](https://hub.gourmand.dev/ollama/gemma3-27b) from the hub
      </Tab>

      <Tab title="Together">
        Add the [Together Gemma 2 27B Instruct block](https://hub.gourmand.dev/togetherai/gemma-2-instruct-27b) from the hub
      </Tab>
    </Tabs>
  </Tab>

  <Tab title="YAML">
    <Tabs>
      <Tab title="Ollama">
        ```yaml title="config.yaml" theme={null}
        models:
          - name: "Gemma 3 27B"
            provider: "ollama"
            model: "gemma3:27b"
        ```
      </Tab>

      <Tab title="Together">
        ```yaml title="config.yaml" theme={null}
        models:
          - name: "Gemma 3 27B"
            provider: "together"
            model: "google/gemma-2-27b-it"
            apiKey: <YOUR_TOGETHER_API_KEY>
        ```
      </Tab>
    </Tabs>
  </Tab>
</Tabs>

### GPT-4o from OpenAI

If you prefer to use a model from [OpenAI](../model-providers/top-level/openai), then we recommend GPT-4o.

<Tabs>
  <Tab title="Hub">
    Add the [OpenAI GPT-4o block](https://hub.gourmand.dev/openai/gpt-4o) from the hub
  </Tab>

  <Tab title="YAML">
    ```yaml title="config.yaml" theme={null}
    models:
      - name: GPT-4o
        provider: openai
        model: ''
        apiKey: <YOUR_OPENAI_API_KEY>
    ```
  </Tab>
</Tabs>

### Grok-2 from xAI

If you prefer to use a model from [xAI](../model-providers/more/xAI), then we recommend Grok-2.

<Tabs>
  <Tab title="Hub">
    Add the [xAI Grok-2 block](https://hub.gourmand.dev/xai/grok-2) from the hub
  </Tab>

  <Tab title="YAML">
    ```yaml title="config.yaml" theme={null}
    models:
      - name: Grok-2
        provider: xAI
        model: grok-2-latest
        apiKey: <YOUR_XAI_API_KEY>
    ```
  </Tab>
</Tabs>

### Gemini 2.0 Flash from Google

If you prefer to use a model from [Google](../model-providers/top-level/gemini), then we recommend Gemini 2.0 Flash.

<Tabs>
  <Tab title="Hub">
    Add the [Gemini 2.0 Flash block](https://hub.gourmand.dev/google/gemini-2.0-flash) from the hub
  </Tab>

  <Tab title="YAML">
    ```yaml title="config.yaml" theme={null}
    models:
      - name: Gemini 2.0 Flash
        provider: gemini
        model: gemini-2.0-flash
        apiKey: <YOUR_GEMINI_API_KEY>
    ```
  </Tab>
</Tabs>

## Local, offline experience

For the best local, offline Chat experience, you will want to use a model that is large but fast enough on your machine.

### Llama 3.1 8B

If your local machine can run an 8B parameter model, then we recommend running Llama 3.1 8B on your machine (e.g. using [Ollama](../model-providers/top-level/ollama) or [LM Studio](../model-providers/top-level/lmstudio)).

<Tabs>
  <Tab title="Hub">
    <Tabs>
      <Tab title="Ollama">
        Add the [Ollama Llama 3.1 8b block](https://hub.gourmand.dev/ollama/llama3.1-8b) from the hub
      </Tab>

      {/* <Tab title="LM Studio">
              Add the [LM Studio Llama 3.1 8b block](https://hub.gourmand.dev/explore/models) from the hub
              </Tab> */}
    </Tabs>
  </Tab>

  <Tab title="YAML">
    <Tabs>
      <Tab title="Ollama">
        ```yaml title="config.yaml" theme={null}
        models:
          - name: Llama 3.1 8B
            provider: ollama
            model: llama3.1:8b
        ```
      </Tab>

      <Tab title="LM Studio">
        ```yaml title="config.yaml" theme={null}
        models:
          - name: Llama 3.1 8B
            provider: lmstudio
            model: llama3.1:8b
        ```
      </Tab>

      <Tab title="Msty">
        ```yaml title="config.yaml" theme={null}
        models:
          - name: Llama 3.1 8B
            provider: msty
            model: llama3.1:8b
        ```
      </Tab>
    </Tabs>
  </Tab>
</Tabs>

### DeepSeek Coder 2 16B

If your local machine can run a 16B parameter model, then we recommend running DeepSeek Coder 2 16B (e.g. using [Ollama](../model-providers/top-level/ollama) or [LM Studio](../model-providers/top-level/lmstudio)).

<Tabs>
  {/* <Tab title="Hub">
      <Tabs>
      <Tab title="Ollama">
      Add the [Ollama Deepseek Coder 2 16B block](https://hub.gourmand.dev/explore/models) from the hub
      </Tab>
      <Tab title="LM Studio">
      Add the [LM Studio Deepseek Coder 2 16B block](https://hub.gourmand.dev/explore/models) from the hub
      </Tab>
      </Tabs>
    </Tab> */}

  <Tab title="YAML">
    <Tabs>
      <Tab title="Ollama">
        ```yaml title="config.yaml" theme={null}
        models:
          - name: DeepSeek Coder 2 16B
            provider: ollama
            model: deepseek-coder-v2:16b
        ```
      </Tab>

      <Tab title="LM Studio">
        ```yaml title="config.yaml" theme={null}
        models:
          - name: DeepSeek Coder 2 16B
            provider: lmstudio
            model: deepseek-coder-v2:16b
        ```
      </Tab>

      <Tab title="Msty">
        ```yaml title="config.yaml" theme={null}
        models:
          - name: DeepSeek Coder 2 16B
            provider: msty
            model: deepseek-coder-v2:16b
        ```
      </Tab>
    </Tabs>
  </Tab>
</Tabs>

## Other experiences

There are many more models and providers you can use with Chat beyond those mentioned above. Read more [here](../model-roles/chat.mdx)
