modelrouting

package
v1.3.13 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TierOpus   = "opus"
	TierSonnet = "sonnet"
	TierHaiku  = "haiku"
)

Variables

This section is empty.

Functions

func MapModel

func MapModel(requestedModel string, configuredModel string, availableModels []string) string

MapModel picks a concrete upstream model for a Claude-style request.

Precedence:

  1. A single configuredModel overrides mapping entirely.
  2. A comma-separated configuredModel is treated as the exclusive candidate pool.
  3. Otherwise availableModels is the candidate pool.

Matching order within the pool: exact (case-insensitive) name, then tier heuristics, then the first pool entry. An empty pool returns "" — callers must not invent a vendor-specific default such as deepseek-chat.

func SplitCSV

func SplitCSV(models string) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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