Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 107 additions & 0 deletions internal/providers/configs/moonshot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{
"name": "Moonshot",
"id": "moonshot",
"api_key": "$MOONSHOT_API_KEY",
"api_endpoint": "https://api.moonshot.ai/v1",
"type": "openai-compat",
"default_large_model_id": "kimi-k2.6",
"default_small_model_id": "kimi-k2.5",
"models": [
{
"id": "kimi-k2.6",
"name": "Kimi K2.6",
"cost_per_1m_in": 0.95,
"cost_per_1m_out": 4.0,
"cost_per_1m_in_cached": 0.16,
"cost_per_1m_out_cached": 0,
"context_window": 262144,
"default_max_tokens": 64000,
"can_reason": true,
"supports_attachments": true
},
{
"id": "kimi-k2.5",
"name": "Kimi K2.5",
"cost_per_1m_in": 0.6,
"cost_per_1m_out": 3.0,
"cost_per_1m_in_cached": 0.1,
"cost_per_1m_out_cached": 0,
"context_window": 262144,
"default_max_tokens": 64000,
"can_reason": true,
"supports_attachments": true
},
{
"id": "moonshot-v1-8k",
"name": "Moonshot V1 8K",
"cost_per_1m_in": 0.2,
"cost_per_1m_out": 2.0,
"cost_per_1m_in_cached": 0,
"cost_per_1m_out_cached": 0,
"context_window": 8192,
"default_max_tokens": 4096,
"can_reason": false,
"supports_attachments": false
},
{
"id": "moonshot-v1-32k",
"name": "Moonshot V1 32K",
"cost_per_1m_in": 1.0,
"cost_per_1m_out": 3.0,
"cost_per_1m_in_cached": 0,
"cost_per_1m_out_cached": 0,
"context_window": 32768,
"default_max_tokens": 8192,
"can_reason": false,
"supports_attachments": false
},
{
"id": "moonshot-v1-128k",
"name": "Moonshot V1 128K",
"cost_per_1m_in": 2.0,
"cost_per_1m_out": 5.0,
"cost_per_1m_in_cached": 0,
"cost_per_1m_out_cached": 0,
"context_window": 131072,
"default_max_tokens": 16384,
"can_reason": false,
"supports_attachments": false
},
{
"id": "moonshot-v1-8k-vision-preview",
"name": "Moonshot V1 8K Vision Preview",
"cost_per_1m_in": 0.2,
"cost_per_1m_out": 2.0,
"cost_per_1m_in_cached": 0,
"cost_per_1m_out_cached": 0,
"context_window": 8192,
"default_max_tokens": 4096,
"can_reason": false,
"supports_attachments": true
},
{
"id": "moonshot-v1-32k-vision-preview",
"name": "Moonshot V1 32K Vision Preview",
"cost_per_1m_in": 1.0,
"cost_per_1m_out": 3.0,
"cost_per_1m_in_cached": 0,
"cost_per_1m_out_cached": 0,
"context_window": 32768,
"default_max_tokens": 8192,
"can_reason": false,
"supports_attachments": true
},
{
"id": "moonshot-v1-128k-vision-preview",
"name": "Moonshot V1 128K Vision Preview",
"cost_per_1m_in": 2.0,
"cost_per_1m_out": 5.0,
"cost_per_1m_in_cached": 0,
"cost_per_1m_out_cached": 0,
"context_window": 131072,
"default_max_tokens": 16384,
"can_reason": false,
"supports_attachments": true
}
]
}
8 changes: 8 additions & 0 deletions internal/providers/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ var kimiCodingConfig []byte
//go:embed configs/minimax.json
var miniMaxConfig []byte

//go:embed configs/moonshot.json
var moonshotConfig []byte

//go:embed configs/minimax-china.json
var miniMaxChinaConfig []byte

Expand Down Expand Up @@ -127,6 +130,7 @@ var providerRegistry = []ProviderFunc{
kimiCodingProvider,
miniMaxProvider,
miniMaxChinaProvider,
moonshotProvider,
syntheticProvider,

// The remaining will be in alphabetical order.
Expand Down Expand Up @@ -252,6 +256,10 @@ func miniMaxChinaProvider() catwalk.Provider {
return loadProviderFromConfig(miniMaxChinaConfig)
}

func moonshotProvider() catwalk.Provider {
return loadProviderFromConfig(moonshotConfig)
}

func nebiusProvider() catwalk.Provider {
return loadProviderFromConfig(nebiusConfig)
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/catwalk/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const (
InferenceProviderOpenCodeZen InferenceProvider = "opencode-zen"
InferenceProviderOpenCodeGo InferenceProvider = "opencode-go"
InferenceProviderAlibabaSingapore InferenceProvider = "alibaba-singapore"
InferenceProviderMoonshot InferenceProvider = "moonshot"
)

// Provider represents an AI provider configuration.
Expand Down Expand Up @@ -131,6 +132,7 @@ func KnownProviders() []InferenceProvider {
InferenceProviderNeuralwatt,
InferenceProviderOpenCodeZen,
InferenceProviderOpenCodeGo,
InferenceProviderMoonshot,
}
}

Expand Down
Loading