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

# Reasoning and cache affinity

> Configure model reasoning and reuse a stable conversation hint.

Reasoning controls are model-specific. The gateway preserves the native controls for its current backend; it does not guarantee that every combination works on every model.

| Protocol | Controls |
| - | - |
| Chat | `reasoning_effort`, `reasoning`, `include_reasoning`, and legacy `thinking`. |
| Responses | `reasoning` and `include_reasoning`. |
| Messages | `thinking` and `output_config.effort`. |

Chat and Responses accept reasoning effort values documented in the API reference, including `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`, and `ultracode`. The active model decides which are meaningful. Prefer one control style in a request.

```javascript theme={null}
const result = await client.chat.completions.create({
  model: process.env.LIMITLESS_MODEL,
  messages: [{ role: "user", content: "Explain your answer briefly: what is 17 × 23?" }],
  reasoning_effort: "low",
  max_tokens: 1024,
});
console.log(result.choices[0]?.message.content);
```

For Messages, `thinking.type` can be `enabled`, `disabled`, or `adaptive`, with a model-supported `budget_tokens` when appropriate. Reasoning can consume output tokens before visible text appears. A short visible answer or empty content field does not imply zero output cost.

## Cache affinity

Send a stable `X-Limitless-Session-ID` for requests in one conversation. `X-Abliteration-Session-ID` is also accepted for client compatibility and takes precedence if both are supplied. Chat and Responses can use `prompt_cache_key` as a fallback.

```javascript theme={null}
const result = await client.chat.completions.create({
  model: process.env.LIMITLESS_MODEL,
  messages: [{ role: "user", content: "Summarize the context supplied above." }],
  max_tokens: 512,
}, {
  headers: { "X-Limitless-Session-ID": "conversation-123" },
});
```

The hint is limited to 512 characters and is isolated to your organization and project before it reaches the backend. Reusing a hint across different customers does not join their cache namespace. A hint neither stores conversation history nor guarantees a cache hit. Continue to send the needed messages and inspect provider-reported cache usage.

Cached input uses the configured cached-token rate. Messages cache-read tokens are discounted; cache-write tokens use the normal input rate. See [billing](/billing).


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