Help us shape the future of Go! Take the 2026 Go Developer Survey

models

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package models lists the models a provider account actually offers — `hmm models`. Hand-rolled HTTP for now: weft's Model seam is per-model streaming, not discovery; filed as weft TODO §5.13. When weft ships an adapter discovery API, this package deletes (the standing migration rule).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Endpoint

func Endpoint(provider string) (string, error)

Endpoint resolves a provider to its model-listing URL. Env overrides are honored: HMM_MODELS_URL (legacy BOBINA_MODELS_URL) for any provider (proxies, tests), plus OPENAI_BASE_URL / ANTHROPIC_BASE_URL for theirs.

Types

type Model

type Model struct {
	ID           string
	DisplayName  string
	Context      int
	Capabilities []string
}

Model is one listing entry. Context is the input context window in tokens (0 = unreported); Capabilities are provider-reported extras ("images", "video", "reasoning", "dynamic tools").

func List

func List(ctx context.Context, provider, key string) ([]Model, error)

List fetches the provider's models with the given key. Shape varies by family: OpenAI-compatible (zai/kimi/openai), Anthropic, Google.

Jump to

Keyboard shortcuts

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