Skip to main content

Run prompts against LLMs hosted by Moonshot

Project description

zopyx.llm-moonshot

LLM plugin for Moonshot AI’s models

PyPI Changelog License

LLM plugin for models hosted by Moonshot AI.

Installation

First, install the LLM command-line utility.

Now install this plugin in the same environment as LLM:

llm install zopyx.llm-moonshot

Configuration

You’ll need an API key from Moonshot. Grab one at platform.moonshot.cn.

Set secret key:

llm keys set moonshot
Enter key: <paste key here>

Usage

List what’s on the menu:

llm models list

You’ll see something like:

Moonshot: moonshot/kimi-latest
Moonshot: moonshot/moonshot-v1-auto
Moonshot: moonshot/moonshot-v1-128k-vision-preview
Moonshot: moonshot/kimi-k2-0711-preview
Moonshot: moonshot/moonshot-v1-128k
Moonshot: moonshot/moonshot-v1-32k-vision-preview
Moonshot: moonshot/moonshot-v1-8k-vision-preview
Moonshot: moonshot/moonshot-v1-8k
Moonshot: moonshot/kimi-thinking-preview
Moonshot: moonshot/moonshot-v1-32k
...

Fire up a chat:

llm chat -m moonshot/kimi-k2-0711-preview
Chatting with  moonshot/kimi-k2-0711-preview
Type 'exit' or 'quit' to exit
Type '!multi' to enter multiple lines, then '!end' to finish
> yo moonie
yo! what’s up, moonie?
>

Need raw completion?

llm -m moonshot/moonshot-v1-8k "Finish this haiku: Neon city rain"
Neon city rain,
Glistening streets, a symphony,
Echoes of the night.

Reasoning Content Support

This plugin now supports reasoning content for Moonshot's thinking models (models with "thinking" in the name). When using thinking models, you'll see the model's reasoning process displayed in real-time before the final response:

llm chat -m moonshot/kimi-k2-thinking
[Reasoning] (shown in cyan dim)

The user is asking me to solve a complex problem. Let me think through this step by step...
First, I need to understand the core requirements...
Then I'll analyze the available options...

[Response] (shown in bold green)

Here's my well-reasoned answer to your question...

Available Thinking Models

  • moonshot/kimi-k2-thinking - Latest reasoning model
  • moonshot/kimi-thinking-preview - Preview reasoning model

The reasoning content helps you understand:

  • Decision-making process - See how the model analyzes problems
  • Multi-step reasoning - Follow complex thought chains
  • Error detection - Catch logical gaps or misunderstandings early

Aliases

Save your wrists:

llm aliases set kimi moonshot/kimi-latest

Now:

llm -m kimi "write a haiku about the AI chatbot Sidney is misbehaving"

Development

Clone, venv, deps—same dance:

git clone https://github.com/ghostofpokemon/llm-moonshot.git
cd llm-moonshot
python3 -m venv venv
source venv/bin/activate
pip install -e .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zopyx_llm_moonshot-0.3.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zopyx_llm_moonshot-0.3.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file zopyx_llm_moonshot-0.3.1.tar.gz.

File metadata

  • Download URL: zopyx_llm_moonshot-0.3.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for zopyx_llm_moonshot-0.3.1.tar.gz
Algorithm Hash digest
SHA256 e4f1b968b887638f4c19d6f7dce57c88c43f10b69b47f3ae6e48d31a83ec77bd
MD5 c94fac70744e2f912470bbf45c89c8f6
BLAKE2b-256 91cd0dacf4d5ae605b218df8852ef9904868cb24dccd3a275650593ad38f5997

See more details on using hashes here.

File details

Details for the file zopyx_llm_moonshot-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for zopyx_llm_moonshot-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 beda35337df91d432b9c29e2532661830761306e080864121f54160982ebb5c3
MD5 dfe5be5206a6925c103974acb7f8133d
BLAKE2b-256 a486451682b67c4a7a385c409586748575af103c4daf2d4b7f44fad0ff515011

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page