Config struct allows you to customize how models process your requests. This example demonstrates all available configuration options and their effects.
Configuration Options
T3Router provides two main configuration parameters:Enable web search capabilities for the model. When enabled, the model can search the internet for up-to-date information.
Control how much computational effort the model uses for reasoning. Options:
ReasoningEffort::Low- Fast responses, less detailed reasoningReasoningEffort::Medium- Balanced performance and qualityReasoningEffort::High- Slower but more thorough reasoning
Complete Example
Creating Configurations
Default Configuration
Enable Search
- Current events and news
- Recent research or developments
- Real-time data (weather, stock prices, etc.)
- Verification of facts
Adjust Reasoning Effort
- Complex problem-solving
- Mathematical proofs
- Detailed analysis
- Multi-step reasoning tasks
Combined Configuration
Reasoning Effort Levels
- Low
- Medium
- High
- Simple questions
- Quick responses
- High throughput applications
- Straightforward tasks
- Fastest response time
- Lower computational cost
- Direct, concise answers
Expected Output
Configuration Best Practices
When to Enable Search
When to Enable Search
Enable
include_search when:- ✓ You need current events or recent information
- ✓ Verifying facts that change over time
- ✓ Looking up specific real-world data
- ✓ Questions about “latest” or “recent” developments
- ✗ Asking about concepts or general knowledge
- ✗ Creative writing or generation tasks
- ✗ Code generation or technical explanations
- ✗ Performance is critical (search adds latency)
Choosing Reasoning Effort
Choosing Reasoning Effort
Use Low for:
- Simple factual questions
- Quick translations
- Basic formatting tasks
- High-volume requests
- General conversation
- Moderate complexity tasks
- Most production applications
- Balanced quality/speed needs
- Complex mathematical problems
- Detailed analysis or research
- Multi-step logical reasoning
- When quality matters more than speed
Config Reuse
Config Reuse
You can clone and reuse configurations:Config implements
Clone, making it easy to reuse and modify.Configuration is passed per-request, not per-client. This allows you to use different settings for different messages in the same conversation.
Next Steps
- Review Basic Usage for simple getting started
- Learn about Conversation Context for managing multi-turn conversations
- Try Image Generation with different configurations
- Check the Config API Reference for technical details