Use gptme with Shannon
Declare Shannon as a [[providers]] entry in gptme's config.toml and run gptme with native tool calls on Shannon models.
- Tested Nov 7, 2026
- OpenAI Chat Completions
- About 2 min
About gptme
gptme is an open-source agent for the terminal that runs shell commands and Python, reads and patches files, and can work on its own until a task is done. People use it for coding, scripting and small automation jobs. It talks to any OpenAI-compatible server, so it can run on Shannon models with native tool calls.
What you need
- A Shannon API key
- Keys & usage
- Base URL
-
https://api.shannon-ai.com/v1Endpoint:/v1/chat/completions - Every snippet below follows your choice.
Set it up
-
Add Shannon as a provider
Put this in
~/.config/gptme/config.toml.namebecomes the prefix you pick models with;default_modelis used when you give only the prefix.~/.config/gptme/config.toml[[providers]] name = "shannon" base_url = "https://api.shannon-ai.com/v1" api_key_env = "SHANNON_API_KEY" default_model = "Kimi-K3-uncensored-NVFP4" -
Export the key and run gptme with native tools
Pick the model as
shannon/<id>. Use--tool-format tool: gptme then sends tool results as tool messages, which Shannon passes to the model.Shellexport SHANNON_API_KEY=YOUR_API_KEY gptme --tool-format tool -m shannon/Kimi-K3-uncensored-NVFP4 "Run the tests, fix what fails, then run them again."
A real run on gptme 0.36.0 with --tool-format tool: shell, patch and complete calls, all tests passing.
Check that it works
Send: What files are in this folder?
You should see: gptme calls its shell tool and lists them; the start-up lines show Using model: shannon/<id>.
Models that fit gptme
Every id below meets what gptme needs. The first one is the default in the snippets.
| Model id | Context window | Max output | Image input |
|---|---|---|---|
Kimi-K3-uncensored-NVFP4 | 1,022,976 | 262,144 | Yes |
shannon-coder-1 | 131,072 | 65,536 | No |
Kimi-K3.1-Pro-uncensored-NVFP4 | 1,022,976 | 262,144 | Yes |
Kimi-K3-uncensored-3BIT-REAP | 225,280 | 225,280 | Yes |
shannon-3 | 196,608 | 65,536 | Yes |
Good to know
- In gptme's default markdown tool format, command output goes back as a
systemmessage in the middle of the chat. Shannon keeps only the first system message, so the model never sees the output and repeats the same command. Start gptme with--tool-format tool. - gptme does not know Shannon ids. It warns "Unknown model … using closest match metadata", and the cost it prints is a guess, not your Shannon bill.
- In non-interactive mode (
-n), a reply without a tool call gets an automatic follow-up asking the model to callcomplete, which costs one more request.
Tips
gptme -nruns one task without prompts and exits when the model callscomplete.-tlimits tools, for example-t read-onlyor-t shell,patch,save.- gptme names new conversations with a background request to the same model. Give the conversation a name in its config to skip that request.
/model shannon/<id>switches models inside a session;gptme models listshows what gptme sees.- Our test took seven requests: read, run, patch, run, summary, and the
completecall after the follow-up.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| gptme runs the same command again and again | The markdown tool format sends output as mid-chat system messages, which Shannon drops. | Start gptme with --tool-format tool. |
401 | SHANNON_API_KEY is not set in the shell that runs gptme. | Export it; gptme reads the variable that api_key_env names. |
404 Not Found | base_url lacks /v1. | Use https://api.shannon-ai.com/v1. |
401 Unauthorized | The key is missing, mistyped or rotated. | Copy the key again from Keys & usage; it starts with sk-. |
context_length_exceeded / "prompt is too long" | The conversation is longer than the model's window. | Start a new chat, let the tool compact it, or pick a model with a larger window. |
insufficient_quota | Your balance cannot pay for the request. | Top up or change plan; the request is not retried by itself. |
Questions
Does gptme work with Shannon?
Yes, as a [[providers]] entry with native tool calls (--tool-format tool).
Can I use the local/ prefix instead?
gptme's docs also allow OPENAI_BASE_URL=https://api.shannon-ai.com/v1 gptme -m local/<id>. We tested the named provider, which keeps Shannon separate from other OpenAI settings.