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

# AI Chat Models

> 12 providers - 11 dedicated model nodes plus xAI through the OpenAI-compatible path - with models fetched live from each provider

# AI Chat Models

OpenCompany supports **12 providers** (11 dedicated model nodes, plus xAI through the OpenAI-compatible path), with models fetched dynamically from each provider's API (and, for the local nodes, from your running server). The backend uses a hybrid architecture: a native SDK layer in `server/services/llm/` for direct chat completions, and a LangChain + LangGraph path for agent tool-calling.

## Available Chat-Model Nodes

| Node | Models | Best For |
| - | - | - |
| OpenAI | GPT-5.5/5.4/5.2, GPT-4.1/4.1-mini/nano, o3, o4-mini, GPT-4o/4o-mini | General purpose, reasoning |
| Anthropic | Claude Fable 5, Opus 4.8/4.7, Sonnet 4.6, Haiku 4.5 | Coding, analysis, extended thinking |
| Google Gemini | Gemini 3.5-flash, 3.1-pro/flash-lite, 3-flash, 2.5-pro/flash/flash-lite | Multimodal, long context (1M) |
| OpenRouter | 200+ models | Access multiple providers via single API |
| xAI | Grok models | Direct chat via the OpenAI-compatible xAI API |
| Groq | Llama 3.3-70b, Llama 3.1-8b, GPT-OSS-120b/20b, Qwen3-32b | Ultra-fast inference (LPU) |
| Cerebras | GPT-OSS-120b, Qwen-3-235b, GLM-4.7 | Ultra-fast on wafer-scale hardware |
| DeepSeek | deepseek-v4-flash, deepseek-v4-pro | V4 with reasoning modes, up to 1M context |
| Kimi | kimi-k2.6, kimi-k2.5, kimi-k2.7-code | 256K context, thinking on by default |
| Mistral | mistral-large/medium/small-latest, codestral-latest | Up to 256K context |
| Ollama | Whatever you've pulled locally | Local models, no API key |
| LM Studio | Whatever you've loaded locally | Local models, no API key |

<Info>
  xAI (Grok) is native-chat-only: it runs through the shared OpenAI-compatible provider with `base_url=https://api.x.ai/v1` and is not wired as an agent provider. **Ollama** and **LM Studio** connect to a local server running on your machine.
</Info>

## Adding API Keys

1. Click the **key icon** in the toolbar
2. Select the provider
3. Enter your API key
4. Click **Validate** to test

<Info>
  API keys are encrypted and stored locally. They're never sent to OpenCompany servers.
</Info>

***

## OpenAI Chat Model

### Models

| Model | Best For |
| - | - |
| gpt-5.5 | Most capable, up to \~1M context |
| gpt-5.4 | High capability, long context |
| gpt-5.2 | Capable, 400K context |
| gpt-4.1 / 4.1-mini / 4.1-nano | Fast, 1M context |
| o3 | Advanced reasoning |
| o4-mini | Fast, efficient reasoning |
| gpt-4o / gpt-4o-mini | Multimodal, cost-effective |

### Parameters

<ParamField path="model" type="select" required>
  The model to use
</ParamField>

<ParamField path="prompt" type="string" required>
  The message to send. Supports template variables.
</ParamField>

<ParamField path="temperature" type="slider" default="0.7">
  Randomness (0 = deterministic, 1 = creative)
</ParamField>

<ParamField path="maxTokens" type="number" default="1000">
  Maximum response length
</ParamField>

<ParamField path="responseFormat" type="select" default="text">
  Output format: text or json\_object
</ParamField>

<ParamField path="reasoningEffort" type="select" default="medium">
  For o-series and GPT-5 hybrid reasoning: low, medium, high (GPT-5 also supports xhigh)
</ParamField>

### Output

```json theme={null}
{
  "response": "The AI's response text",
  "model": "gpt-5.5",
  "thinking": "Reasoning process (o-series / GPT-5 only)",
  "usage": {
    "prompt_tokens": 50,
    "completion_tokens": 100,
    "total_tokens": 150
  }
}
```

***

