# How to Configure Thinking Budget for Claude Models in Claudian

> Learn how to configure thinking budget for Claude models in Claudian. Adjust settings via claudian-settings.json or the chat interface gear icon for efficient AI responses.

- Repository: [YishenTu/claudian](https://github.com/YishenTu/claudian)
- Tags: how-to-guide
- Published: 2026-03-17

---

**To configure the thinking budget in Claudian, set the `thinkingBudget` key in [`claudian-settings.json`](https://github.com/YishenTu/claudian/blob/main/claudian-settings.json) to one of five preset levels (off, low, medium, high, xhigh), or use the toolbar gear icon in the chat interface—note that adaptive-thinking models use `effortLevel` instead and ignore the budget setting.**

Claudian, an open-source plugin for interacting with Claude models, allows precise control over how many tokens the model spends on internal reasoning before generating visible output. This guide covers the dual configuration system—**thinking budgets** for legacy models and **effort levels** for adaptive-thinking models—based on the source code in the `YishenTu/claudian` repository.

## Understanding Thinking Budget vs. Effort Level

Claudian implements two distinct mechanisms for controlling model reasoning, determined by the model type selected.

### When to Use Thinking Budget

Use the **thinking budget** when working with **custom or legacy Claude models** (e.g., `claude-3-haiku-20240307`). The budget sets a hard token ceiling for the model's internal reasoning block. The available presets are defined in [[`src/core/types/models.ts`](https://github.com/YishenTu/claudian/blob/main/src/core/types/models.ts)](https://github.com/YishenTu/claudian/blob/main/src/core/types/models.ts#L18-L24):

```typescript
export const THINKING_BUDGETS = [
  { value: 'off',    label: 'Off',    tokens: 0 },
  { value: 'low',    label: 'Low',    tokens: 4_000 },
  { value: 'medium', label: 'Med',    tokens: 8_000 },
  { value: 'high',   label: 'High',   tokens: 16_000 },
  { value: 'xhigh',  label: 'Ultra',  tokens: 32_000 },
];

```

The budget is stored in user settings under the key `thinkingBudget` and defaults to `'off'` as specified in [`DEFAULT_SETTINGS`](https://github.com/YishenTu/claudian/blob/main/src/core/types/settings.ts#L15-L18).

### When to Use Effort Level

For **adaptive-thinking models**—the built-in Claude models (`haiku`, `sonnet`, `opus` and their 1M token variants)—Claudian ignores the `thinkingBudget` setting and instead uses **`effortLevel`** (`low`, `medium`, `high`, `max`). The system detects these models via the `isAdaptiveThinkingModel()` function in [[`src/core/types/models.ts`](https://github.com/YishenTu/claudian/blob/main/src/core/types/models.ts)](https://github.com/YishenTu/claudian/blob/main/src/core/types/models.ts#L56-L60):

```typescript
export function isAdaptiveThinkingModel(model: string): boolean {
  if (DEFAULT_MODEL_VALUES.has(model)) return true;
  return /claude-(haiku|sonnet|opus)-/.test(model);
}

```

When this function returns `true`, the UI automatically hides the budget selector and displays the effort selector instead.

## Configuration Methods

You can configure the thinking budget through three interfaces: the chat toolbar, direct JSON editing, or the programmatic API.

### Via the Chat Toolbar

The simplest method uses the **Thinking** gear icon in the chat interface:

1. Open any chat pane in Claudian.
2. Locate the **Thinking** gear icon in the toolbar (or the **Effort** selector if using an adaptive model).
3. Click the gear to reveal the five budget options: **Off**, **Low**, **Med**, **High**, and **Ultra**.
4. Select the desired level.

The UI calls `callbacks.onThinkingBudgetChange(budgetValue)`, which persists the value to [`.claude/claudian-settings.json`](https://github.com/YishenTu/claudian/blob/main/.claude/claudian-settings.json). The implementation resides in [[`src/features/chat/ui/InputToolbar.ts`](https://github.com/YishenTu/claudian/blob/main/src/features/chat/ui/InputToolbar.ts)](https://github.com/YishenTu/claudian/blob/main/src/features/chat/ui/InputToolbar.ts#L90-L118), specifically the `renderBudgetGears` method.

### Editing Settings JSON Directly

For precise control or automation, edit the settings file directly:

```json
{
  "model": "claude-3-5-sonnet-20240620",
  "thinkingBudget": "medium",
  "effortLevel": "high"
}

```

Store this file at `~/.claude/claudian-settings.json` (or the workspace-specific location). Changes take effect immediately upon saving, as the plugin hot-reloads settings. The interface definition in [[`src/core/types/settings.ts`](https://github.com/YishenTu/claudian/blob/main/src/core/types/settings.ts)](https://github.com/YishenTu/claudian/blob/main/src/core/types/settings.ts) specifies:

```typescript
export interface ClaudianSettings {
  model: ClaudeModel;
  thinkingBudget: ThinkingBudget;   // Legacy token budget
  effortLevel: EffortLevel;        // Adaptive-thinking models only
  // ... other settings
}

```

### Programmatically via the Plugin API

Developers building plugins or custom commands can modify the budget through the settings API:

```typescript
// Force a high budget for the next query
await plugin.settings.set('thinkingBudget', 'high');
await plugin.callbacks.onThinkingBudgetChange('high');

```

The `QueryOptionsBuilder` class in [[`src/core/agent/QueryOptionsBuilder.ts`](https://github.com/YishenTu/claudian/blob/main/src/core/agent/QueryOptionsBuilder.ts)](https://github.com/YishenTu/claudian/blob/main/src/core/agent/QueryOptionsBuilder.ts#L53-L66) subsequently reads this value when constructing SDK calls:

```typescript
const budgetSetting = ctx.settings.thinkingBudget;
const budgetConfig = THINKING_BUDGETS.find(b => b.value === budgetSetting);
const thinkingTokens = budgetConfig?.tokens ?? null;

return {
  model: ctx.settings.model,
  thinkingTokens: thinkingTokens && thinkingTokens > 0 ? thinkingTokens : null,
  effortLevel: isAdaptiveThinkingModel(ctx.settings.model) ? ctx.settings.effortLevel : null,
  // ... other options
};

```

## Practical Code Examples

### Reading the Current Budget

Access the current setting from a custom command:

```typescript
const currentBudget = plugin.settings.thinkingBudget; // 'off' | 'low' | 'medium' | 'high' | 'xhigh'
new Notice(`Current thinking budget: ${currentBudget}`);

```

### Implementing a Slash Command

Create a `/set-budget` command that validates and applies budget changes:

```typescript
// src/utils/slashCommand.ts
if (args[0] && THINKING_BUDGETS.some(b => b.value === args[0])) {
  await this.plugin.settings.set('thinkingBudget', args[0] as ThinkingBudget);
  await this.plugin.callbacks.onThinkingBudgetChange(args[0] as ThinkingBudget);
  new Notice(`Thinking budget set to ${args[0]}`);
}

```

### Verifying SDK Token Limits

Inspect the generated query options to confirm the budget translates correctly:

```typescript
import { QueryOptionsBuilder } from './src/core/agent/QueryOptionsBuilder';

const options = QueryOptionsBuilder.buildColdStartQueryOptions(ctx);
console.log('Thinking tokens sent to SDK:', options.thinkingTokens);
// Outputs: 8000 (for 'medium' budget) or null (for 'off')

```

## Summary

- **Two systems exist**: `thinkingBudget` for legacy models (0–32k tokens) and `effortLevel` for adaptive-thinking models.
- **Five preset levels** control token allocation: off (0), low (4,000), medium (8,000), high (16,000), and xhigh/ultra (32,000).
- **Configuration sources**: Chat toolbar UI, `~/.claude/claudian-settings.json`, or programmatic API via `plugin.settings.set()`.
- **Detection logic** in `isAdaptiveThinkingModel()` determines which UI control appears.
- **Implementation** converts budget strings to token integers in [`QueryOptionsBuilder.ts`](https://github.com/YishenTu/claudian/blob/main/QueryOptionsBuilder.ts) before passing to the Claude SDK.

## Frequently Asked Questions

### What is the default thinking budget in Claudian?

The default value is `'off'`, meaning no tokens are allocated to the thinking block. This is defined in the `DEFAULT_SETTINGS` constant in [[`src/core/types/settings.ts`](https://github.com/YishenTu/claudian/blob/main/src/core/types/settings.ts)](https://github.com/YishenTu/claudian/blob/main/src/core/types/settings.ts#L15-L18), which sets `thinkingBudget: 'off'` and `effortLevel: 'medium'`.

### Why can't I see the thinking budget option for some models?

If you are using an **adaptive-thinking model** (built-in `haiku`, `sonnet`, `opus`, or their 1M variants), Claudian hides the budget selector and shows an **Effort** selector instead. The `isAdaptiveThinkingModel()` function in [[`src/core/types/models.ts`](https://github.com/YishenTu/claudian/blob/main/src/core/types/models.ts)](https://github.com/YishenTu/claudian/blob/main/src/core/types/models.ts#L56-L60) detects these models via regex matching against `claude-(haiku|sonnet|opus)-`.

### How many tokens does each budget level allocate?

According to the `THINKING_BUDGETS` array in [[`src/core/types/models.ts`](https://github.com/YishenTu/claudian/blob/main/src/core/types/models.ts)](https://github.com/YishenTu/claudian/blob/main/src/core/types/models.ts#L18-L24): **Off** = 0 tokens, **Low** = 4,000 tokens, **Medium** = 8,000 tokens, **High** = 16,000 tokens, and **XHigh/Ultra** = 32,000 tokens. These values are passed as `thinkingTokens` to the Claude SDK.

### Can I set a custom token count outside the preset values?

No. Claudian enforces the five enumerated values defined in `ThinkingBudget` type. The `QueryOptionsBuilder` only accepts the preset mappings; to use arbitrary token counts, you would need to modify the `THINKING_BUDGETS` constant in the source code or bypass the settings system entirely when constructing raw SDK calls.