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

# Models & Routers

> Configure AI models and intelligent routing in your space

## Overview

Every space can be configured with default AI models and routers that determine which AI models handle conversations. This provides control over cost, performance, and reliability for your AI interactions.

## Model Configuration

### Default Model Selection

Set a default model that will be used for new conversations in your space:

<Steps>
  <Step title="Access Space Settings">
    Open your space and click the Settings icon (gear) in the top right
  </Step>

  <Step title="Navigate to Models">
    Find the "Default Model & Router" section
  </Step>

  <Step title="Select Model">
    Choose from available models or select a router
  </Step>

  <Step title="Save Changes">
    The configuration is saved automatically
  </Step>
</Steps>

### Available Models

Pulze provides access to models from major providers:

<CardGroup cols={2}>
  <Card title="OpenAI" icon="robot">
    GPT-4, GPT-4 Turbo, GPT-3.5 Turbo
  </Card>

  <Card title="Anthropic" icon="brain">
    Claude 3 Opus, Sonnet, Haiku
  </Card>

  <Card title="Google" icon="google">
    Gemini Pro, Gemini Ultra
  </Card>

  <Card title="Others" icon="layer-group">
    Cohere, Meta Llama, Mistral, and more
  </Card>
</CardGroup>

[View all available models →](/models/overview)

### Model Features

Each model card displays:

* **Provider Logo**: Visual identification
* **Model Name**: Full model identifier
* **Capabilities**: Supported features (vision, function calling, etc.)
* **Context Window**: Maximum token limit
* **Pricing**: Cost per million tokens
* **Performance**: Speed and quality metrics

## Smart Model

The **Smart Model** is Pulze's intelligent routing system that automatically selects the best model based on your request:

### How It Works

1. Analyzes your prompt and context
2. Evaluates available models
3. Selects the optimal model for the task
4. Routes your request automatically

### Benefits

* **Cost Optimization**: Uses appropriate models to reduce costs
* **Quality Assurance**: Matches complex tasks to capable models
* **Simplified Management**: No manual model selection needed
* **Adaptive Learning**: Improves over time based on outcomes

### When to Use Smart Model

* General-purpose conversations
* Mixed workload types
* Cost-conscious deployments
* Teams with varying AI needs

## Router Configuration

Routers provide advanced model selection strategies beyond single model defaults:

### Router Types

<AccordionGroup>
  <Accordion title="Failover Router">
    Automatically falls back to alternative models if the primary model fails or is unavailable.

    **Configuration:**

    * Primary model
    * Ordered list of fallback models
    * Retry logic
    * Error handling
  </Accordion>

  <Accordion title="Load Balancing Router">
    Distributes requests across multiple models for improved reliability and throughput.

    **Configuration:**

    * Pool of models
    * Distribution strategy
    * Health checks
    * Traffic weights
  </Accordion>

  <Accordion title="Cost-Optimized Router">
    Routes requests to the most cost-effective model that meets quality requirements.

    **Configuration:**

    * Quality threshold
    * Cost constraints
    * Model eligibility
    * Fallback options
  </Accordion>

  <Accordion title="Custom Router">
    Build your own routing logic based on specific business rules.

    **Configuration:**

    * Custom routing rules
    * Condition evaluation
    * Model mapping
    * Override options
  </Accordion>
</AccordionGroup>

[Learn more about custom routers →](/features/custom-routers)

### Creating a Router

<Steps>
  <Step title="Navigate to Routers">
    Go to Permissions → Routers in the navigation
  </Step>

  <Step title="Create New Router">
    Click "Create Router" button
  </Step>

  <Step title="Configure Router">
    * Name your router
    * Select router type
    * Configure routing rules
    * Add fallback models
  </Step>

  <Step title="Test Router">
    Validate routing logic with test requests
  </Step>

  <Step title="Set as Default">
    Assign router to your space
  </Step>
</Steps>

## Failover Chains

Failover chains ensure reliability by specifying backup models:

### Configuration

1. **Primary Model**: First choice for requests
2. **Fallback Models**: Ordered list of alternatives
3. **Retry Logic**: When to trigger failover
4. **Error Handling**: How to handle complete failures

### Use Cases

* **High Availability**: Mission-critical applications
* **Provider Diversity**: Reduce dependency on single provider
* **Regional Failover**: Geographic redundancy
* **Rate Limit Handling**: Automatic overflow to alternatives

### Example Configuration

```
Primary: GPT-4 Turbo
Fallbacks:
  1. Claude 3 Opus
  2. Gemini Pro
  3. GPT-3.5 Turbo
```

## Model Switching

Users can override the default model during conversations:

### In-Conversation Switching

1. Open the Models panel (gear icon in chat)
2. Select a different model
3. Continue the conversation with the new model
4. Previous context is maintained

### Use Cases for Switching

* **Task-Specific Models**: Use specialized models for specific tasks
* **Cost Management**: Switch to cheaper models for simple tasks
* **Quality Boost**: Upgrade to premium models when needed
* **Testing**: Compare outputs across different models

## Model Settings Panel

The right sidebar in conversations provides model configuration:

### Available Options

* **Model Selector**: Choose active model
* **Router Selector**: Switch to router-based selection
* **Model Features**: View capabilities
* **Performance Settings**: Configure temperature, top-p, etc.
* **Cost Tracking**: Monitor token usage

### Advanced Settings

* **Temperature**: Control randomness (0-2)
* **Max Tokens**: Limit response length
* **Top P**: Nucleus sampling threshold
* **Frequency Penalty**: Reduce repetition
* **Presence Penalty**: Encourage topic diversity

## Model Recommendations

Pulze provides intelligent model recommendations based on:

* **Task Type**: Analysis, generation, coding, etc.
* **Input Length**: Context window requirements
* **Cost Constraints**: Budget considerations
* **Quality Requirements**: Output quality needs
* **Feature Needs**: Vision, function calling, etc.

## Best Practices

<AccordionGroup>
  <Accordion title="Default Configuration">
    * Set Smart Model as default for general use
    * Configure failover chain for production
    * Test router configuration before deployment
    * Monitor model performance regularly
  </Accordion>

  <Accordion title="Cost Optimization">
    * Use Smart Model for automatic cost optimization
    * Create cost-aware routers for budget control
    * Monitor token usage by model
    * Switch models based on task complexity
  </Accordion>

  <Accordion title="Performance">
    * Balance cost and quality in model selection
    * Use failover for high-availability needs
    * Test models before committing to defaults
    * Review model performance metrics
  </Accordion>

  <Accordion title="Team Management">
    * Document model selection rationale
    * Train team on when to switch models
    * Set clear guidelines for model usage
    * Review and update configurations quarterly
  </Accordion>
</AccordionGroup>

## Model Analytics

Track model usage in your space:

* **Request Volume**: Calls per model
* **Token Consumption**: Usage by model
* **Cost Analysis**: Spending per model
* **Performance Metrics**: Latency, success rates
* **Quality Scores**: User ratings and feedback

## Next Steps

<CardGroup cols={2}>
  <Card title="Available Models" icon="robot" href="/models/overview">
    Explore all available AI models
  </Card>

  <Card title="Custom Routers" icon="route" href="/features/custom-routers">
    Learn about advanced routing
  </Card>

  <Card title="Space Members" icon="users" href="/pulze/spaces/members">
    Manage team access
  </Card>

  <Card title="Back to Spaces" icon="rocket" href="/pulze/spaces/overview">
    Return to Spaces overview
  </Card>
</CardGroup>
