| 1 | --- |
| 2 | title: "Moonshot AI" |
| 3 | description: "Configure Moonshot AI's language models with Continue, including setup instructions for their 8K, 32K, and 128K context window models with competitive pricing" |
| 4 | --- |
| 5 | |
| 6 | [Moonshot AI](https://platform.moonshot.cn/) provides high-quality large language model services with competitive pricing and excellent performance. |
| 7 | |
| 8 | ## Configuration |
| 9 | |
| 10 | To use Moonshot AI models, you need to: |
| 11 | |
| 12 | 1. Get an API key from [Moonshot AI Platform](https://platform.moonshot.cn/) |
| 13 | 2. Add the following configuration: |
| 14 | |
| 15 | <Tabs> |
| 16 | <Tab title="YAML"> |
| 17 | ```yaml title="config.yaml" |
| 18 | models: |
| 19 | - name: Moonshot |
| 20 | provider: moonshot |
| 21 | model: moonshot-v1-8k |
| 22 | apiKey: <YOUR_MOONSHOT_API_KEY> |
| 23 | ``` |
| 24 | </Tab> |
| 25 | <Tab title="JSON"> |
| 26 | ```json title="config.json" |
| 27 | { |
| 28 | "models": [ |
| 29 | { |
| 30 | "title": "Moonshot", |
| 31 | "provider": "moonshot", |
| 32 | "model": "moonshot-v1-8k", |
| 33 | "apiKey": "<YOUR_MOONSHOT_API_KEY>" |
| 34 | } |
| 35 | ] |
| 36 | } |
| 37 | ``` |
| 38 | </Tab> |
| 39 | </Tabs> |
| 40 | |
| 41 | ## Available Models |
| 42 | |
| 43 | Moonshot AI currently provides the following models: |
| 44 | |
| 45 | - `moonshot-v1-8k`: Base model with 8K context window |
| 46 | - `moonshot-v1-32k`: Base model with 32K context window |
| 47 | - `moonshot-v1-128k`: Base model with 128K context window |
| 48 | |
| 49 | ## Configuration Options |
| 50 | |
| 51 | | Option | Description | Default | |
| 52 | | --------- | ----------------- | ----------------------------- | |
| 53 | | `apiKey` | Moonshot API key | Required | |
| 54 | | `apiBase` | API base URL | `https://api.moonshot.cn/v1/` | |
| 55 | | `model` | Model name to use | `moonshot-v1-8k` | |
| 56 | |
| 57 | ## Example |
| 58 | |
| 59 | Here's a complete configuration example: |
| 60 | |
| 61 | <Tabs> |
| 62 | <Tab title="YAML"> |
| 63 | ```yaml title="config.yaml" |
| 64 | models: |
| 65 | - name: Moonshot-8K |
| 66 | provider: moonshot |
| 67 | model: moonshot-v1-8k |
| 68 | apiKey: <YOUR_MOONSHOT_API_KEY> |
| 69 | defaultCompletionOptions: |
| 70 | temperature: 0.7 |
| 71 | topP: 0.95 |
| 72 | maxTokens: 2048 |
| 73 | ``` |
| 74 | </Tab> |
| 75 | <Tab title="JSON"> |
| 76 | ```json title="config.json" |
| 77 | { |
| 78 | "models": [ |
| 79 | { |
| 80 | "title": "Moonshot-8K", |
| 81 | "provider": "moonshot", |
| 82 | "model": "moonshot-v1-8k", |
| 83 | "apiKey": "<YOUR_MOONSHOT_API_KEY>", |
| 84 | "completionOptions": { |
| 85 | "temperature": 0.7, |
| 86 | "topP": 0.95, |
| 87 | "maxTokens": 2048 |
| 88 | } |
| 89 | } |
| 90 | ] |
| 91 | } |
| 92 | ``` |
| 93 | </Tab> |
| 94 | </Tabs> |