slotrec

package
v1.7.20 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package slotrec recommends which pool model goes into each Claude Code slot (Opus, Sonnet, Haiku, Fable, Custom, Subagent). It is the single recommender: the ccl set page, ccl map auto, and the launcher's fallback for empty slots all use it, so they agree.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecommendedOneMModel

func RecommendedOneMModel(model string) bool

RecommendedOneMModel reports whether model is confirmed to serve a 1M context, so a recommendation may turn its [1m] marker on.

Types

type Recommendation

type Recommendation struct {
	Opus     string
	Sonnet   string
	Haiku    string
	Fable    string
	Custom   string
	Subagent string
	// OneMSlots marks the slots that should carry the [1m] context marker.
	// Only allowlist-confirmed models are auto-enabled; advisory window reports
	// are surfaced to the user but never auto-opened.
	OneMSlots map[string]bool
	// contains filtered or unexported fields
}

Recommendation is the deterministic result of model slot auto-fill. It is a pure value: applying it to a Provider (and writing [1m] markers) happens in the caller, so the recommendation can be unit-tested without a Bubble Tea model and re-rendered without mutating the draft.

func Recommend

func Recommend(current provider.Provider, models []string, metadata map[string]protocol.ModelInfo) Recommendation

Recommend picks slot models for a provider after a successful protocol and model-list detection. It never mutates current.

Precedence:

  1. Preserve a slot whose current model is still in models (updating an existing provider must not overwrite a working mapping).
  2. Otherwise recommend by model-name semantics.
  3. Tie-break by catalog metadata (context window, rate multiplier).

Metadata is optional; when a model has no ModelInfo entry the name heuristics alone decide. models is the exact pool from the upstream /models catalog, and the returned IDs always come from it (or are empty).

Jump to

Keyboard shortcuts

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