config_options
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| BooleanSessionConfigOption aclientp.schema.v2.config_options An on/off toggle. |
||
| InitialConfigOptionBoolean aclientp.schema.v2.config_options **UNSTABLE**: Initial value of a boolean config option. |
||
| InitialConfigOptionId aclientp.schema.v2.config_options **UNSTABLE**: Initial value of a select config option. |
||
| InitialConfigOptionUnknown aclientp.schema.v2.config_options **UNSTABLE**: Initial value of a custom or future kind of config option. |
||
| SelectSessionConfigOption aclientp.schema.v2.config_options A single-value selector (dropdown). |
||
| SessionConfigSelectGroup aclientp.schema.v2.config_options A group of possible values of a select config option. |
||
| SessionConfigSelectOption aclientp.schema.v2.config_options A possible value of a select config option. |
||
| SetConfigOptionBooleanRequest aclientp.schema.v2.config_options Set a boolean config option. |
||
| SetConfigOptionIdRequest aclientp.schema.v2.config_options Select a value of a select config option. |
||
| SetConfigOptionUnknownRequest aclientp.schema.v2.config_options Set a custom or future kind of config option. |
||
| SetSessionConfigOptionResponse aclientp.schema.v2.config_options Response to ``session/set_config_option``. |
||
| UnknownSessionConfigOption aclientp.schema.v2.config_options A custom or future option kind; ``type`` values starting with ``_`` are extensions. |
🛈 DocStrings¶
v2 session config options: selectors and toggles, and setting their values.
v2 has no dedicated modes or model selector API: agents expose such state as config
options (category: "mode" / "model").
InitialSessionConfigOption
module-attribute
¶
InitialSessionConfigOption = Annotated[
Annotated[InitialConfigOptionId, Tag("id")]
| Annotated[InitialConfigOptionBoolean, Tag("boolean")]
| Annotated[InitialConfigOptionUnknown, Tag(OTHER_TAG)],
Discriminator(open_discriminator("type", _VALUE_TYPES)),
]
UNSTABLE: An initial config option value, sent on session setup requests.
Unlike session/set_config_option, an unknown option or value does not fail the
request: the agent ignores it, and the response's configOptions show the result.
SessionConfigOption
module-attribute
¶
SessionConfigOption = Annotated[
Annotated[SelectSessionConfigOption, Tag("select")]
| Annotated[BooleanSessionConfigOption, Tag("boolean")]
| Annotated[UnknownSessionConfigOption, Tag(OTHER_TAG)],
Discriminator(open_discriminator("type", frozenset({"select", "boolean"}))),
]
A session config option and its current state.
SessionConfigOptionCategory
module-attribute
¶
SessionConfigOptionCategory = (
Literal["mode", "model", "model_config", "speed", "thought_level"] | str
)
Semantic category of a config option, for UX only.
Clients MUST handle unknown categories gracefully; values starting with _ are
extensions.
SessionConfigSelectOptions
module-attribute
¶
SessionConfigSelectOptions = (
Sequence[SessionConfigSelectOption] | Sequence[SessionConfigSelectGroup]
)
Values of a select config option: a flat list, or groups under headers.
SetSessionConfigOptionRequest
module-attribute
¶
SetSessionConfigOptionRequest = Annotated[
Annotated[SetConfigOptionIdRequest, Tag("id")]
| Annotated[SetConfigOptionBooleanRequest, Tag("boolean")]
| Annotated[SetConfigOptionUnknownRequest, Tag(OTHER_TAG)],
Discriminator(open_discriminator("type", _VALUE_TYPES)),
]
Parameters of session/set_config_option.
Agents MUST support it for any session where they advertise config options, and
reject unknown options or values with -32602.
BooleanSessionConfigOption
¶
Bases: _ConfigOptionBase
An on/off toggle.
Source code in src/aclientp/schema/v2/config_options.py
InitialConfigOptionBoolean
¶
Bases: _InitialConfigOptionBase
UNSTABLE: Initial value of a boolean config option.
Source code in src/aclientp/schema/v2/config_options.py
InitialConfigOptionId
¶
Bases: _InitialConfigOptionBase
UNSTABLE: Initial value of a select config option.
Source code in src/aclientp/schema/v2/config_options.py
InitialConfigOptionUnknown
¶
Bases: Unknown, _InitialConfigOptionBase
UNSTABLE: Initial value of a custom or future kind of config option.
Source code in src/aclientp/schema/v2/config_options.py
SelectSessionConfigOption
¶
Bases: _ConfigOptionBase
A single-value selector (dropdown).
Source code in src/aclientp/schema/v2/config_options.py
current_value
instance-attribute
¶
current_value: SessionConfigValueId
The selected value; one of the values in options.
options
instance-attribute
¶
options: SessionConfigSelectOptions
The selectable values; at least one, each value unique.
SessionConfigSelectGroup
¶
Bases: AnnotatedObject
A group of possible values of a select config option.
Source code in src/aclientp/schema/v2/config_options.py
options
class-attribute
instance-attribute
¶
options: Sequence[SessionConfigSelectOption] = Field(min_length=1)
The values in this group.
SessionConfigSelectOption
¶
Bases: AnnotatedObject
A possible value of a select config option.
Source code in src/aclientp/schema/v2/config_options.py
description
class-attribute
instance-attribute
¶
Description of this value.
SetConfigOptionBooleanRequest
¶
Bases: _SetConfigOptionBase
Set a boolean config option.
Source code in src/aclientp/schema/v2/config_options.py
SetConfigOptionIdRequest
¶
Bases: _SetConfigOptionBase
Select a value of a select config option.
Source code in src/aclientp/schema/v2/config_options.py
SetConfigOptionUnknownRequest
¶
Bases: Unknown, _SetConfigOptionBase
Set a custom or future kind of config option.
Source code in src/aclientp/schema/v2/config_options.py
SetSessionConfigOptionResponse
¶
Bases: AnnotatedObject
Response to session/set_config_option.
Source code in src/aclientp/schema/v2/config_options.py
config_options
instance-attribute
¶
config_options: Sequence[SessionConfigOption]
All config options and their current values.