## Anthropic Claude Model

### Models

| Model | Best For |
| - | - |
| claude-opus-4-8 | Most capable, detailed analysis, 1M context |
| claude-opus-4-7 | High capability, 1M context |
| claude-sonnet-4-6 | Best for coding and complex tasks, 1M context |
| claude-fable-5 | Capable, 1M context |
| claude-haiku-4-5 | Fast responses, simple tasks, 200K context |

### Parameters

<ParamField path="model" type="select" required>
  Claude model to use
</ParamField>

<ParamField path="prompt" type="string" required>
  The message to send
</ParamField>

<ParamField path="systemPrompt" type="string">
  System instructions for the model
</ParamField>

<ParamField path="temperature" type="slider" default="0.7">
  Randomness (0-1)
</ParamField>

<ParamField path="maxTokens" type="number" default="1000">
  Maximum response length
</ParamField>

<ParamField path="thinkingEnabled" type="boolean" default="false">
  Enable extended thinking mode (all Claude 4.x models)
</ParamField>

<ParamField path="thinkingBudget" type="number" default="2048">
  Token budget for thinking (1024-16000). Shown when thinkingEnabled is true.
</ParamField>

### Extended Thinking

Claude's extended thinking mode shows the model's reasoning process:

```json theme={null}
{
  "response": "Claude's final response",
  "thinking": "Let me analyze this step by step...",
  "model": "claude-opus-4-8",
  "stop_reason": "end_turn"
}
```

<Info>
  Anthropic model IDs use hyphens, not dots (`claude-sonnet-4-6`, not `claude-sonnet-4.6`).
</Info>

<Warning>
  When thinking is enabled, `max_tokens` must be greater than `thinkingBudget`. Temperature is automatically set to 1.
</Warning>

***

## Google Gemini Model

### Models

| Model | Best For |
| - | - |
| gemini-3.5-flash | Fast, frontier performance, 1M context |
| gemini-3.1-pro-preview | Most intelligent, complex tasks |
| gemini-3.1-flash-lite | Fast, cost-effective |
| gemini-3-flash-preview | Fast, multimodal |
| gemini-2.5-pro | Complex tasks, thinking support |
| gemini-2.5-flash / 2.5-flash-lite | Fast, thinking support |

### Parameters

<ParamField path="model" type="select" required>
  Gemini model to use
</ParamField>

<ParamField path="prompt" type="string" required>
  The message to send
</ParamField>

<ParamField path="temperature" type="slider" default="0.7">
  Randomness (0-1)
</ParamField>

<ParamField path="maxTokens" type="number" default="1000">
  Maximum response length
</ParamField>

<ParamField path="safetySettings" type="select" default="default">
  Content safety level
</ParamField>

<ParamField path="thinkingEnabled" type="boolean" default="false">
  Enable thinking mode (Gemini 3.x and 2.5 models)
</ParamField>

### Output

```json theme={null}
{
  "response": "Gemini's response",
  "thinking": "Reasoning process (when enabled)",
  "model": "gemini-3.5-flash"
}
```

***

## OpenRouter Model

OpenRouter provides access to 200+ models from multiple providers through a single API.

### Features

* **Unified API**: One API key for OpenAI, Anthropic, Google, Meta, Mistral, and more
* **Free Models**: Some models available at no cost (marked with \[FREE] prefix)
* **Fallback**: Automatic model fallback if primary is unavailable

### Models

Models are grouped by cost in the dropdown:

* **Free models**: \[FREE] prefix, no cost
* **Paid models**: Standard pricing per provider

Popular models include:

* `openai/gpt-5.5`
* `anthropic/claude-sonnet-4.6` (the OpenRouter default)
* `google/gemini-3.5-flash`
* `meta-llama/llama-3.3-70b-instruct`
* `mistralai/mistral-large-latest`

### Parameters

<ParamField path="model" type="select" required>
  Model in format: provider/model-name
</ParamField>

<ParamField path="prompt" type="string" required>
  The message to send
</ParamField>

<ParamField path="temperature" type="slider" default="0.7">
  Randomness (0-1)
