Data Structure
ModeOption
A single selectable option within a Mode.str
Unique identifier for this option (e.g., “gpt-4”, “planning”).
str
Display name shown in the UI (e.g., “GPT-4”, “Planning”).
str
Brief description shown in the dropdown.
str
The lucide icon name or URL for the option. See https://lucide.dev/icons/.
boolean
Whether this option should be selected by default.
Mode
A category of options (e.g., “Model”, “Reasoning”).str
Unique identifier for the mode (e.g., “model”).
str
Display name for the picker trigger.
List[ModeOption]
List of available options for this mode.
Set available Modes
You can define available modes usingcl.context.emitter.set_modes inside the on_chat_start handler.

The user picking modes