# How to Configure Reasoning Models with Thinking Levels and Budgets in Neuro-SAN

> Configure reasoning models with thinking levels & budgets in Neuro-SAN. Learn to set provider-specific fields like reasoning_effort, thinking, and thinking_level in your HOCON file for optimal AI agent performance.

- Repository: [Cognizant AI Lab/neuro-san-studio](https://github.com/cognizant-ai-lab/neuro-san-studio)
- Tags: how-to-guide
- Published: 2026-02-27

---

**Configure reasoning models with thinking levels and budgets by setting provider-specific fields in the `llm_config` block of your Neuro-SAN agent-network HOCON file, such as `reasoning_effort` for OpenAI, `thinking` with `budget_tokens` for Anthropic, or `thinking_level`/`thinking_budget` for Gemini.**

Neuro-SAN Studio provides granular control over how large language models allocate internal tokens for planning, reflection, and chain-of-thought reasoning. By adjusting these parameters in your agent configuration, you can balance response quality against latency and cost across OpenAI, Anthropic, Google, and local Ollama deployments.

## Provider-Specific Reasoning Configuration

Neuro-SAN passes reasoning parameters through LangChain chat-model wrappers (e.g., `ChatOpenAI`, `ChatAnthropic`) which translate HOCON configuration into provider-specific API requests. Each provider exposes different controls for reasoning depth.

### OpenAI and Azure OpenAI

For OpenAI-compatible models (including `gpt-4o` and `gpt-5`), use the `reasoning_effort` field to control internal reasoning depth.

```hocon
llm_config {
  model_name = "gpt-5"
  reasoning_effort = "low"
  verbosity = "low"
}

```

Valid values for `reasoning_effort` are `minimal`, `low`, `medium`, and `high`. Higher levels increase accuracy on complex tasks but add latency and token cost.

### Anthropic and Amazon Bedrock

Claude models supporting extended thinking use a structured `thinking` object with a token budget.

```hocon
llm_config {
  model_name = "claude-3-7-sonnet-20250219"
  thinking = {
    type = "enabled"
    budget_tokens = 4000
  }
}

```

When deploying through Amazon Bedrock, nest the same object under `model_kwargs`:

```hocon
llm_config {
  model_name = "bedrock-us-claude-3-7-sonnet"
  model_kwargs {
    thinking = {
      type = "enabled"
      budget_tokens = 1024
    }
  }
}

```

The `budget_tokens` value caps the number of tokens the model can use for internal reasoning, preventing runaway costs while allowing complex planning.

### Google Gemini

Gemini models use different fields depending on the model generation. Gemini 3+ uses `thinking_level`, while Gemini 2.5 uses `thinking_budget`.

**Gemini 3+ (thinking levels):**

```hocon
llm_config {
  model_name = "gemini-3-flash"
  thinking_level = "high"
}

```

Valid values are `minimal`, `low`, `medium`, and `high`.

**Gemini 2.5 (token budgets):**

```hocon
llm_config {
  model_name = "gemini-2.5-flash"
  thinking_budget = 2000
}

```

For `thinking_budget`, use `0` to disable reasoning, `-1` for dynamic allocation, or a positive integer to set a specific token cap.

### Ollama (Local Models)

For local deployments via Ollama, toggle reasoning with a boolean or level string.

```hocon
llm_config {
  model_name = "qwen3:8b"
  reasoning = true
}

```

Valid values include `true`, `false`, `null`, `low`, `medium`, and `high`. This exposes Ollama's built-in reasoning toggle to control whether the model generates chain-of-thought tokens before responding.

## Key Implementation Files

Understanding where Neuro-SAN processes these configurations helps when debugging or extending functionality.

| File | Purpose |
|------|---------|
| [`docs/user_guide.md`](https://github.com/cognizant-ai-lab/neuro-san-studio/blob/main/docs/user_guide.md) | Comprehensive reference for all `llm_config` reasoning options and provider-specific parameters. |
| `neuro_san/internals/run_context/langchain/llms/default_llm_info.hocon` | Defines the default schema for each provider's LangChain class, including supported reasoning fields. |
| [`run.py`](https://github.com/cognizant-ai-lab/neuro-san-studio/blob/main/run.py) | CLI entry point that reads environment variables and injects `THINKING_FILE`/`THINKING_DIR` for debugging reasoning metadata. |
| [`coded_tools/anthropic_tool.py`](https://github.com/cognizant-ai-lab/neuro-san-studio/blob/main/coded_tools/anthropic_tool.py) | Implements the LangChain wrapper that translates `thinking` parameters into Anthropic API requests. |
| [`coded_tools/openai_tool.py`](https://github.com/cognizant-ai-lab/neuro-san-studio/blob/main/coded_tools/openai_tool.py) | Implements the LangChain wrapper that handles `reasoning_effort` for OpenAI-compatible endpoints. |

These files demonstrate how Neuro-SAN bridges HOCON configuration to LangChain's provider-specific implementations, ensuring your reasoning settings reach the underlying LLM API correctly.

## Summary

- **Configure reasoning models with thinking levels and budgets** in the `llm_config` block of your Neuro-SAN HOCON agent definitions.
- **OpenAI** uses `reasoning_effort` with levels from `minimal` to `high`.
- **Anthropic** uses a structured `thinking` object with `budget_tokens` to cap reasoning costs.
- **Gemini** uses `thinking_level` (Gemini 3+) or `thinking_budget` (Gemini 2.5) depending on model generation.
- **Ollama** uses a simple `reasoning` boolean or level string for local deployments.
- All parameters are processed through LangChain wrappers in `coded_tools/` and validated against schemas in `default_llm_info.hocon`.

## Frequently Asked Questions

### What is the difference between thinking levels and thinking budgets?

**Thinking levels** (used by OpenAI and Gemini 3+) are categorical controls that map to internal provider presets for reasoning depth, such as `low`, `medium`, or `high`. **Thinking budgets** (used by Anthropic and Gemini 2.5) are explicit integer caps on the number of tokens the model can use for internal reasoning, giving you precise cost and latency control.

### How do I disable reasoning entirely for a specific model?

Set the provider-specific field to its "off" value: use `reasoning_effort = "minimal"` or omit the field for OpenAI; set `thinking = { type: "disabled" }` or remove the `thinking` block for Anthropic; use `thinking_budget = 0` for Gemini 2.5; or set `reasoning = false` for Ollama models.

### Can I use different reasoning settings for different agents in the same network?

Yes. Each agent in your Neuro-SAN network has its own `llm_config` block. You can configure one agent with high reasoning effort for complex analysis tasks while setting another to minimal reasoning for simple extraction tasks, all within the same HOCON agent-network definition file.