cloudmodels

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const OpenRouterCacheTTL = time.Hour

OpenRouterCacheTTL is the on-disk cache lifetime for OpenRouter model listings.

View Source
const OpenRouterURL = "https://openrouter.ai/api/v1/models"

OpenRouterURL is the public OpenRouter models endpoint (no auth required).

Variables

View Source
var TrustedProviders = []string{"anthropic", "openai", "google"}

TrustedProviders lists the cloud providers shown in `cell models`. Restricted to the major frontier labs to keep the list focused.

Functions

func FetchProviderModels

func FetchProviderModels(ctx context.Context, baseURL string) ([]ollama.Model, error)

FetchProviderModels fetches all models from OpenRouter and converts them to ollama.Model so they can be ranked alongside local models. Results are cached on-disk for 1 hour.

func FilterLatestGen

func FilterLatestGen(models []ollama.Model) []ollama.Model

FilterLatestGen keeps only the highest-version model per family. Family is derived by stripping trailing version numbers from the model name part. E.g. "claude-opus-4-5" and "claude-opus-4" → family "claude-opus", keep "claude-opus-4-5".

func FilterTrustedProviders

func FilterTrustedProviders(models []ollama.Model) []ollama.Model

FilterTrustedProviders removes models whose provider is not in TrustedProviders.

Types

This section is empty.

Jump to

Keyboard shortcuts

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