Skip to content

feat: add Qwen and Moonshot (Kimi) provider support #110

Description

@sanjay-senthilkumar01

Overview

Add two Chinese LLM providers — Qwen (Alibaba Cloud) and Moonshot (Kimi) — both use OpenAI-compatible APIs so the integration follows the exact same pattern as existing providers like DeepSeek and Cerebras.

Providers

Provider Base URL Key prefix Docs
Qwen https://dashscope.aliyuncs.com/compatible-mode/v1 sk- https://help.aliyun.com/zh/model-studio/getting-started/first-api-call
Moonshot (Kimi) https://api.moonshot.cn/v1 sk- https://platform.moonshot.cn/docs/api-reference

Acceptance Criteria

  • Both providers appear in the provider list in Settings
  • API key field shown for each with correct placeholder and docs link
  • Default model list populated for each
  • Requests route correctly through the OpenAI-compatible path
  • getModelCapabilities() returns correct reasoning/context capabilities for each model

How to implement — follow the DeepSeek pattern exactly

Step 1: src/vs/workbench/contrib/void/common/modelCapabilities.ts

1a. Add to defaultProviderSettings (alongside deepseek, cerebras etc.):

qwen: {
    apiKey: '',
},
moonshot: {
    apiKey: '',
},

1b. Add to defaultModelsOfProvider:

qwen: [
    'qwen-plus',
    'qwen-turbo',
    'qwen-max',
    'qwen3-235b-a22b',
    'qwen3-32b',
    'qwq-32b',           // reasoning model
],
moonshot: [
    'moonshot-v1-8k',
    'moonshot-v1-32k',
    'moonshot-v1-128k',
    'kimi-k2',
],

1c. Add base URLs — find where deepseek's base URL is set (search for api.deepseek.com) and add:

qwen: 'https://dashscope.aliyuncs.com/compatible-mode/v1',
moonshot: 'https://api.moonshot.cn/v1',

1d. Add capabilities for reasoning modelsqwq-32b and kimi-k2 support reasoning, follow the existing pattern for deepseek-reasoner.

Step 2: src/vs/workbench/contrib/void/common/voidSettingsTypes.ts

2a. Add display titles — find the block with providerName === 'deepseek' returning { title: 'DeepSeek' } and add:

else if (providerName === 'qwen') {
    return { title: 'Qwen (Alibaba)' }
}
else if (providerName === 'moonshot') {
    return { title: 'Moonshot (Kimi)' }
}

2b. Add API key help text — find the block with if (providerName === 'deepseek') return 'Get your...' and add:

if (providerName === 'qwen') return 'Get your [API Key here](https://help.aliyun.com/zh/model-studio/getting-started/first-api-call).'
if (providerName === 'moonshot') return 'Get your [API Key here](https://platform.moonshot.cn/console/api-keys).'

2c. Add placeholder text — find the chain of providerName === 'deepseek' ? 'sk-key...' and add qwen and moonshot with 'sk-...'.

Step 3: Add unit tests

Follow the pattern in src/vs/workbench/contrib/neuralInverse/test/browser/providers/cerebras.test.ts — create:

  • src/vs/workbench/contrib/neuralInverse/test/browser/providers/qwen.test.ts
  • src/vs/workbench/contrib/neuralInverse/test/browser/providers/moonshot.test.ts

Test: provider settings exist, default models are populated, capabilities return correct values for reasoning models.

Reference files

File What to change
src/vs/workbench/contrib/void/common/modelCapabilities.ts Settings, model lists, base URLs, capabilities
src/vs/workbench/contrib/void/common/voidSettingsTypes.ts Display title, help text, placeholder
src/vs/workbench/contrib/neuralInverse/test/browser/providers/ New test files

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions