> ## 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.

# Models

> Models form the foundation of the entire agent experience, offering different specialized capabilities:

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>;
};

* **[Chat](/customize/model-roles/chat)**: Power conversational interactions about code and provide detailed guidance
* **[Edit](/customize/model-roles/edit)**: Handle complex code transformations and refactoring tasks
* **[Apply](/customize/model-roles/apply)**: Execute targeted code modifications with high accuracy
* **[Autocomplete](/customize/model-roles/autocomplete)**: Provide real-time suggestions as developers type
* **[Embedding](/customize/model-roles/embeddings)**: Transform code into vector representations for semantic search
* **[Reranker](/customize/model-roles/reranking)**: Improve search relevance by ordering results based on semantic meaning

<img src="https://mintcdn.com/gourmand/kkqYf7UwBaqLLOdV/images/customization/images/model-blocks-overview-36c30e7e01928d7a9b5b26ff1639c34b.png?fit=max&auto=format&n=kkqYf7UwBaqLLOdV&q=85&s=b8561677ba3ce9b6ee8d79542f39232f" alt="Models Overview" width="3156" height="2112" data-path="images/customization/images/model-blocks-overview-36c30e7e01928d7a9b5b26ff1639c34b.png" />

## Recommended Models

### Best Models by Role

<ModelRecommendations role="all" />

## Learn More About Models

Gobi supports [many model providers](/customize/model-providers/top-level/openai), including Anthropic, OpenAI, Gemini, Ollama, Amazon Bedrock, Azure, xAI, and more. Models can have various roles like `chat`, `edit`, `apply`, `autocomplete`, `embed`, and `rerank`.

