Use gptel with Shannon
Register Shannon in gptel with gptel-make-openai and its host, keep the key in authinfo, and gptel-send, chat buffers and rewrites use Shannon models.
- From the gptel docs, Nov 7, 2026
- OpenAI Chat Completions
- About 3 min
About gptel
gptel is an LLM client for Emacs: send any buffer or region with gptel-send, keep conversations in chat buffers, rewrite a region and diff the result, add files as context, and give the model elisp tools. Any OpenAI-compatible service can be registered as a backend, so Shannon models work everywhere in Emacs.
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
-
Store the key in authinfo
gptel's default key lookup reads
~/.authinfo(or~/.authinfo.gpg), with the backend's host asmachineandapikeyaslogin.~/.authinfomachine api.shannon-ai.com login apikey password YOUR_API_KEY -
Register Shannon as the default backend
gptel-make-openaitakes the host withouthttps://.:key #'gptel-api-keyuses the authinfo lookup;:context-windowis in thousands of tokens.init.el(setq gptel-model 'Kimi-K3-uncensored-NVFP4 gptel-backend (gptel-make-openai "Shannon" :host "api.shannon-ai.com" :endpoint "/v1/chat/completions" :stream t :key #'gptel-api-key :models '((Kimi-K3-uncensored-NVFP4 :capabilities (media tool-use json) :mime-types ("image/jpeg" "image/png" "image/gif" "image/webp") :context-window 1023)))) -
Send a prompt
M-x gptelopens a chat buffer; send withC-c RET. In any other buffer,M-x gptel-sendsends the text up to the cursor, or the selection.
Check that it works
Send: Write a haiku about a cat in the rain.
You should see: Three lines inserted below your prompt from the Shannon model.
Models that fit gptel
Every id below meets what gptel 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 |
Model settings
gptel asks for these values. They follow the model you picked.
| Setting | Value | Why |
|---|---|---|
:context-window | 1023 | The model's window, in thousands of tokens. |
Good to know
- gptel uses Chat Completions for any host other than api.openai.com; Shannon serves it at
/v1/chat/completions. - Images and files reach the model only when its spec lists
mediaand the MIME types. - Tools are optional in gptel; every model in the picker can call them when you add some.
Tips
M-x gptel-menu(orC-ubeforegptel-send) sets the model, system message and context for the buffer or the next request; Shannon models appear asShannon:<id>.gptel-rewriteon a selected region previews the result; you can iterate, diff, ediff, merge or accept it.- Bundle a model, system message and tools with
gptel-make-presetand apply it from the menu. - gptel ships no tools; define them with
gptel-make-tooland select them in the menu. - Set
gptel-log-leveltoinfoand read the*gptel-log*buffer to see each request.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| "No `gptel-api-key' found in the auth source" | The authinfo line does not match the backend's host. | Use machine api.shannon-ai.com login apikey password sk-…. |
| Could not resolve host | :host includes https:// or a path. | Use :host "api.shannon-ai.com" and put the path in :endpoint. |
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 gptel work with Shannon?
Yes, as a gptel-make-openai backend with :host "api.shannon-ai.com".
Can gptel use Shannon's Anthropic endpoint?
Yes: gptel-make-anthropic with :host "api.shannon-ai.com"; it posts to /v1/messages.