Coding agents
Use Autohand models in Cline
Point the Cline OpenAI Compatible provider at Autohand, then use Moa to plan and Fantail to act.
Quick answer
How do I use Autohand models in Cline?
In the Cline settings, select the OpenAI Compatible API provider, set the base URL to https://api.autohand.ai/v1, paste your Autohand API key, and enter fantail or moa as the model ID. Enable separate models for Plan and Act to plan with Moa and implement with Fantail.
- Status
- Available through the OpenAI Compatible provider
- Requires
- An Autohand account, an Autohand API key, and the Cline extension.
- Configure with
- API Provider: OpenAI Compatible, with the Autohand base URL, API key, and model ID.
- Best for
- Planning with Moa and implementing with Fantail in the same task.
Know before you start: Cline has no separate model setting for its subagents. Subagents are read-only research agents that run within the current task.
Prerequisites
- An Autohand account. Sign up or sign in to Console. The Free plan includes Fantail. Moa requires the Pro plan or above.
- An Autohand API key. The first step shows how to create one.
- The Cline extension for VS Code or JetBrains.
Step 1: Create an Autohand API key
- Sign in to Autohand Console.
- Open API Keys and select Create API Key.
- Enter a name that identifies the agent and machine, for example
cline-laptop. - Select Create Key and copy the value. Console shows the key only once.
Step 2: Keep the key available
Cline stores the key you paste in its settings. Keep a copy in an environment variable so you can test the key from a terminal.
Store the key in an environment variable so it stays out of configuration files and source control.
# macOS and Linux (add the line to ~/.zshrc or ~/.bashrc to keep it)
export AUTOHAND_API_KEY="your-api-key"
# Windows PowerShell (current session)
$env:AUTOHAND_API_KEY = "your-api-key"
# Windows (persist for new sessions)
setx AUTOHAND_API_KEY "your-api-key"
Confirm that the key works and that your plan can see the models:
curl https://api.autohand.ai/v1/models \
-H "Authorization: Bearer $AUTOHAND_API_KEY"
The response lists fantail, and moa when your plan includes it. A 401 response means the key is missing or not recognised.
Step 3: Configure the OpenAI Compatible provider
- Open Cline and select the settings icon.
- In API Provider, select OpenAI Compatible.
- In Base URL, enter
https://api.autohand.ai/v1. - In API Key, paste your Autohand API key.
- In Model, enter
fantail. - Expand Model Configuration and set the limits for the model:
- Max Output Tokens:
16000for Fantail, or262144for Moa. - Context Window:
262144for Fantail, or1048576for Moa.
- Max Output Tokens:
- Leave Use Azure Identity Authentication cleared.
Step 4: Choose Fantail or Moa
| Model ID | Use it for | Context | Max output | Plans |
|---|---|---|---|---|
fantail | Main coding loops, quick fixes, reviews, and sub-agents | 262,144 tokens | 16,000 tokens | Free and above |
moa | Planning, large refactors, and multi-file reasoning | 1,048,576 tokens | 262,144 tokens | Pro and above |
Use Moa to plan and Fantail to act
- Open Cline settings.
- Enable Use different models for Plan and Act.
- For Plan mode, select OpenAI Compatible and enter
moawith the Moa limits. - For Act mode, select OpenAI Compatible and enter
fantailwith the Fantail limits.
Cline switches to the configured model when you switch between Plan and Act.
Step 5: Run a test prompt
Start a new task and send:
Summarize what this repository does in three sentences. Do not edit files.
A text answer confirms that Cline reaches Autohand. If Cline shows an authentication or connection error, see Troubleshooting.
Subagents and Fantail
Cline subagents are read-only research agents that run in parallel through the use_subagents tool. They can read and search files and run read-only commands, and they cannot edit files. Cline does not provide a separate model setting for subagents.
To keep research inexpensive, do subagent-heavy exploration in a mode that uses Fantail, for example Act mode with Fantail selected. To turn subagents off, disable the use_subagents tool in Settings > Features > Agent.
Troubleshooting
| Symptom | Cause | Resolution |
|---|---|---|
401 with Credential not recognised. or Missing Autohand credential. | The agent sent no key, a mistyped key, or a revoked key. | Confirm that AUTOHAND_API_KEY is set in the environment that starts the agent. Create a new key in Console if needed. |
404 or Not found | The base URL or the API format is wrong. | Use https://api.autohand.ai/v1 with the OpenAI Chat Completions format. Autohand does not serve /v1/responses or /v1/messages. |
| Model not found or not available | The model ID is misspelled, or your plan does not include it. | Use the exact IDs fantail or moa. Moa requires the Pro plan or above. |
| Context length or output errors | The agent uses default limits for an unknown model. | Set the limits for Fantail (262,144 context, 16,000 output) or Moa (1,048,576 context, 262,144 output). |
Invalid API Key in Cline | The key in the Cline settings differs from the key in Console. | Paste the key again, then test it with the curl command in Step 2. |
Next steps
Common questions
Cline and Autohand FAQ
Which API provider do I select in Cline for Autohand?
Select OpenAI Compatible and set the base URL to https://api.autohand.ai/v1.
Can Cline plan with Moa and act with Fantail?
Yes. Enable Use different models for Plan and Act, then enter moa for Plan mode and fantail for Act mode.
Can I choose a model for Cline subagents?
No. Cline does not provide a separate model setting for subagents.