Skip to content
gptel

Editors and IDE extensions

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/v1 Endpoint: /v1/chat/completions
Every snippet below follows your choice.

Set it up

  1. Store the key in authinfo

    gptel's default key lookup reads ~/.authinfo (or ~/.authinfo.gpg), with the backend's host as machine and apikey as login.

    ~/.authinfo
    machine api.shannon-ai.com login apikey password YOUR_API_KEY
  2. Register Shannon as the default backend

    gptel-make-openai takes the host without https://. :key #'gptel-api-key uses the authinfo lookup; :context-window is 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))))
  3. Send a prompt

    M-x gptel opens a chat buffer; send with C-c RET. In any other buffer, M-x gptel-send sends 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 idContext windowMax outputImage 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.

SettingValueWhy
: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 media and the MIME types.
  • Tools are optional in gptel; every model in the picker can call them when you add some.

Tips

  1. M-x gptel-menu (or C-u before gptel-send) sets the model, system message and context for the buffer or the next request; Shannon models appear as Shannon:<id>.
  2. gptel-rewrite on a selected region previews the result; you can iterate, diff, ediff, merge or accept it.
  3. Bundle a model, system message and tools with gptel-make-preset and apply it from the menu.
  4. gptel ships no tools; define them with gptel-make-tool and select them in the menu.
  5. Set gptel-log-level to info and read the *gptel-log* buffer to see each request.

Troubleshooting

SymptomCauseFix
"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.

Choose your language

All languages are equal. Pick the one you want to browse in.

Europe

Middle East & North Africa

South Asia

Southeast Asia

East Asia

Central Asia & Caucasus

Africa

Oceania

Constructed & Classical