Documentation
¶
Overview ¶
Package routeselect derives explicit route selectors from model identifiers. Route selectors use "backend-prefix:model" to route requests to a backend family.
Index ¶
Constants ¶
View Source
const HeaderRouteSelector = lipsdk.HeaderRoute
HeaderRouteSelector carries the core routing selector (e.g. stub:gpt-4o-mini).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrefixSet ¶
type PrefixSet map[string]struct{}
func NewPrefixSet ¶
func (PrefixSet) FromModelOrDefault ¶
FromModelOrDefault parses body for a model field and returns it when it carries a known inline route prefix. If decoding fails or the model has no known prefix, it returns defaultRoute with surrounding whitespace removed.
func (PrefixSet) InlineOrDefault ¶
InlineOrDefault returns model when it has a known backend prefix before the colon delimiter. Otherwise it returns defaultRoute with surrounding whitespace removed.
Click to show internal directories.
Click to hide internal directories.