Skip to content

Interface: MoonshotLLMParams

@providerprotocol/ai


@providerprotocol/ai / moonshot / MoonshotLLMParams

Defined in: src/providers/moonshot/types.ts:36

Parameters for the Moonshot Chat Completions API.

These parameters are passed directly to the /v1/chat/completions endpoint. Moonshot’s API is OpenAI-compatible with additional thinking mode support.

const params: MoonshotLLMParams = {
temperature: 1.0,
max_tokens: 1000,
thinking: { type: 'enabled' } // Default for kimi-k2.5
};

optional frequency_penalty: number

Defined in: src/providers/moonshot/types.ts:53

Frequency penalty (-2.0 - 2.0)


optional max_completion_tokens: number

Defined in: src/providers/moonshot/types.ts:41

Maximum completion tokens (alias for max_tokens)


optional max_tokens: number

Defined in: src/providers/moonshot/types.ts:38

Maximum number of tokens to generate


optional presence_penalty: number

Defined in: src/providers/moonshot/types.ts:56

Presence penalty (-2.0 - 2.0)


optional response_format: MoonshotResponseFormat

Defined in: src/providers/moonshot/types.ts:65

Response format for structured output


optional seed: number

Defined in: src/providers/moonshot/types.ts:59

Seed for deterministic sampling


optional stop: string | string[]

Defined in: src/providers/moonshot/types.ts:50

Custom stop sequences


optional temperature: number

Defined in: src/providers/moonshot/types.ts:44

Temperature for randomness (0.0 to 2.0). Default: 1.0 (thinking) or 0.6 (instant)


optional thinking: MoonshotThinkingConfig

Defined in: src/providers/moonshot/types.ts:68

Thinking mode configuration (kimi-k2.5 specific)


optional tools: MoonshotTool[]

Defined in: src/providers/moonshot/types.ts:86

Builtin tools to enable for this request. Use the tools helper object to create these.

import { moonshot, tools } from '@providerprotocol/ai/moonshot';
const model = llm({
model: moonshot('kimi-k2.5'),
params: {
tools: [tools.webSearch(), tools.codeRunner()],
},
});

optional top_p: number

Defined in: src/providers/moonshot/types.ts:47

Top-p (nucleus) sampling (0.0 - 1.0), default 0.95


optional user: string

Defined in: src/providers/moonshot/types.ts:62

User identifier for rate limit tracking