Changeset 0.5.0 (#35)
This commit is contained in:
@@ -27,9 +27,10 @@ type Provider interface {
|
||||
// ProviderConfig holds credentials and endpoint for a configured provider.
|
||||
// Populated from the api_configs table at call time.
|
||||
type ProviderConfig struct {
|
||||
Endpoint string
|
||||
APIKey string
|
||||
Extra map[string]interface{} // Provider-specific settings from config JSONB
|
||||
Endpoint string
|
||||
APIKey string
|
||||
CustomHeaders map[string]string // Extra HTTP headers (e.g. OpenRouter HTTP-Referer)
|
||||
Settings map[string]interface{} // Provider-specific settings from provider_settings JSONB
|
||||
}
|
||||
|
||||
// ── Request / Response Types ────────────────
|
||||
@@ -77,9 +78,17 @@ type StreamEvent struct {
|
||||
Error error `json:"-"`
|
||||
}
|
||||
|
||||
// Model represents an available model from a provider.
|
||||
// Model represents an available model from a provider, with capabilities.
|
||||
type Model struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name,omitempty"`
|
||||
OwnedBy string `json:"owned_by,omitempty"`
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name,omitempty"`
|
||||
OwnedBy string `json:"owned_by,omitempty"`
|
||||
Capabilities ModelCapabilities `json:"capabilities"`
|
||||
Pricing *ModelPricing `json:"pricing,omitempty"`
|
||||
}
|
||||
|
||||
// ModelPricing holds per-million-token costs.
|
||||
type ModelPricing struct {
|
||||
InputPerM float64 `json:"input_per_m,omitempty"`
|
||||
OutputPerM float64 `json:"output_per_m,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user