Overview
The/model command allows you to switch between different AI models without restarting the engine. This enables you to experiment with different models mid-session or optimize for specific use cases.
Syntax
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model_id | string | Yes | The identifier of the model to activate |
Behavior
When you execute/model:
- The engine validates that
model_idexists instate.AVAILABLE_MODELS - If valid, updates
state.CURRENT_MODELto the new model - Sets
state.MODEL_CONFIRMEDtoTrue - Persists the change to disk via
state.save_state() - Sends a system update confirming the model change
The model change is immediate and affects all subsequent AI responses in the current and future sessions.
Examples
Switch to Claude Sonnet
Switch to GPT-4
Invalid Model
Available Models
The available models are defined in the engine’s state configuration. Common models include:claude-sonnet-4-20250514- Anthropic Claude Sonnet (latest)claude-opus-4-20250514- Anthropic Claude Opusgpt-4-turbo- OpenAI GPT-4 Turbogpt-4o- OpenAI GPT-4 Optimized
WebSocket Response
The engine sends asystem_update event with the following payload:
Source Code Reference
The/model command is implemented in engine/commands.py:23-41:
Use Cases
Performance Optimization
Switch to faster models for quick interactions:Quality Enhancement
Switch to more capable models for complex storytelling:Cost Management
Switch to more economical models when appropriate:Common Issues
Related
- Session Commands - New sessions inherit the current model
- Configuration - Configure available models