kimi

package
v7.2.83 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package kimi implements thinking configuration for Kimi (Moonshot AI) models.

Kimi models use a native thinking object for both enabled and disabled thinking. The top-level reasoning_effort field is accepted only as a legacy input by the unified extraction layer and is removed from the final Kimi payload.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Applier

type Applier struct{}

Applier implements thinking.ProviderApplier for Kimi models.

Kimi-specific behavior:

  • Enabled thinking: thinking.type="enabled" + thinking.effort=<level>
  • Disabled thinking: thinking.type="disabled"
  • Supports budget-to-level conversion
  • Preserves existing thinking.keep when enabling or changing effort

func NewApplier

func NewApplier() *Applier

NewApplier creates a new Kimi thinking applier.

func (*Applier) Apply

func (a *Applier) Apply(body []byte, config thinking.ThinkingConfig, modelInfo *registry.ModelInfo) ([]byte, error)

Apply applies thinking configuration to Kimi request body.

Expected output format (enabled):

{
  "thinking": {
    "type": "enabled",
    "effort": "high"
  }
}

Expected output format (disabled):

{
  "thinking": {
    "type": "disabled"
  }
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL