Use LLM with Shannon
Register Shannon ids in LLM's extra-openai-models.yaml, store the key with llm keys set, and prompt Shannon models from the shell.
- Tested Nov 7, 2026
- OpenAI Chat Completions
- About 2 min
About LLM
LLM is a command-line tool and Python library by Simon Willison for prompting models from the shell, piping files in and logging every exchange to SQLite. OpenAI-compatible models are added in a small YAML file, so Shannon models work in prompts, chats, templates and 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
-
Install LLM
Shellpipx install llm -
Register the Shannon model
Create
extra-openai-models.yamlin LLM's config folder;dirname "$(llm logs path)"prints where that is.api_key_namenames the stored key.extra-openai-models.yaml- model_id: shannon-3 model_name: shannon-3 api_base: "https://api.shannon-ai.com/v1" api_key_name: shannon supports_tools: true
Check that it works
Send: llm models list | grep shannon
You should see: The Shannon id listed as an OpenAI Chat model.
Models that fit LLM
Every id below meets what LLM needs. The first one is the default in the snippets.
| Model id | Context window | Max output | Image input |
|---|---|---|---|
shannon-3 | 196,608 | 65,536 | Yes |
shannon-3-pro | 196,608 | 65,536 | Yes |
Kimi-K3-uncensored-3BIT-REAP | 225,280 | 225,280 | Yes |
Kimi-K3-uncensored-NVFP4 | 1,022,976 | 262,144 | Yes |
Good to know
model_idis the name you type after-m;model_nameis the id sent to Shannon.supports_tools: trueis needed before-Tor--functionscan use tools with the model.
Tips
llm models default <id>makes a Shannon model the default, so-mcan be left out.- Pipe files in:
cat notes.txt | llm "Summarise this". llm chat -m <id>keeps a conversation going;llm logsshows past prompts and answers.-T llm_time --tdruns a built-in tool and shows each tool call.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
Unknown model | The YAML file is not in LLM's config folder. | Put it next to the file llm logs path prints. |
401 | No key stored under the api_key_name. | Run llm keys set shannon. |
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 LLM work with Shannon?
Yes, as an extra OpenAI-compatible model with api_base: https://api.shannon-ai.com/v1.
Do tools work?
Yes, with supports_tools: true; we ran one of LLM's built-in tools.