Interface: MoonshotLLMParams
@providerprotocol/ai / moonshot / MoonshotLLMParams
Interface: MoonshotLLMParams
Section titled “Interface: 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.
Example
Section titled “Example”const params: MoonshotLLMParams = { temperature: 1.0, max_tokens: 1000, thinking: { type: 'enabled' } // Default for kimi-k2.5};Properties
Section titled “Properties”frequency_penalty?
Section titled “frequency_penalty?”
optionalfrequency_penalty:number
Defined in: src/providers/moonshot/types.ts:53
Frequency penalty (-2.0 - 2.0)
max_completion_tokens?
Section titled “max_completion_tokens?”
optionalmax_completion_tokens:number
Defined in: src/providers/moonshot/types.ts:41
Maximum completion tokens (alias for max_tokens)
max_tokens?
Section titled “max_tokens?”
optionalmax_tokens:number
Defined in: src/providers/moonshot/types.ts:38
Maximum number of tokens to generate
presence_penalty?
Section titled “presence_penalty?”
optionalpresence_penalty:number
Defined in: src/providers/moonshot/types.ts:56
Presence penalty (-2.0 - 2.0)
response_format?
Section titled “response_format?”
optionalresponse_format:MoonshotResponseFormat
Defined in: src/providers/moonshot/types.ts:65
Response format for structured output
optionalseed:number
Defined in: src/providers/moonshot/types.ts:59
Seed for deterministic sampling
optionalstop:string|string[]
Defined in: src/providers/moonshot/types.ts:50
Custom stop sequences
temperature?
Section titled “temperature?”
optionaltemperature: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)
thinking?
Section titled “thinking?”
optionalthinking:MoonshotThinkingConfig
Defined in: src/providers/moonshot/types.ts:68
Thinking mode configuration (kimi-k2.5 specific)
tools?
Section titled “tools?”
optionaltools:MoonshotTool[]
Defined in: src/providers/moonshot/types.ts:86
Builtin tools to enable for this request.
Use the tools helper object to create these.
Example
Section titled “Example”import { moonshot, tools } from '@providerprotocol/ai/moonshot';
const model = llm({ model: moonshot('kimi-k2.5'), params: { tools: [tools.webSearch(), tools.codeRunner()], },});top_p?
Section titled “top_p?”
optionaltop_p:number
Defined in: src/providers/moonshot/types.ts:47
Top-p (nucleus) sampling (0.0 - 1.0), default 0.95
optionaluser:string
Defined in: src/providers/moonshot/types.ts:62
User identifier for rate limit tracking