Tools
Modeltree
OpenClaw plugin that displays all configured AI models in a tree format grouped by provider
Configuration Example
{
"plugins": {
"modeltree": {
"enabled": true
}
}
}
README
# Model Tree Plugin for OpenClaw
A simple OpenClaw plugin that displays all your configured AI models in an organized tree format, grouped by provider with their shortcut aliases.
## What It Does
Instead of memorizing model names or digging through config files, just type `/modeltree` in any chat and see all your available models organized by provider (Anthropic, Google, Ollama, OpenAI, etc.) with their shortcut aliases in parentheses.
**Example output:**
```
Models:
anthropic
├─ claude-haiku-4-5 (haiku)
├─ claude-opus-4-5 (opus)
└─ claude-sonnet-4-5 (sonnet)
google
├─ gemini-3-flash (flash3)
└─ gemini-3-pro (gemini3)
ollama
├─ deepseek-r1-64k:latest (ds64)
├─ qwen2.5:14b-instruct-q5_K_M (qwen14)
└─ qwen2.5:1.5b (qwmini)
Switch: /model <alias> or /model <provider/model>
```
## Why This Is Useful
- **Quick reference** - See all your models and their aliases at a glance
- **No guessing** - Know exactly which shortcut to use when switching models
- **Discovery** - Find models you forgot you had configured
- **Fast switching** - Copy the alias and switch with `/model haiku` instead of typing the full name
## How It Works (Under The Hood)
When you type `/modeltree`, here's what happens:
1. **Reads your config** - The plugin looks at OpenClaw's configuration file (where your models are stored) and finds the list of models you've set up
2. **Organizes by provider** - It groups models by their provider (like sorting your apps into folders on your phone)
3. **Sorts alphabetically** - Within each provider, models are listed A-Z for easy scanning
4. **Formats as a tree** - The output uses special box-drawing characters (├─ └─) wrapped in a code block so they align properly, even in messaging apps like Telegram
5. **Sends back to chat** - The formatted tree appears in your conversation just like any other bot response
Think of it like asking your assistant "what tools do I have?" and getting back a neatly organized inventory.
## Installation
1. **Download the plugin:**
```bash
cd ~/.openclaw/extensions
git clone https://github.com/greghughespdx/openclaw-modeltree modeltree
```
2. **Enable in your config:**
Edit `~/.openclaw/openclaw.json` and add under `plugins`:
```json
{
"plugins": {
"modeltree": {
"enabled": true
}
}
}
```
3. **Restart OpenClaw:**
```bash
pkill -9 openclaw-gateway && openclaw gateway
```
Or just restart via your usual method.
4. **Test it:**
Type `/modeltree` in any connected chat (Telegram, WhatsApp, Discord, etc.)
## Requirements
- OpenClaw (any recent version)
- Node.js runtime (already required by OpenClaw)
## Usage
Just type `/modeltree` in any chat connected to your OpenClaw gateway.
The command works in:
- Direct messages (Telegram, WhatsApp, Signal, etc.)
- Group chats (if you have permissions)
- Web chat interface
- Any channel you've connected to OpenClaw
## Notes
- The tree format uses monospace code blocks for alignment
- Models are pulled from your `agents.defaults.models` config
- If you add new models to your config, restart the gateway and the tree updates automatically
## License
MIT
## Author
Greg Hughes
## Contributing
Found a bug or have a feature idea? Open an issue or submit a PR!
---
**Made for the OpenClaw community** 🦞
tools
Comments
Sign in to leave a comment