</ParamField>

<ParamField path="maxTokens" type="number" default="1000">
  Maximum response length
</ParamField>

### Output

```json theme={null}
{
  "response": "Model's response",
  "model": "openai/gpt-5.5",
  "provider": "openrouter"
}
```

***

## Groq Model

Groq provides ultra-fast inference on custom LPU (Language Processing Unit) hardware.

### Models

| Model | Best For |
| - | - |
| llama-3.3-70b-versatile | General purpose, fast |
| llama-3.1-8b-instant | Ultra-fast, simple tasks |
| openai/gpt-oss-120b | Large open model, long output |
| openai/gpt-oss-20b | Fast open model |
| qwen/qwen3-32b | Reasoning with parsed/hidden output |

### Parameters

<ParamField path="model" type="select" required>
  Groq model to use
</ParamField>

<ParamField path="prompt" type="string" required>
  The message to send
</ParamField>

<ParamField path="temperature" type="slider" default="0.7">
  Randomness (0-1)
</ParamField>

<ParamField path="maxTokens" type="number" default="1000">
  Maximum response length
</ParamField>

<ParamField path="reasoningFormat" type="select" default="parsed">
  For Qwen3 models: "parsed" returns reasoning, "hidden" returns only final answer
</ParamField>

### Reasoning Output

Qwen3-32b supports reasoning output:

```json theme={null}
{
  "response": "The final answer",
  "thinking": "Step-by-step reasoning process",
  "model": "qwen/qwen3-32b"
}
```

***

## Cerebras Model

Cerebras provides ultra-fast inference on custom wafer-scale AI hardware.

### Models

| Model | Best For |
| - | - |
| gpt-oss-120b | Capable, balanced (the default) |
| qwen-3-235b | Reasoning tasks (budget thinking) |
| zai-glm-4.7 | General purpose |

### Parameters

<ParamField path="model" type="select" required>
  Cerebras model to use
</ParamField>

<ParamField path="prompt" type="string" required>
  The message to send
</ParamField>

<ParamField path="temperature" type="slider" default="0.7">
  Randomness (0-1)
</ParamField>

<ParamField path="maxTokens" type="number" default="1000">
  Maximum response length
</ParamField>

### Output

```json theme={null}
{
  "response": "Cerebras model response",
  "model": "gpt-oss-120b"
}
```

***

## DeepSeek

DeepSeek V4 models with reasoning support and long context.

### Models

| Model | Best For |
| - | - |
| deepseek-v4-flash | General purpose, fast, up to 1M context, up to 64K output |
| deepseek-v4-pro | Higher capability, up to 1M context, up to 64K output |

<Info>
  The legacy `deepseek-chat` and `deepseek-reasoner` aliases still resolve (scheduled for deprecation 2026-07-24). `deepseek-reasoner` returns always-on reasoning in the `thinking` field.
</Info>

### Parameters

<ParamField path="model" type="select" required>
  DeepSeek model
</ParamField>

<ParamField path="prompt" type="string" required>
  The message to send
</ParamField>

<ParamField path="temperature" type="slider" default="0.7">
  Randomness (0-2)
</ParamField>

<ParamField path="maxTokens" type="number" default="8192">
  Maximum response length (up to 64K)
</ParamField>

### Reasoning Output

DeepSeek's reasoning is mapped to the standard `thinking` field:

```json theme={null}
{
  "response": "The final answer",
  "thinking": "Step-by-step reasoning",
  "model": "deepseek-v4-pro"
}
```

***

## Kimi (Moonshot AI)

Moonshot's Kimi models with 256K context window and thinking on by default.

### Models

| Model | Best For |
| - | - |
| kimi-k2.6 | General purpose, 256K context, 32K output |
| kimi-k2.5 | General purpose, 256K context, 96K output |
| kimi-k2.7-code | Code tasks, 256K context, 96K output |

### Parameters

<ParamField path="model" type="select" required>
  Kimi model
</ParamField>

<ParamField path="prompt" type="string" required>
  The message to send
</ParamField>

<ParamField path="maxTokens" type="number" default="4096">
  Maximum response length (up to 96K)
