Skip to content

API Reference parrot.flows.dev_loop.dispatchers.moonshot

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.flows.dev_loop.dispatchers.moonshot

View source

MoonshotCodeDispatcher — local coding-agent loop bound to MoonshotClient / kimi-k3.

Alias DispatchExecutionError

Re-exported from parrot.flows.dev_loop.dispatchers._shared.DispatchExecutionError.

Alias DispatchLabels

Re-exported from parrot.flows.dev_loop.models.DispatchLabels.

Alias LLMCodeDispatcher

Re-exported from parrot.flows.dev_loop.dispatchers.llm.LLMCodeDispatcher.

Alias LLMFactory

Re-exported from parrot.clients.factory.LLMFactory.

Alias MoonshotCodeDispatchProfile

Re-exported from parrot.flows.dev_loop.models.MoonshotCodeDispatchProfile.

Class MoonshotCodeDispatcher

Local coding-agent loop bound to MoonshotClient / kimi-k3.

Extends LLMCodeDispatcher to reuse the inherited local tool loop, Redis event streaming, cwd-safety guard, and output validation, while overriding the completion-args and chat-completion hooks so requests route through MoonshotClient._chat_completion — which strips the fixed sampling parameters K-series models reject, translates max_tokens to max_completion_tokens, and injects the thinking-mode extra_body (reasoning_effort for kimi-k3, thinking dict for kimi-k2.6) — instead of emitting the Nvidia-style extra_body.chat_template_kwargs block used by the base class.

Parameter Type Default Description
max_concurrent int
redis_url str
stream_ttl_seconds int

Method MoonshotCodeDispatcher.dispatch

dispatch(*, brief: BaseModel, profile: MoonshotCodeDispatchProfile, output_model: Type[T], run_id: str, node_id: str, cwd: str, session_host: Optional[SessionHost] = None, labels: Optional[DispatchLabels] = None) -> T

Parameter Type Default Description
brief BaseModel
profile MoonshotCodeDispatchProfile
output_model Type[T]
run_id str
node_id str
cwd str
session_host Optional[SessionHost] None
labels Optional[DispatchLabels] None

Returns: T

Alias SessionHost

Re-exported from parrot.flows.dev_loop.session_state.SessionHost.

Alias T

Re-exported from parrot.flows.dev_loop.dispatchers._shared.T.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally