routehint

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package routehint defines advisory route-hint providers (design §12, R13). Hints never bypass core-owned health, capability, or eligibility checks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Input

type Input struct {
	TraceID   string
	Call      *lipapi.Call
	Principal execview.PrincipalView
	Session   session.SessionView
	Workspace workspace.WorkspaceView
}

Input is the read-only context for a route-hint pass (after request-wide transforms, before planning).

type Provider

type Provider interface {
	ID() string
	Order() int
	FailureMode() sdkhooks.FailureMode
	Hint(ctx context.Context, in Input) (Result, error)
}

Provider emits advisory routing preferences (design §12).

func MaterializeSorted

func MaterializeSorted(providers []Provider) []Provider

MaterializeSorted returns providers sorted for stable execution (design §17).

type Result

type Result struct {
	// PreferredCandidateKeys is a core routing key per attempt in the form "backend:model" (see [routing.AttemptCandidate].Key).
	// The planner may move these keys earlier in the candidate list when they are already eligible; keys that
	// are excluded, unhealthy, or not in the route are ignored.
	PreferredCandidateKeys []string
}

Result is a single provider's advisory output. Empty result is a no-op.

Jump to

Keyboard shortcuts

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