Versions in this module Expand all Collapse all v0 v0.36.0 Sep 12, 2026 v0.35.0 Sep 12, 2026 Changes in this version + const Hosted + const ModelAuto + func Chain(p Policy, env Env, chosen string) []string + func Detect() []string + func IDs() []string + func ValidScope(s Scope) bool + func ValidStrategy(s Strategy) bool + type Authorizations []Grant + func (a Authorizations) AnyGrant(runtime string) (Grant, bool) + func (a Authorizations) Authorized(runtime, taskName, runID string) bool + func (a Authorizations) Find(runtime, taskName, runID string) (Grant, bool) + func (a Authorizations) Offerable(taskName string) []string + func (a Authorizations) Revoke(id string) (Authorizations, int) + type Env struct + Authorizations Authorizations + Available []string + Run string + Task string + type ErrNoRuntime struct + Offer []string + Reason string + func (e ErrNoRuntime) Error() string + type Grant struct + GrantedAt string + ID string + Revoked bool + Run string + Runtime string + Scope Scope + Task string + func NewGrant(runtime string, scope Scope, taskName, runID string, now time.Time) (Grant, error) + func (g Grant) Covers(runtime, taskName, runID string) bool + type Kind string + const KindHosted + const KindSubscription + type Need struct + Model string + type Policy struct + Allowed []string + Fallback []string + Model string + Strategy Strategy + type Resolution struct + AuthID string + AuthScope Scope + Chain []string + CredentialSource string + Model string + RequestedModel string + RequestedStrategy Strategy + Runtime string + Why string + func Resolve(p Policy, env Env) (Resolution, error) + type Runtime struct + Available func() bool + CredentialSource string + DefaultModel string + Display string + ID string + Kind Kind + Vendor string + ZeroMarginalCost bool + func All() []Runtime + func Get(id string) (Runtime, bool) + func (r Runtime) CanServe(n Need) bool + func (r Runtime) ResolveModel(n Need) string + type Scope string + const ScopeAll + const ScopeRun + const ScopeTask + type Strategy string + const StrategyExplicit + const StrategyHosted + const StrategyPreferAuthorized + func Strategies() []Strategy