Read more about [model roles](/customize/model-roles), [model capabilities](/customize/deep-dives/model-capabilities) and view [`models`](/reference#models) in the YAML Reference.

### Example Model Setup Instructions

# Frontier Models

[Claude 4 Sonnet](https://hub.gourmand.dev/anthropic/claude-4-sonnet) from Anthropic

1. Get your API key from [Anthropic](https://console.anthropic.com/)
2. Add [Claude 4 Sonnet](https://hub.gourmand.dev/anthropic/claude-4-sonnet) to a config on Gobi Hub
3. Add `ANTHROPIC_API_KEY` as a [User Secret](https://docs.gourmand.dev/hub/secrets/secret-types#user-secrets) on Gobi Hub [here](https://hub.gourmand.dev/settings/secrets)
4. Click `Reload config` in the config selector in the Gobi IDE extension

[Qwen Coder 3 480B](https://hub.gourmand.dev/openrouter/qwen3-coder) from Qwen

1. Get your API key from [OpenRouter](https://openrouter.ai/settings/keys)
2. Add [Qwen Coder 3 480B](https://hub.gourmand.dev/openrouter/qwen3-coder)  a config on Gobi Hub
3. Add `OPENROUTER_API_KEY` as a [User Secret](https://docs.gourmand.dev/hub/secrets/secret-types#user-secrets) on Gobi Hub [here](https://hub.gourmand.dev/settings/secrets)
4. Click `Reload config` in the config selector in the Gobi IDE extension

[GPT-5](https://hub.gourmand.dev/openai/gpt-5) from OpenAI

1. Get your API key from [OpenAI](https://platform.openai.com)
2. Add [GPT-5](https://hub.gourmand.dev/openai/gpt-5)  a config on Gobi Hub
3. Add `OPENAI_API_KEY` as a [User Secret](https://docs.gourmand.dev/hub/secrets/secret-types#user-secrets) on Gobi Hub [here](https://hub.gourmand.dev/settings/secrets)
4. Click `Reload config` in the config selector in the Gobi IDE extension

[Kimi K2](https://hub.gourmand.dev/openrouter/kimi-k2) from Moonshot AI

1. Get your API key from [OpenRouter](https://openrouter.ai/settings/keys)
2. Add [Kimi K2](https://hub.gourmand.dev/openrouter/kimi-k2)  a config on Gobi Hub
3. Add `OPENROUTER_API_KEY` as a [User Secret](https://docs.gourmand.dev/hub/secrets/secret-types#user-secrets) on Gobi Hub [here](https://hub.gourmand.dev/settings/secrets)
4. Click `Reload config` in the config selector in the Gobi IDE extension

[Gemini 2.5 Pro](https://hub.gourmand.dev/google/gemini-2.5-pro) from Google

1. Get your API key from [Google AI Studio](https://aistudio.google.com)
2. Add [Gemini 2.5 Pro](https://hub.gourmand.dev/google/gemini-2.5-pro)  a config on Gobi Hub
3. Add `GEMINI_API_KEY` as a [User Secret](https://docs.gourmand.dev/hub/secrets/secret-types#user-secrets) on Gobi Hub [here](https://hub.gourmand.dev/settings/secrets)
4. Click `Reload config` in the config selector in the Gobi IDE extension

[Grok Code Fast 1](https://hub.gourmand.dev/xai/grok-code-fast-1) from xAI

1. Get your API key from [xAI](https://console.x.ai/)
2. Add [Grok Code Fast 1](https://hub.gourmand.dev/xai/grok-code-fast-1)  a config on Gobi Hub
3. Add `XAI_API_KEY` as a [User Secret](https://docs.gourmand.dev/hub/secrets/secret-types#user-secrets) on Gobi Hub [here](https://hub.gourmand.dev/settings/secrets)
4. Click `Reload config` in the config selector in the Gobi IDE extension

[Devstral Medium](https://hub.gourmand.dev/mistral/devstral-medium) from Mistral AI

1. Get your API key from [Mistral AI](https://console.mistral.ai/)
2. Add [Devstral Medium](https://hub.gourmand.dev/mistral/devstral-medium)  a config on Gobi Hub
3. Add `MISTRAL_API_KEY` as a [User Secret](https://docs.gourmand.dev/hub/secrets/secret-types#user-secrets) on Gobi Hub [here](https://hub.gourmand.dev/settings/secrets)
4. Click `Reload config` in the config selector in the Gobi IDE extension

[gpt-oss-120b](https://hub.gourmand.dev/openrouter/gpt-oss-120b) from OpenAI

1. Get your API key from [OpenRouter](https://openrouter.ai/settings/keys)
2. Add [gpt-oss-120b](https://hub.gourmand.dev/openrouter/gpt-oss-120b)  a config on Gobi Hub
3. Add `OPENROUTER_API_KEY` as a [User Secret](https://docs.gourmand.dev/hub/secrets/secret-types#user-secrets) on Gobi Hub [here](https://hub.gourmand.dev/settings/secrets)
4. Click `Reload config` in the config selector in the Gobi IDE extension

### Local Models

These models can be run on your computer if you have enough VRAM.

Their limited tool calling and reasoning capabilities will make it challenging to use agent mode.

[Qwen3 Coder 30B](https://hub.gourmand.dev/ollama/qwen3-coder-30b)

1. Add [Qwen3 Coder 30B](https://hub.gourmand.dev/ollama/qwen3-coder-30b)  a config on Gobi Hub
2. Run the model with [Ollama](https://docs.gourmand.dev/guides/ollama-guide#using-ollama-with-gobi-a-developers-guide)
3. Click `Reload config` in the config selector in the Gobi IDE extension

[gpt-oss-20b](https://hub.gourmand.dev/ollama/gpt-oss-20b)

1. Add [gpt-oss-20b](ttps://hub.gourmand.dev/ollama/gpt-oss-20b)  a config on Gobi Hub
2. Run the model with [Ollama](https://docs.gourmand.dev/guides/ollama-guide#using-ollama-with-gobi-a-developers-guide)
3. Click `Reload config` in the config selector in the Gobi IDE extension

[Devstral Small 27B](https://hub.gourmand.dev/ollama/devstral)

1. Add [Devstral Small](https://hub.gourmand.dev/ollama/devstral)  a config on Gobi Hub
2. Run the model with [Ollama](https://docs.gourmand.dev/guides/ollama-guide#using-ollama-with-gobi-a-developers-guide)
3. Click `Reload config` in the config selector in the Gobi IDE extension

[Qwen2.5-Coder 7B](https://hub.gourmand.dev/ollama/qwen2.5-coder-7b) from Qwen

1. Add [Qwen2.5-Coder 7B](https://hub.gourmand.dev/ollama/qwen2.5-coder-7b)  a config on Gobi Hub
2. Run the model with [Ollama](https://docs.gourmand.dev/guides/ollama-guide#using-ollama-with-gobi-a-developers-guide)
3. Click `Reload config` in the config selector in the Gobi IDE extension

[Gemma 3 4B](https://hub.gourmand.dev/ollama/gemma3-4b) from Google

1. Add [Gemma 3 4B](https://hub.gourmand.dev/ollama/gemma3-4b)  a config on Gobi Hub
2. Run the model with [Ollama](https://docs.gourmand.dev/guides/ollama-guide#using-ollama-with-gobi-a-developers-guide)
3. Click `Reload config` in the config selector in the Gobi IDE extension

[Qwen2.5-Coder 1.5B](https://hub.gourmand.dev/ollama/qwen2.5-coder-1.5b) from Qwen

1. Add [Qwen2.5-Coder 1.5B](https://hub.gourmand.dev/ollama/qwen2.5-coder-1.5b)  a config on Gobi Hub
2. Run the model with [Ollama](https://docs.gourmand.dev/guides/ollama-guide#using-ollama-with-gobi-a-developers-guide)
3. Click `Reload config` in the config selector in the Gobi IDE extension
