# AI modes

> Thinking level and context window per step of work and role: organisation settings, session parameters, the record of a change. Enterprise.

An **AI mode** is two parameters of how the model works on a step: the **thinking level** (how long it thinks before answering) and the **context window** (how much of the dialogue it keeps in mind before compacting it). Buff sets them **per step of work and per role** — separately for answering a question, for a research’s analyst and reviewer, for the developer in a task, for an audit — and lets you override them for one session.

The section is available in **Enterprise**. The Community edition has no modes: the model works as it and its provider are set up.

## Words and values

**Thinking level** — one of the levels shared with Buff Code: *default* (as the model and its provider are set up), *off*, *minimal*, *low*, *medium*, *high*, *very high*, *maximum*. A model that cannot think by levels gets the request without one — a choice never breaks the work, it simply does not apply.

**Context window** — a cap in tokens: *compact* (64k), *medium* (200k), *large* (500k), *the model’s maximum* or a *custom* number. The cap **cuts the model’s window and never raises it**: “large” on a model with a 128k window means 128k. The smaller the window, the sooner the dialogue is compacted and the less each turn costs.

## Three layers

The value of a “step × role” cell comes from three layers; a lower layer fills in what the upper ones leave unsaid.

1. **The installation** — defaults set by the installation administrator in the admin panel, the “AI modes” section. The former single thinking level from “Configuration” lives there too — it applies until a cell is named.
2. **The organisation** — Settings → “AI modes”: the matrix of steps and roles for your organisation. An empty cell inherits the installation; a reset returns it to inheriting. Changed by the owner and members with the settings permission.
3. **The session** — the parameters of one question, research, task or audit. Set when it is created and changed as it goes.

## Steps and roles

| Step | Roles | What it is |
|---|---|---|
| Ask | responder | the answer to a question in “Ask” and the bot’s answers in connections |
| Research | analyst, reviewer | deep research: who writes and who checks |
| Audit | analyst, reviewer | forming the audit sections |
| Task formulation | analyst, reviewer | the statement and its rework |
| Decomposition | analyst, reviewer | splitting into subtasks |
| Analysis | analyst, reviewer | the analysis before development |
| Development | developer | writing the code |
| Code check | reviewer, analyst, developer | checking the changes |
| Merge | reviewer, analyst, developer | merging and resolving conflicts |
| Code review | change summary, discussion | the summary for review and the discussion in “Ask” about a task |
| Buff Code through the connector | developer | work in Buff Code on the organisation’s model |

## A session’s parameters

The forms that start a question, a research or a task, and the audit launch, carry a folded **“AI parameters”** block. Folded, it shows what will apply (the organisation’s values for this kind of work); open, it offers the two choices for this session only. A form left untouched sends nothing — the layers decide.

In an open session the parameters show as a **chip in the header**: “Thinking: high · Context: medium, 200k”. A press opens the same two choices. A change **applies from the next run** and stays in the session as a record:

- in “Ask” and in a research — a service line of the dialogue: who changed what, and when;
- in a task and an audit — an event in the feed and the task’s history (“AI mode changed”).

So at any moment it is clear which parameters produced each answer.

## Where it is in the products

- **The workspace** — Settings → “AI modes” (the organisation), “AI parameters” on the forms, the chip in a session.
- **The phone** — the same block on the forms and the chip in an open question, research and task (see [the Buff app](/en/docs/mobile)); an installation without the feature shows no block.
- **Buff Code** — the window and the console get the organisation’s model window and its default level from the connector; your own context limit is picked right in the chat (see [Models and spend](/en/docs/buff-code/models#context-window-and-thinking-mode)).
- **Enterprise** — the installation’s defaults in the admin panel (see [Enterprise on-premise](/en/docs/self-hosted/enterprise#ai-modes)).

## Spend

The thinking level and the window affect the price of a turn: more thinking — more tokens per answer, a larger window — more tokens per request to the model. Spend is visible, as before, in the “Billing” section and in [the cost of a question](/en/docs/cost-of-a-question).