</ParamField>

<Warning>
  Kimi models use a fixed temperature of 0.6. User-set temperature is ignored. Thinking is on by default but explicitly disabled in tool-calling agent mode for compatibility.
</Warning>

### Output

```json theme={null}
{
  "response": "Kimi response",
  "thinking": "Reasoning (when thinking is active)",
  "model": "kimi-k2.6"
}
```

***

## Mistral

Mistral AI models including Large, Small, and Codestral for code tasks.

### Models

| Model | Best For |
| - | - |
| mistral-large-latest | Most capable, general purpose, 256K context |
| mistral-medium-latest | Balanced, 256K context |
| mistral-small-latest | Fast, cost-effective |
| codestral-latest | Code generation and completion, 256K context |

### Parameters

<ParamField path="model" type="select" required>
  Mistral model
</ParamField>

<ParamField path="prompt" type="string" required>
  The message to send
</ParamField>

<ParamField path="temperature" type="slider" default="0.7">
  Randomness (0-1.5)
</ParamField>

<ParamField path="maxTokens" type="number" default="8192">
  Maximum response length (up to 131K)
</ParamField>

### Output

```json theme={null}
{
  "response": "Mistral response",
  "model": "mistral-large-latest"
}
```

<Info>
  Mistral models support up to 256K context but do not have a thinking mode. Temperature range is 0-1.5 (not 0-2).
</Info>

***

## Ollama (Local)

