Documentation
¶
Index ¶
- Constants
- func ValidateCapability(providerID string, capability Capability) error
- func ValidateRawCapability(providerID string, capability Capability) error
- func ValidateWireShape(shape HostedWireShape) error
- type BraveConfig
- type Capability
- type HostedConfig
- type HostedWireShape
- type ResolveInput
- type ResolveStatus
- type Resolved
- type WebSearchSource
Constants ¶
View Source
const ( ToolWebSearch = "web_search" WireShapeAnthropicServerWebSearch HostedWireShape = "anthropic_server_web_search" ExternalProviderBrave = "brave" )
Variables ¶
This section is empty.
Functions ¶
func ValidateCapability ¶
func ValidateCapability(providerID string, capability Capability) error
func ValidateRawCapability ¶
func ValidateRawCapability(providerID string, capability Capability) error
func ValidateWireShape ¶
func ValidateWireShape(shape HostedWireShape) error
Types ¶
type BraveConfig ¶
type BraveConfig struct {
Provider string `json:"provider,omitempty"`
}
type Capability ¶
type Capability struct {
Source WebSearchSource `json:"source,omitempty"`
Hosted HostedConfig `json:"hosted,omitempty"`
Brave BraveConfig `json:"brave,omitempty"`
}
func DefaultCapability ¶
func DefaultCapability(providerID string) Capability
func NormalizeCapability ¶
func NormalizeCapability(providerID string, capability Capability) Capability
func ProviderPresetCapability ¶
func ProviderPresetCapability(providerID string) Capability
type HostedConfig ¶
type HostedConfig struct {
WireShape HostedWireShape `json:"wire_shape,omitempty"`
}
type HostedWireShape ¶
type HostedWireShape string
func AvailableWireShapes ¶
func AvailableWireShapes() []HostedWireShape
func SupportedWireShapes ¶
func SupportedWireShapes(providerID string) []HostedWireShape
type ResolveInput ¶
type ResolveInput struct {
Provider string
Capability Capability
BraveAvailable bool
}
type ResolveStatus ¶
type ResolveStatus string
const ( ResolveReady ResolveStatus = "ready" ResolveInvalid ResolveStatus = "invalid" )
type Resolved ¶
type Resolved struct {
Source WebSearchSource `json:"source"`
Status ResolveStatus `json:"status"`
Available bool `json:"available"`
LocalToolNames []string `json:"local_tool_names,omitempty"`
HostedTools []provider.HostedToolDefinition `json:"hosted_tools,omitempty"`
WireShape HostedWireShape `json:"wire_shape,omitempty"`
ExternalProvider string `json:"external_provider,omitempty"`
}
func Resolve ¶
func Resolve(input ResolveInput) (Resolved, error)
IMPORTANT: Web search source selection must be derived from provider profile capability plus explicit wire shape support. Do not add provider-name special cases, substitute unrequested sources, or probe at runtime here; callers must surface unavailable capability state instead of exposing guaranteed-failing tools.
type WebSearchSource ¶
type WebSearchSource string
const ( WebSearchProviderHosted WebSearchSource = "provider_hosted" WebSearchExternalBrave WebSearchSource = "external_brave" WebSearchDisabled WebSearchSource = "disabled" )
Click to show internal directories.
Click to hide internal directories.