Reasoning Control

Table of contents

  1. Reasoning Effort Levels
  2. Level 1 — Global default (LMConfig)
  3. Level 2 — Per-agent default (AgentOptions)
  4. Level 3 — Per-request override
  5. Precedence
  6. Choosing the Right Level
  7. Example: Mixed Reasoning in One Agent

For models that support chain-of-thought reasoning (e.g. Qwen3), Agentic lets you control the reasoning effort at three levels. Each level overrides the one above it.

Reasoning Effort Levels

ValueBehaviour
NoneDisables chain-of-thought thinking (enable_thinking=false)
LowEnables thinking with low effort
MediumEnables thinking with medium effort
HighEnables thinking with high effort (slower, more thorough)

Level 1 — Global default (LMConfig)

Applies to every request made through this OpenAIBackend instance unless overridden.

var lm = new OpenAIBackend(new LMConfig
{
    Endpoint  = "http://localhost:1234",
    ModelName = "Qwen/Qwen3-30B-A3B",
    Reasoning = ReasoningEffort.None,   // thinking off by default
});

Level 2 — Per-agent default (AgentOptions)

Overrides the global LMConfig.Reasoning for this agent only.

var agent = new Agent(lm, new AgentOptions
{
    SystemPrompt = "You are a helpful assistant.",
    Reasoning    = ReasoningEffort.High,   // override: high reasoning for this agent
});

Level 3 — Per-request override

Pass reasoning: to any Run* / Chat* call. This takes precedence over both the agent and global defaults.

// Reasoning off for a quick question
var response = await agent.ChatStreamAsync(
    "Quick question — what is 2 + 2?",
    reasoning: ReasoningEffort.None);

// High effort for a complex analysis
var response = await agent.ChatStreamAsync(
    "Analyse the trade-offs of this architecture design.",
    reasoning: ReasoningEffort.High);

Precedence

per-request reasoning:
    → AgentOptions.Reasoning
        → LMConfig.Reasoning
            → not sent (model default)

The highest level that is set wins. If none are set, no reasoning parameter is sent to the model and the model uses its default behaviour.

Choosing the Right Level

ScenarioRecommended Level
Simple lookups, data extractionNone
General Q&A, summarisationLow or not set
Code generation, analysisMedium
Architecture decisions, complex reasoningHigh
Cost-sensitive, high-volume workloadsNone

Example: Mixed Reasoning in One Agent

var agent = new Agent(lm, new AgentOptions
{
    Reasoning = ReasoningEffort.None,   // default: off for speed
});

// Quick data extraction — uses the agent default (None)
var data = await agent.ChatStreamAsync("Extract the date from: Invoice date: 2024-01-15");

// Complex analysis — override to High for this specific request
var analysis = await agent.ChatStreamAsync(
    "Now analyse the payment terms and flag any unusual clauses.",
    reasoning: ReasoningEffort.High);