kimicode

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package kimicode provides Kimi Code API integration for the LLM gateway.

The "kimicode" provider routes to Kimi Code's OpenAI-compatible API: chat completions, model listing, embeddings, and passthrough go through the shared chat-centric adapter, while the Responses API is served natively by the upstream /responses endpoint. Kimi Code retains no responses, so store=true is pinned to false.

Index

Constants

This section is empty.

Variables

View Source
var Registration = providers.Registration{
	Type: "kimicode",
	New:  New,
	Discovery: providers.DiscoveryConfig{
		DefaultBaseURL: defaultBaseURL,
	},
}

Registration provides factory registration for the Kimi Code provider.

Functions

func New

New creates a new Kimi Code provider.

Types

type Provider

type Provider struct {
	*openai.ChatCompatible
}

Provider implements the core.Provider interface for Kimi Code. Kimi Code is OpenAI-compatible, so most transport goes through the shared chat-centric adapter: chat completions, model listing, embeddings, and passthrough are exposed via the embedded *openai.ChatCompatible. The Responses API is forwarded natively to the upstream /responses endpoint through the same adapter instance.

func (*Provider) Responses added in v0.1.99

Responses serves the Responses API natively through the upstream /responses endpoint. Kimi Code retains no responses, so a non-empty previous_response_id is rejected before any upstream call (see rejectPreviousResponseID); store=true is pinned to false by adaptResponsesRequest.

func (*Provider) StreamResponses added in v0.1.99

func (p *Provider) StreamResponses(ctx context.Context, req *core.ResponsesRequest) (io.ReadCloser, error)

StreamResponses forwards the request to the upstream /responses endpoint with stream enabled, returning its Responses SSE stream. Like Responses, it rejects a non-empty previous_response_id before any upstream call.

Jump to

Keyboard shortcuts

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