Documentation
¶
Overview ¶
Package modelconfig constructs the OpenAI-compatible client shared by repository-owned hosts. Callers own flag and environment handling, logging, and any built-in model fallback.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New builds a client whose Model and StreamModel methods satisfy the controller's model seams. A model is required; this package neither reads the environment nor selects a fallback model.
With an APIKey set, New refuses a plain-http BaseURL unless its host is a loopback address, localhost, or a Kubernetes service name, the last as a trusted-network exception (see checkKeyedHTTP): the key and every prompt would otherwise cross the network unencrypted.
Types ¶
type Config ¶
type Config struct {
Model string
BaseURL string
Path string
// AuthHeader selects bearer authentication for Authorization (case-insensitive), or a raw
// credential for any other header name. Empty AuthHeader or APIKey sends no credential.
AuthHeader string
APIKey string
}
Config supplies explicit host-side model settings. Empty BaseURL and Path use openai's defaults.