providerservice

package
v0.32.4 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: Apache-2.0 Imports: 14 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

Index

Constants

View Source
const (
	ProviderTypeLocal        = "local"
	ProviderTypeOllama       = "ollama"
	ProviderTypeOpenAI       = "openai"
	ProviderTypeAnthropic    = "anthropic"
	ProviderTypeMistral      = "mistral"
	ProviderTypeBedrock      = "bedrock"
	ProviderTypeGemini       = "gemini"
	ProviderTypeVLLM         = "vllm"
	ProviderTypeVertexGoogle = "vertex-google"
)

Variables

View Source
var ErrInvalidProvider = errors.New("invalid provider")

Functions

This section is empty.

Types

type ConfigureProviderRequest

type ConfigureProviderRequest struct {
	APIKey       string
	APIKeyEnv    string
	BaseURL      string
	DefaultModel string
	Upsert       bool
	SetDefault   bool
}

type ProviderCapability

type ProviderCapability struct {
	Provider             string `json:"provider"`
	DefaultBaseURL       string `json:"defaultBaseUrl,omitempty"`
	RequiresBaseURL      bool   `json:"requiresBaseUrl"`
	RequiresSecretConfig bool   `json:"requiresSecretConfig"`
	RecommendedAPIKeyEnv string `json:"recommendedApiKeyEnv,omitempty"`
}

type ProviderStatus

type ProviderStatus struct {
	Provider             string    `json:"provider"`
	Configured           bool      `json:"configured"`
	BackendID            string    `json:"backendId,omitempty"`
	BackendName          string    `json:"backendName,omitempty"`
	BaseURL              string    `json:"baseUrl,omitempty"`
	SecretSource         string    `json:"secretSource"`
	SecretConfigured     bool      `json:"secretConfigured"`
	SecretPresent        bool      `json:"secretPresent"`
	APIKeyEnv            string    `json:"apiKeyEnv,omitempty"`
	RecommendedAPIKeyEnv string    `json:"recommendedApiKeyEnv,omitempty"`
	DefaultProvider      string    `json:"defaultProvider,omitempty"`
	DefaultModel         string    `json:"defaultModel,omitempty"`
	UpdatedAt            time.Time `json:"updatedAt,omitempty"`
}

type Service

type Service interface {
	Configure(ctx context.Context, providerType string, req ConfigureProviderRequest) (*ProviderStatus, error)
	GetProviderConfig(ctx context.Context, providerType string) (*ProviderStatus, error)
	DeleteProviderConfig(ctx context.Context, providerType string) error
	ListProviderConfigs(ctx context.Context, createdAtCursor *time.Time, limit int) ([]*ProviderStatus, error)
	ListSupportedProviders(ctx context.Context) ([]ProviderCapability, error)
}

func New

func New(dbInstance libdb.DBManager, workspaceID string) Service

Jump to

Keyboard shortcuts

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