mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-24 08:21:39 +00:00
31 lines
831 B
TypeScript
31 lines
831 B
TypeScript
import type { ModelProviderConfig } from "openclaw/plugin-sdk/provider-models";
|
|
|
|
export const MOONSHOT_BASE_URL = "https://api.moonshot.ai/v1";
|
|
export const MOONSHOT_DEFAULT_MODEL_ID = "kimi-k2.5";
|
|
const MOONSHOT_DEFAULT_CONTEXT_WINDOW = 256000;
|
|
const MOONSHOT_DEFAULT_MAX_TOKENS = 8192;
|
|
const MOONSHOT_DEFAULT_COST = {
|
|
input: 0,
|
|
output: 0,
|
|
cacheRead: 0,
|
|
cacheWrite: 0,
|
|
};
|
|
|
|
export function buildMoonshotProvider(): ModelProviderConfig {
|
|
return {
|
|
baseUrl: MOONSHOT_BASE_URL,
|
|
api: "openai-completions",
|
|
models: [
|
|
{
|
|
id: MOONSHOT_DEFAULT_MODEL_ID,
|
|
name: "Kimi K2.5",
|
|
reasoning: false,
|
|
input: ["text", "image"],
|
|
cost: MOONSHOT_DEFAULT_COST,
|
|
contextWindow: MOONSHOT_DEFAULT_CONTEXT_WINDOW,
|
|
maxTokens: MOONSHOT_DEFAULT_MAX_TOKENS,
|
|
},
|
|
],
|
|
};
|
|
}
|