Skip to content
LiteLLM

Frameworks and SDKs

Use LiteLLM with Shannon

Call Shannon from LiteLLM with the openai/ prefix and api_base, or add it to a LiteLLM proxy's model list.

  • Tested Nov 7, 2026
  • OpenAI Chat Completions
  • About 2 min

About LiteLLM

LiteLLM is a Python library and a proxy server that give many model providers one interface in the OpenAI format, with routing, budgets and logging. Teams put it in front of their apps to switch providers without code changes. Shannon plugs in as an OpenAI-compatible provider, in the SDK or in the proxy.

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 LiteLLM

    Shell
    pip install 'litellm[proxy]'
  2. Call Shannon from the SDK

    The openai/ prefix tells LiteLLM to use its OpenAI-compatible route; api_base points it at Shannon.

    Python
    import litellm
    
    kw = dict(model="openai/Kimi-K3-uncensored-NVFP4", api_base="https://api.shannon-ai.com/v1", api_key="YOUR_API_KEY")
    
    for chunk in litellm.completion(messages=[{"role": "user", "content": "Name three colours a cat can be."}], stream=True, **kw):
        print(chunk.choices[0].delta.content or "", end="")
    
    r = litellm.completion(
        messages=[{"role": "user", "content": "What is the weather in Oslo?"}],
        tools=[{"type": "function", "function": {"name": "get_weather",
                "parameters": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}}}],
        **kw,
    )
    print(r.choices[0].message.tool_calls[0].function.arguments)  # {"city": "Oslo"}
  3. Or serve Shannon through the LiteLLM proxy

    Add Shannon to the proxy's model_list; clients of the proxy then ask for model_name.

    config.yaml
    model_list:
      - model_name: Kimi-K3-uncensored-NVFP4
        litellm_params:
          model: openai/Kimi-K3-uncensored-NVFP4
          api_base: https://api.shannon-ai.com/v1
          api_key: os.environ/SHANNON_API_KEY
    
    general_settings:
      master_key: os.environ/LITELLM_MASTER_KEY
  4. Start the proxy

    Current LiteLLM refuses to start the proxy without a strong master key; clients send it as their bearer key.

    Shell
    export SHANNON_API_KEY=YOUR_API_KEY
    export LITELLM_MASTER_KEY=sk-$(openssl rand -hex 24)
    litellm --config config.yaml --port 4000

Check that it works

Send: Run the SDK sample.

You should see: The colours stream in, then the tool arguments print.

Models that fit LiteLLM

Every id below meets what LiteLLM 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
Kimi-K3-uncensored-3BIT-REAP 225,280 225,280 Yes
shannon-3 196,608 65,536 Yes
shannon-coder-1 131,072 65,536 No

Good to know

  • Without the openai/ prefix LiteLLM does not know which route to use and raises LLM Provider NOT provided.
  • LiteLLM has no price data for Shannon ids; add input_cost_per_token and output_cost_per_token under model_info if you want its spend tracking.
  • The proxy reads os.environ/SHANNON_API_KEY at start; export the variable before litellm --config.
  • Without master_key, the proxy stops at start with a message about a weak or unset master key.

Tips

  1. anthropic/<id> with api_base="https://api.shannon-ai.com" uses Shannon's Anthropic-format endpoint instead.
  2. Give proxy users a short alias in model_name and keep the Shannon id in litellm_params.model.
  3. Add several Shannon ids to model_list to route or fall back between them.

Troubleshooting

SymptomCauseFix
LLM Provider NOT provided The model has no openai/ prefix. Write the model as openai/<id>.
404 Not Found api_base lacks /v1. Use https://api.shannon-ai.com/v1.
401 through the proxy SHANNON_API_KEY was not set when the proxy started. Export it and restart the proxy.
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 LiteLLM work with Shannon?

Yes, as an OpenAI-compatible provider: model="openai/<id>" with api_base="https://api.shannon-ai.com/v1".

Can I put Shannon behind the LiteLLM proxy?

Yes; add it to model_list as shown, and every proxy client can use it.

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