Skip to content

Function: classesAtOrBelow()

classesAtOrBelow(cls): ("chat-thinking" | "chat-balanced" | "chat-fast" | "embedding")[]

Classes at or below cls in chat capability: the class itself plus every less-capable chat band, in CHAT_CLASS_ORDER. Treats a chat cls as a ceiling - requesting ModelClass.ChatBalanced yields [ChatBalanced, ChatFast], never ModelClass.ChatThinking - so a class ask can degrade downward to a smaller chat model but never escalate to a larger one.

ModelClass.Embedding is its own modality, not a rung on the chat ladder, so it yields just [Embedding]. An unrecognized class yields the full chat ladder.

"chat-thinking" | "chat-balanced" | "chat-fast" | "embedding"

("chat-thinking" | "chat-balanced" | "chat-fast" | "embedding")[]