Documentation
¶
Overview ¶
Package providercatalog is the curated UX layer for provider onboarding — friendly descriptions, signup URLs, API-key help text, recommended-model justifications. ONE combined providers.json, shipped embedded and refreshable from raw.githubusercontent.com/.../pkg/providercatalog/providers.json.
Lifecycle:
- Embedded at compile time (//go:embed providers.json).
- Refreshed weekly by .github/workflows/provider-catalog-refresh.yml, which runs cmd/refresh_provider_catalog to query provider APIs and update the checked-in JSON via a PR.
IMPORTANT — distinguish from pkg/providerregistry, the sister system with adjacent but DIFFERENT concerns:
- pkg/providercatalog (this package): UX/copy. Used by onboarding menus, the model picker description blurbs, signup/help text.
- pkg/providerregistry: per-provider TECHNICAL CONFIG (endpoint, auth, streaming, retry, cost) that the API client uses.
They share an id/name and a model list shape but otherwise serve different consumers and have separate publish workflows. Don't merge them without a roadmap entry.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CatalogURL ¶
func CatalogURL() string
func RefreshFromRemoteAsync ¶
func RefreshFromRemoteAsync(url string)
func SetCatalog ¶
func SetCatalog(catalog Catalog)
Types ¶
type Catalog ¶
type Model ¶
type Model struct {
ID string `json:"id"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
ContextLength int `json:"context_length,omitempty"`
Tags []string `json:"tags,omitempty"`
InputCost float64 `json:"input_cost,omitempty"`
OutputCost float64 `json:"output_cost,omitempty"`
}
type Provider ¶
type Provider struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
SetupHint string `json:"setup_hint,omitempty"`
DocsURL string `json:"docs_url,omitempty"`
SignupURL string `json:"signup_url,omitempty"`
APIKeyLabel string `json:"api_key_label,omitempty"`
APIKeyHelp string `json:"api_key_help,omitempty"`
Recommended bool `json:"recommended,omitempty"`
DefaultModel string `json:"default_model,omitempty"`
RecommendedModel string `json:"recommended_model,omitempty"`
RecommendedModelWhy string `json:"recommended_model_why,omitempty"`
Models []Model `json:"models,omitempty"`
}
func FindProvider ¶
Click to show internal directories.
Click to hide internal directories.