Articles on: VPS Hosting

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.


💡 Tip: You can also set up fallback models. If your primary model fails, your agent automatically uses a backup. See our Fallback Models guide for details.


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.


  1. 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.


  1. Send a request by using natural language to ask your agent to change models.


Examples:

Change my model to gemini-3.1-flash-lite



  1. Wait for confirmation. The AI agent will process the request and confirm when the change is complete.


  1. After any model change, type /new in the chat to start a fresh session. This ensures your agent uses the new model for all future messages.


💡 No SSH Needed: You don't need to log into your VPS at all. Your AI agent handles everything for you.


Method 2: Change via SSH (Manual)


⚠️If you would like to change to an AI model from a different AI provider, please refer to the guideline Setting Up AI Providers in OpenClaw (Ollama Free Included). If you would like to change only the model within the same AI provider, you may proceed with the steps below.


If you prefer direct control or your agent is unresponsive, you can edit the configuration file manually.


  1. SSH into the VPS.


  1. Open the main configuration file using nano:


nano /opt/openclaw/data/.openclaw/openclaw.json


  1. Find the section that defines your models. It will look something like this:


  1. 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


  1. You may save the file and exit by using command:


  • Press Ctrl + X to exit
  • Press Y to confirm changes
  • Press Enter to save


  1. For the changes to take effect, restart the service:


openclaw-restart


  1. In your chat interface (Telegram, WhatsApp, or web chat), type /new to start a fresh session with the new model.


  1. 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

Was this article helpful?

Share your feedback

Cancel

Thank you!