profiles

package
v3.1.0-dev.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package profiles is the models.Provider for provider profiles: every model.provider beyond core-agent's own gemini / vertex / anthropic / anthropic-vertex / echo / scripted. The adapters live in github.com/go-steer/core-models (docs/model-support-design.md); this package opens a profile there, adapts its models to ADK v2 through core-models' adkv2 shim, and re-keys its usage record into the shape pkg/usage reads.

Import it for its side effect, as with the other backends:

import _ "github.com/go-steer/core-agent/v3/pkg/models/profiles"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultModel

func DefaultModel(cfg *config.Config, name, tier string) (string, error)

DefaultModel is the model to run on a profile when the operator named none: the profile's tier for the task class (mid when no class is declared). Profile tiers extend taskclass's Go tables rather than outrank them, and a profile is the only source for its own models.

func New

func New(cfg *config.Config) (models.Provider, error)

New builds the Provider cfg.Model.Provider names. Opening resolves the profile against the environment — base URL variables, the API key — so a missing credential fails here, at startup, naming the profile.

Types

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider is a models.Provider backed by one core-models profile.

func (*Provider) Backend

func (p *Provider) Backend() string

Backend is the identity the profile's prices are keyed on.

func (*Provider) DefaultSmallModel

func (p *Provider) DefaultSmallModel() string

DefaultSmallModel is the profile's small tier, or "" when it declares none — agentic subtasks then inherit the parent's model.

func (*Provider) Model

func (p *Provider) Model(ctx context.Context, modelID string) (model.LLM, error)

Model returns modelID on the profile's server, refusing one a closed profile does not list.

func (*Provider) Name

func (p *Provider) Name() string

Name reports the profile's name.

func (*Provider) Profile

func (p *Provider) Profile() profile.Profile

Profile is the resolved profile, extends applied.

Jump to

Keyboard shortcuts

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