Documentation
¶
Overview ¶
Package kimicode provides Kimi Code API integration for the LLM gateway.
The "kimicode" provider routes to Kimi Code's OpenAI-compatible chat completions endpoint, so all transport goes through the shared chat-centric adapter and model IDs are forwarded unchanged.
Index ¶
Constants ¶
This section is empty.
Variables ¶
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 ¶
func New(cfg providers.ProviderConfig, opts providers.ProviderOptions) core.Provider
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 all transport goes through the shared chat-centric adapter: chat completions, model listing, embeddings, and passthrough are exposed via the embedded *openai.ChatCompatible.
func NewWithHTTPClient ¶
func NewWithHTTPClient(apiKey string, baseURL string, httpClient *http.Client, hooks llmclient.Hooks) *Provider
NewWithHTTPClient creates a new Kimi Code provider with a custom HTTP client. If httpClient is nil, http.DefaultClient is used.
The signature is intentionally stable and matches every other chat-compatible provider on main: (apiKey, baseURL, httpClient, hooks).