Skip to content

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
                          class BooleanSessionConfigOption(_ConfigOptionBase):
                              """An on/off toggle."""
                          
                              type: Literal["boolean"] = Field(default="boolean", init=False)
                          
                              current_value: bool
                              """The current value."""
                          

                          current_value instance-attribute

                          current_value: bool
                          

                          The current value.

                          InitialConfigOptionBoolean

                          Bases: _InitialConfigOptionBase

                          UNSTABLE: Initial value of a boolean config option.

                          Source code in src/aclientp/schema/v2/config_options.py
                          class InitialConfigOptionBoolean(_InitialConfigOptionBase):
                              """**UNSTABLE**: Initial value of a boolean config option."""
                          
                              type: Literal["boolean"] = Field(default="boolean", init=False)
                          
                              value: bool
                              """The value to set."""
                          

                          value instance-attribute

                          value: bool
                          

                          The value to set.

                          InitialConfigOptionId

                          Bases: _InitialConfigOptionBase

                          UNSTABLE: Initial value of a select config option.

                          Source code in src/aclientp/schema/v2/config_options.py
                          class InitialConfigOptionId(_InitialConfigOptionBase):
                              """**UNSTABLE**: Initial value of a select config option."""
                          
                              type: Literal["id"] = Field(default="id", init=False)
                          
                              value: SessionConfigValueId
                              """The value to select."""
                          

                          value instance-attribute

                          The value to select.

                          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
                          class InitialConfigOptionUnknown(Unknown, _InitialConfigOptionBase):
                              """**UNSTABLE**: Initial value of a custom or future kind of config option."""
                          
                              type: str
                              """The value kind."""
                          
                              value: Any
                              """The value to set."""
                          

                          type instance-attribute

                          type: str
                          

                          The value kind.

                          value instance-attribute

                          value: Any
                          

                          The value to set.

                          SelectSessionConfigOption

                          Bases: _ConfigOptionBase

                          A single-value selector (dropdown).

                          Source code in src/aclientp/schema/v2/config_options.py
                          class SelectSessionConfigOption(_ConfigOptionBase):
                              """A single-value selector (dropdown)."""
                          
                              type: Literal["select"] = Field(default="select", init=False)
                          
                              current_value: SessionConfigValueId
                              """The selected value; one of the ``value``s in ``options``."""
                          
                              options: SessionConfigSelectOptions
                              """The selectable values; at least one, each ``value`` unique."""
                          

                          current_value instance-attribute

                          current_value: SessionConfigValueId
                          

                          The selected value; one of the values in options.

                          options instance-attribute

                          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
                          class SessionConfigSelectGroup(AnnotatedObject):
                              """A group of possible values of a select config option."""
                          
                              group_id: SessionConfigGroupId
                              """Unique identifier of this group."""
                          
                              name: str
                              """Human-readable label."""
                          
                              options: Sequence[SessionConfigSelectOption] = Field(min_length=1)
                              """The values in this group."""
                          

                          group_id instance-attribute

                          Unique identifier of this group.

                          name instance-attribute

                          name: str
                          

                          Human-readable label.

                          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
                          class SessionConfigSelectOption(AnnotatedObject):
                              """A possible value of a select config option."""
                          
                              value: SessionConfigValueId
                              """Unique identifier of this value."""
                          
                              name: str
                              """Human-readable label."""
                          
                              description: str | MISSING | None = MISSING
                              """Description of this value."""
                          

                          description class-attribute instance-attribute

                          description: str | MISSING | None = MISSING
                          

                          Description of this value.

                          name instance-attribute

                          name: str
                          

                          Human-readable label.

                          value instance-attribute

                          Unique identifier of this value.

                          SetConfigOptionBooleanRequest

                          Bases: _SetConfigOptionBase

                          Set a boolean config option.

                          Source code in src/aclientp/schema/v2/config_options.py
                          class SetConfigOptionBooleanRequest(_SetConfigOptionBase):
                              """Set a boolean config option."""
                          
                              type: Literal["boolean"] = Field(default="boolean", init=False)
                          
                              value: bool
                              """The value to set."""
                          

                          value instance-attribute

                          value: bool
                          

                          The value to set.

                          SetConfigOptionIdRequest

                          Bases: _SetConfigOptionBase

                          Select a value of a select config option.

                          Source code in src/aclientp/schema/v2/config_options.py
                          class SetConfigOptionIdRequest(_SetConfigOptionBase):
                              """Select a value of a select config option."""
                          
                              type: Literal["id"] = Field(default="id", init=False)
                          
                              value: SessionConfigValueId
                              """The value to select."""
                          

                          value instance-attribute

                          The value to select.

                          SetConfigOptionUnknownRequest

                          Bases: Unknown, _SetConfigOptionBase

                          Set a custom or future kind of config option.

                          Source code in src/aclientp/schema/v2/config_options.py
                          class SetConfigOptionUnknownRequest(Unknown, _SetConfigOptionBase):
                              """Set a custom or future kind of config option."""
                          
                              type: str
                              """The value kind."""
                          
                              value: Any
                              """The value to set."""
                          

                          type instance-attribute

                          type: str
                          

                          The value kind.

                          value instance-attribute

                          value: Any
                          

                          The value to set.

                          SetSessionConfigOptionResponse

                          Bases: AnnotatedObject

                          Response to session/set_config_option.

                          Source code in src/aclientp/schema/v2/config_options.py
                          class SetSessionConfigOptionResponse(AnnotatedObject):
                              """Response to ``session/set_config_option``."""
                          
                              config_options: Sequence[SessionConfigOption]
                              """All config options and their current values."""
                          

                          config_options instance-attribute

                          config_options: Sequence[SessionConfigOption]
                          

                          All config options and their current values.

                          UnknownSessionConfigOption

                          Bases: Unknown, _ConfigOptionBase

                          A custom or future option kind; type values starting with _ are extensions.

                          Source code in src/aclientp/schema/v2/config_options.py
                          class UnknownSessionConfigOption(Unknown, _ConfigOptionBase):
                              """A custom or future option kind; ``type`` values starting with ``_`` are extensions."""
                          
                              type: str
                              """The option kind."""
                          

                          type instance-attribute

                          type: str
                          

                          The option kind.