external

package
v0.8.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AvailableModels

func AvailableModels(ctx context.Context, options *Options) (map[string]bool, error)

AvailableModels returns the set of model IDs advertised by the Wingman server addressed by options.

func IsAnthropic

func IsAnthropic(id string) bool

IsAnthropic matches Anthropic Claude model IDs.

func IsGoogle

func IsGoogle(id string) bool

IsGoogle matches Google Gemini model IDs.

func IsOpenAI

func IsOpenAI(id string) bool

IsOpenAI matches OpenAI GPT model IDs.

func LookupPath added in v0.8.3

func LookupPath(tool, fallback string) string

func Models

func Models(ctx context.Context, options *Options, modelOpts *ModelOptions) ([]string, error)

Models returns the IDs of available models matching modelOpts, in preference order. Returns nil if nothing matches.

Types

type ModelFilter

type ModelFilter func(id string) bool

ModelFilter narrows a candidate model list by ID. A nil filter matches every model.

type ModelKind

type ModelKind int
const (
	ModelDefault ModelKind = iota
	ModelFast
)

type ModelOptions

type ModelOptions struct {
	Kind   ModelKind
	Filter ModelFilter
}

type Options

type Options struct {
	Path string
	Env  []string

	WingmanURL   string
	WingmanToken string
}

func WithDefaults

func WithDefaults(options *Options) *Options

WithDefaults fills in any missing Options fields from environment variables. The same pointer is returned for chaining; a new zero-value Options is allocated if nil is passed.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL