Skip to content
LLM

Command-line tools

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

Set it up

  1. Install LLM

    Shell
    pipx install llm
  2. Register the Shannon model

    Create extra-openai-models.yaml in LLM's config folder; dirname "$(llm logs path)" prints where that is. api_key_name names 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
  3. Store the key and prompt

    Shell
    llm keys set shannon   # paste your key
    llm -m shannon-3 "Name three colours a cat can be."
    LLM CLI on shannon-coder-1: the model listed, a one-line answer about cat colours and a llm_version tool call
    A real run on LLM 0.37.1: the registered model, a prompt and a built-in tool call.

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 idContext windowMax outputImage 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_id is the name you type after -m; model_name is the id sent to Shannon.
  • supports_tools: true is needed before -T or --functions can use tools with the model.

Tips

  1. llm models default <id> makes a Shannon model the default, so -m can be left out.
  2. Pipe files in: cat notes.txt | llm "Summarise this".
  3. llm chat -m <id> keeps a conversation going; llm logs shows past prompts and answers.
  4. -T llm_time --td runs a built-in tool and shows each tool call.

Troubleshooting

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

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