Run models locally through an [Ollama](https://ollama.com) server. No API key is needed; instead you point OpenCompany at your running server's URL in the Credentials Modal (default `http://localhost:11434/v1`).

### Models

The dropdown reflects **whatever you have pulled** into Ollama (e.g. `qwen2.5`, `llama3.x`, `phi-3`, `deepseek-r1`). OpenCompany probes your running server via the official Ollama Python SDK and reads per-model context length directly. When the server is offline the list is empty, cueing you to start it.

### Parameters

<ParamField path="model" type="select" required>
  A model loaded in your local Ollama server
</ParamField>

<ParamField path="prompt" type="string" required>
  The message to send
</ParamField>

<ParamField path="temperature" type="slider" default="0.7">
  Randomness (0-2)
</ParamField>

<ParamField path="maxTokens" type="number" default="4096">
  Maximum response length (per-model, roughly context / 4, capped at 4096)
</ParamField>

<Info>
  Traffic stays on your machine. OpenCompany sends requests to your local server URL, never to a cloud API.
</Info>

***

## LM Studio (Local)

Run models locally through the [LM Studio](https://lmstudio.ai) server. Like Ollama, no API key is required; you set your local server URL in the Credentials Modal (default `http://localhost:1234/v1`).

### Models

The dropdown reflects **whatever you have loaded** in the LM Studio UI. OpenCompany probes the running server via the official LM Studio Python SDK and reads typed model info (context length, tool-use support, vision).

### Parameters

<ParamField path="model" type="select" required>
  A model loaded in your LM Studio server
</ParamField>

<ParamField path="prompt" type="string" required>
  The message to send
</ParamField>

<ParamField path="temperature" type="slider" default="0.7">
  Randomness (0-2)
</ParamField>

<ParamField path="maxTokens" type="number" default="4096">
  Maximum response length (per-model, roughly context / 4, capped at 4096)
</ParamField>

***

## Native SDK vs LangChain Path

OpenCompany uses a hybrid architecture for LLM access:

* **Native SDK path** (`server/services/llm/`): Used by `execute_chat()` for direct chat completions. Returns a normalized `LLMResponse` across providers. This path also serves the OpenAI-compatible providers including DeepSeek, Kimi, Mistral, xAI, Ollama, and LM Studio.
* **LangChain path**: Used by `execute_agent()` and `execute_chat_agent()` for tool-calling agents via LangGraph. All chat-model providers are supported (Groq and Cerebras use this path for direct chat too).

OpenAI-compatible providers (DeepSeek, Kimi, Mistral, xAI, Ollama, LM Studio) reuse the `OpenAIProvider` class with `base_url` read from `server/config/llm_defaults.json`. For the local nodes (Ollama, LM Studio) the `base_url` resolves to your machine's server URL, so traffic never leaves your host. Adding a new OpenAI-compatible provider is largely a config change.

***

## Thinking/Reasoning Modes

Several providers support extended thinking or reasoning modes that show the model's internal reasoning process.

| Provider | Models | Parameter |
| - | - | - |
| Claude | Claude 4.x models | thinkingBudget (tokens) |
| Gemini | Gemini 3.x, 2.5 Pro/Flash | thinkingBudget (tokens) |
| OpenAI | o3, o4-mini, GPT-5.x hybrid | reasoningEffort (low/medium/high; GPT-5 also xhigh) |
| Groq | Qwen3-32b | reasoningFormat (parsed/hidden) |
| Cerebras | Qwen-3-235b | budget thinking |
| DeepSeek | deepseek-v4 (legacy reasoner alias) | reasoning modes |
| Kimi | kimi-k2.6 / k2.5 / k2.7-code | On by default (off in agent mode) |

### Using Thinking Output

The `thinking` field is available in the node output for downstream nodes:

```
{{openaiChatModel.thinking}}
{{anthropicChatModel.thinking}}
```

***

## Comparing Providers

| Feature | OpenAI | Claude | Gemini | OpenRouter | Groq | Cerebras | DeepSeek | Kimi | Mistral |
| - | - | - | - | - | - | - | - | - | - |
| Speed | Fast | Medium | Fast | Varies | Ultra-fast | Ultra-fast | Fast | Fast | Fast |
| Reasoning | o-series, GPT-5 | Extended thinking | Thinking mode | Model-dependent | Qwen3 | Qwen-3 | v4 reasoning | On by default | - |
| Context Window | 128K-1M | 200K-1M | 1M | Varies | 131K | 131K | up to 1M | 256K | up to 256K |
| Multimodal | Yes | Yes | Yes | Model-dependent | No | No | No | No | No |
| JSON Mode | Yes | No | No | Model-dependent | No | No | Yes | Yes | Yes |

Ollama and LM Studio are local nodes: capabilities depend entirely on the model you have pulled/loaded.

***

## Common Use Cases

### Text Generation

```
Prompt: Write a product description for: {{input.product_name}}
Temperature: 0.8
```

### Data Extraction

```
Prompt: Extract the email and phone from: {{input.text}}
Response Format: json_object
Temperature: 0
```

### Complex Reasoning (with thinking)

```
Model: claude-sonnet-4-6
Thinking Enabled: true
Thinking Budget: 4096
Prompt: Analyze this code and explain the bug: {{input.code}}
```

***

## Tips

<Tip>
  Use **temperature 0** for deterministic outputs like data extraction.
</Tip>

<Tip>
  Use **temperature 0.7-0.9** for creative writing tasks.
</Tip>

<Tip>
  Enable **thinking mode** for complex reasoning tasks that benefit from step-by-step analysis.
</Tip>

<Tip>
  Use **OpenRouter** to experiment with different models without managing multiple API keys.
</Tip>

<Warning>
  API calls cost money. Monitor your usage in your provider's dashboard.
</Warning>

***

## Error Handling

| Error | Cause | Solution |
| - | - | - |
| 401 Unauthorized | Invalid API key | Check/update API key |
| 429 Rate Limited | Too many requests | Add delay, reduce frequency |
| 500 Server Error | Provider issue | Retry later |

***

## Related

<CardGroup cols={2}>
  <Card title="AI Agent" icon="robot" href="/nodes/ai-agent">
    Use models with memory and tools
  </Card>

  <Card title="AI Skills" icon="wand-magic-sparkles" href="/nodes/skills">
    Extend Chat Agent capabilities
  </Card>

  <Card title="AI Tools" icon="screwdriver-wrench" href="/nodes/tools">
    Tool nodes for AI agents
  </Card>

  <Card title="AI Tutorial" icon="graduation-cap" href="/tutorials/ai-agent-workflow">
    Build an AI-powered workflow
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.