model

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureLLMSpy

func ConfigureLLMSpy(cfg *config.Config, provider, apiKey string) error

ConfigureLLMSpy enables a cloud provider in the llmspy gateway. It discovers the provider's env var from the running llmspy pod, patches the llms-secrets Secret with the API key, enables the provider in the llmspy-config ConfigMap, and restarts the deployment.

func GetProviderStatus

func GetProviderStatus(cfg *config.Config) (map[string]ProviderStatus, error)

GetProviderStatus reads llmspy state and returns global provider status. It queries the llmspy pod for available providers and cross-references with the ConfigMap (enabled/disabled) and Secret (API keys).

Types

type ProviderInfo

type ProviderInfo struct {
	ID     string // provider id (e.g. "zai", "anthropic")
	Name   string // display name (e.g. "Z.AI", "Anthropic")
	EnvVar string // env var for API key (e.g. "ZHIPU_API_KEY")
}

ProviderInfo describes an llmspy provider discovered from the running pod.

func GetAvailableProviders

func GetAvailableProviders(cfg *config.Config) ([]ProviderInfo, error)

GetAvailableProviders queries the llmspy pod for all providers that accept an API key.

type ProviderStatus

type ProviderStatus struct {
	Enabled   bool
	HasAPIKey bool
	EnvVar    string // environment variable name (e.g. ANTHROPIC_API_KEY)
}

ProviderStatus captures effective global llmspy provider state.

Jump to

Keyboard shortcuts

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