Use Case:
| Suitable for users who want to add an OpenAI-compatible model in QClaw for code Q&A and Agent operations. |
|---|
Configuration Steps
Open Model Settings: Launch QClaw, go to "Settings", and locate "Model", "API", or "Model Provider".
Add a Provider: Click "Add", and choose OpenAI or OpenAI Compatible as the provider or protocol.
Enter Base URL: Enter https://api.maitoken.net/v1 . QClaw automatically appends
/chat/completionsto this address.Enter API Key: Paste your own MaiToken Key—do not manually prepend
Bearer.Enter Model Name: Enter
<Model ID>for Model ID; you can set the display name toMaiToken - Model ID.Save and Select Model: After saving the configuration, return to the chat window and select the newly added model from the model list.
| Field | Value |
|---|---|
| Protocol or Provider | OpenAI or OpenAI Compatible |
| Base URL | https://api.maitoken.net/v1 |
| API Key | <Your MaiToken Key> |
| Model ID | <Model ID> |
How to Test After Setup
Test Basic Chat: Enter
"Reply OK only"in the chat box. Receiving a normal reply confirms that your API Key, Base URL, and Model ID are basically correct.Test Project Reading: Open a test project and enter
"Please read the current project directory and list only the top-level file names without modifying any files."Test Agent: Ask the Agent to create a new file named
test-maitoken.txtcontaininghello, then verify the file was created. Do not run initial tests on a real production project.
Troubleshooting
| Issue | Suggested Fix |
|---|---|
| 404 or path error | Make sure the Base URL ends at /v1 and does not include the full /chat/completions path. |
| Model list is empty | Manually add the exact Model ID, or check the current API Key's model restriction list in the MaiToken Console. |
| Agent execution interrupted | Confirm that the model supports streaming output and tool calling, and switch to a model suited for coding or Agent tasks if needed. |
