How to Change Your Agent's AI Model
Your OpenClaw agent can switch between different AI models at any time. This guide shows you two ways to make the change: simply ask your agent, or manually edit the configuration via SSH.
Why Change Your AI Model?
Different AI models have different strengths. Switching models lets you:
- Speed vs. Quality: Use a faster model for simple tasks, switch to a smarter model for complex reasoning.
- Specific Capabilities: Some models are better at coding, others at creative writing, translation, or analysis.
- Try New Models: As new models are released (Gemini 3.1 Flash Lite, etc.), you can test them immediately.
Method 1: Ask Your AI Agent (Easiest)
Your OpenClaw agent can change its own model configuration. Simply tell it what you want in plain English.
- Open a chat with your agent
- Via Telegram: Open your bot chat.
- Via WhatsApp: Open your connected WhatsApp chat.
- Via Web Dashboard: Use the chat interface.
- Send a request by using natural language to ask your agent to change models.
Examples:
Change my model to gemini-3.1-flash-lite

- Wait for confirmation. The AI agent will process the request and confirm when the change is complete.
- After any model change, type
/newin the chat to start a fresh session. This ensures your agent uses the new model for all future messages.
Method 2: Change via SSH (Manual)
If you prefer direct control or your agent is unresponsive, you can edit the configuration file manually.
- SSH into the VPS.
- Open the main configuration file using
nano:
nano /opt/openclaw/data/.openclaw/openclaw.json
- Find the section that defines your models. It will look something like this:

- You may change the model to your preferred option. Kindly ensure that the exact model name is used as recognized by your provider.
Example: Changing to Gemini 3.1 Flash Lite

- You may save the file and exit by using command:
- Press
Ctrl + Xto exit - Press
Yto confirm changes - Press
Enterto save
- For the changes to take effect, restart the service:
openclaw-restart
- In your chat interface (Telegram, WhatsApp, or web chat), type
/newto start a fresh session with the new model.
- You may verify the change by send a test message to your agent.

Need Further Assistance?
If you face any issues or need assistance, don’t hesitate to reach out — our support team is always ready to help!
🔧 Need help? Submit a Support Ticket
💬 Chat with us on Live Chat via our website
Updated on: 31/03/2026
Thank you!