Skip to content

TurnSteerParams

Base classes

Name Children Inherits
CodexBaseModel
codexed.models.base
Base model for all Codex API models.

⋔ Inheritance diagram

graph TD
  2210667479["v2_protocol.TurnSteerParams"]
  3116041069["base.CodexBaseModel"]
  3879467795["main.BaseModel"]
  2751680898["builtins.object"]
  3116041069 --> 2210667479
  3879467795 --> 3116041069
  2751680898 --> 3879467795

🛈 DocStrings

Bases: CodexBaseModel

Source code in src/codexed/models/v2_protocol.py
class TurnSteerParams(CodexBaseModel):
    additional_context: dict[str, Any] | None = None
    """
    Optional client-provided context fragments keyed by an opaque source identifier.
    """
    client_user_message_id: str | None = None
    expected_turn_id: str
    """
    Required active turn id precondition. The request fails when it does not match the currently active turn.
    """
    input: list[UserInput]
    responsesapi_client_metadata: dict[str, Any] | None = None
    """
    Optional metadata to enrich Codex's ResponsesAPI turn metadata. Replaces unprotected client-provided entries when supplied; an empty map clears them.

    Entries are flattened into the JSON string sent as `client_metadata["x-codex-turn-metadata"]` on ResponsesAPI HTTP and websocket requests.

    They are not sent as top-level ResponsesAPI `client_metadata` keys, and reserved keys such as `session_id`, `thread_id`, `turn_id`, and `window_id` cannot be overridden.
    """
    responsesapi_client_metadata_patch: dict[str, Any] | None = None
    """
    Merge entries into the ResponsesAPI turn metadata without removing existing entries. Applied after `responsesapiClientMetadata` if both are provided; reserved keys remain protected.
    """
    thread_id: str

additional_context class-attribute instance-attribute

additional_context: dict[str, Any] | None = None

Optional client-provided context fragments keyed by an opaque source identifier.

expected_turn_id instance-attribute

expected_turn_id: str

Required active turn id precondition. The request fails when it does not match the currently active turn.

responsesapi_client_metadata class-attribute instance-attribute

responsesapi_client_metadata: dict[str, Any] | None = None

Optional metadata to enrich Codex's ResponsesAPI turn metadata. Replaces unprotected client-provided entries when supplied; an empty map clears them.

Entries are flattened into the JSON string sent as client_metadata["x-codex-turn-metadata"] on ResponsesAPI HTTP and websocket requests.

They are not sent as top-level ResponsesAPI client_metadata keys, and reserved keys such as session_id, thread_id, turn_id, and window_id cannot be overridden.

responsesapi_client_metadata_patch class-attribute instance-attribute

responsesapi_client_metadata_patch: dict[str, Any] | None = None

Merge entries into the ResponsesAPI turn metadata without removing existing entries. Applied after responsesapiClientMetadata if both are provided; reserved keys remain protected.

:fa-brands-github: Show source on GitHub