Public declaration syntax from forge-go/core/provider.go Original source SHA-256: fec739fcf05dc55a4518ef700a1896ca4afe545856e5cf586494959e3faeaaf6 Function bodies and constant values are omitted. This is not the complete implementation. Source line 17 type ProviderRef struct Source line 29 func ParseProviderRef(ref string) (ProviderRef, error) Source line 47 func (p ProviderRef) String() string Source line 52 type ProviderMetadata struct Source line 81 type RuntimeCapability string const ( RuntimeCapabilityToolCalls RuntimeCapability; Source line 97 type ProviderRuntimeCapabilities struct Source line 107 func BaselineProviderRuntimeCapabilities() ProviderRuntimeCapabilities Source line 116 func (c ProviderRuntimeCapabilities) WithCapability(capability RuntimeCapability) ProviderRuntimeCapabilities Source line 127 func (c ProviderRuntimeCapabilities) Supports(capability RuntimeCapability) bool Source line 132 type ProviderNegotiationRequest struct Source line 139 type ProviderNegotiationResult struct Source line 148 type ProviderFactory func(ref ProviderRef) (LanguageModel, error) // ProviderRegistry manages the set of available language model providers. // // Providers are registered by namespace. When an agent needs a model, // it resolves a ProviderRef against the registry to get a LanguageModel. // // The registry is safe for concurrent use. // // ANVIL Spec Section 4.6 -- Provider registry and dispatch. type ProviderRegistry struct Source line 158 type ProviderRegistry struct Source line 167 func NewProviderRegistry() *ProviderRegistry Source line 179 func (r *ProviderRegistry) Register(namespace string, factory ProviderFactory, meta ProviderMetadata) Source line 185 func (r *ProviderRegistry) RegisterWithRuntime( namespace string, factory ProviderFactory, meta ProviderMetadata, runtime ProviderRuntimeCapabilities, ) Source line 232 func (r *ProviderRegistry) Resolve(ref ProviderRef) (LanguageModel, error) Source line 264 func (r *ProviderRegistry) ResolveString(ref string) (LanguageModel, error) Source line 273 func (r *ProviderRegistry) Metadata(namespace string) (ProviderMetadata, bool) Source line 284 func (r *ProviderRegistry) Namespaces() []string Source line 295 func (r *ProviderRegistry) Has(namespace string) bool Source line 303 func (r *ProviderRegistry) Negotiate(request ProviderNegotiationRequest) (ProviderNegotiationResult, error)