Skip to content

ThreadListParams

Base classes

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

â‹” Inheritance diagram

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

🛈 DocStrings

Bases: CodexBaseModel

Source code in src/codexed/models/v2_protocol.py
class ThreadListParams(CodexBaseModel):
    ancestor_thread_id: str | None = None
    """
    Optional ancestor thread filter. Returns spawned descendants at any depth, excluding the ancestor itself. Mutually exclusive with `parentThreadId`.
    """
    archived: bool | None = None
    """
    Optional archived filter; when set to true, only archived threads are returned. If false or null, only non-archived threads are returned.
    """
    attached_to_thread_id: str | None = None
    """
    Return only persistent threads attached to this thread, including empty threads. Mutually exclusive with parentThreadId and ancestorThreadId. Omitting this filter keeps attached threads hidden from ordinary listings.
    """
    current_account_only: bool | None = None
    """
    Show local history visible to the current ChatGPT account. Defaults to false.
    """
    cursor: str | None = None
    """
    Opaque pagination cursor returned by a previous call.
    """
    cwd: ThreadListCwdFilter | None = None
    """
    Optional cwd filter or filters; when set, only threads whose session cwd exactly matches one of these paths are returned.
    """
    excluded_thread_ids: list[str] | None = None
    """
    Thread IDs to exclude before applying the result limit. Up to 100 entries; invalid IDs or a larger list are rejected, never truncated. Send the same exclusions on each page. Omitted, null, or empty means no exclusions.
    """
    include_attached_threads: bool | None = None
    """
    Include persistent threads attached to a parent when searching by title.
    """
    included_thread_ids: list[str] | None = None
    """
    Restrict results to up to 100 thread IDs before pagination. Omit or send null for unrestricted results. An empty list matches nothing. Exclusions still apply. Repeat the same IDs on each page. The local store uses indexed metadata for this filter.
    """
    limit: int | None = Field(None, ge=0)
    """
    Optional page size; defaults to a reasonable server-side value.
    """
    model_providers: list[str] | None = None
    """
    Optional provider filter; when set, only sessions recorded under these providers are returned. When present but empty, includes all providers.
    """
    originators: list[str] | None = None
    """
    Optional originator allowlist, matching any supplied value exactly. Supported by hosted backends only; the local app-server rejects a nonempty list. Omitted or empty lists leave originators unrestricted.
    """
    parent_thread_id: str | None = None
    """
    Optional direct parent thread filter. Mutually exclusive with `ancestorThreadId`.
    """
    project_id: str | None = None
    """
    Omit to include every project, set to null for unassigned threads, or provide a project ID to return only threads in that project.
    """
    search_term: str | None = None
    """
    Optional substring filter for the extracted thread title.
    """
    section_id: str | None = None
    """
    Omit to include every section, set to `null` for unsectioned threads, or provide a section ID to return only threads in that section.
    """
    sort_direction: SortDirection | None = None
    """
    Optional sort direction; defaults to descending (newest first).
    """
    sort_key: ThreadSortKey | None = None
    """
    Optional sort key; defaults to created_at.
    """
    source_kinds: list[ThreadSourceKind] | None = None
    """
    Optional source filter; when set, only sessions from these source kinds are returned. When omitted or empty, defaults to interactive sources.
    """
    use_state_db_only: bool | None = None
    """
    If true, the local store returns indexed metadata without scanning JSONL rollouts for repairs. Requests with `includedThreadIds` always use indexed metadata.
    """

ancestor_thread_id class-attribute instance-attribute

ancestor_thread_id: str | None = None

Optional ancestor thread filter. Returns spawned descendants at any depth, excluding the ancestor itself. Mutually exclusive with parentThreadId.

archived class-attribute instance-attribute

archived: bool | None = None

Optional archived filter; when set to true, only archived threads are returned. If false or null, only non-archived threads are returned.

attached_to_thread_id class-attribute instance-attribute

attached_to_thread_id: str | None = None

Return only persistent threads attached to this thread, including empty threads. Mutually exclusive with parentThreadId and ancestorThreadId. Omitting this filter keeps attached threads hidden from ordinary listings.

current_account_only class-attribute instance-attribute

current_account_only: bool | None = None

Show local history visible to the current ChatGPT account. Defaults to false.

cursor class-attribute instance-attribute

cursor: str | None = None

Opaque pagination cursor returned by a previous call.

cwd class-attribute instance-attribute

cwd: ThreadListCwdFilter | None = None

Optional cwd filter or filters; when set, only threads whose session cwd exactly matches one of these paths are returned.

excluded_thread_ids class-attribute instance-attribute

excluded_thread_ids: list[str] | None = None

Thread IDs to exclude before applying the result limit. Up to 100 entries; invalid IDs or a larger list are rejected, never truncated. Send the same exclusions on each page. Omitted, null, or empty means no exclusions.

include_attached_threads class-attribute instance-attribute

include_attached_threads: bool | None = None

Include persistent threads attached to a parent when searching by title.

included_thread_ids class-attribute instance-attribute

included_thread_ids: list[str] | None = None

Restrict results to up to 100 thread IDs before pagination. Omit or send null for unrestricted results. An empty list matches nothing. Exclusions still apply. Repeat the same IDs on each page. The local store uses indexed metadata for this filter.

limit class-attribute instance-attribute

limit: int | None = Field(None, ge=0)

Optional page size; defaults to a reasonable server-side value.

model_providers class-attribute instance-attribute

model_providers: list[str] | None = None

Optional provider filter; when set, only sessions recorded under these providers are returned. When present but empty, includes all providers.

originators class-attribute instance-attribute

originators: list[str] | None = None

Optional originator allowlist, matching any supplied value exactly. Supported by hosted backends only; the local app-server rejects a nonempty list. Omitted or empty lists leave originators unrestricted.

parent_thread_id class-attribute instance-attribute

parent_thread_id: str | None = None

Optional direct parent thread filter. Mutually exclusive with ancestorThreadId.

project_id class-attribute instance-attribute

project_id: str | None = None

Omit to include every project, set to null for unassigned threads, or provide a project ID to return only threads in that project.

search_term class-attribute instance-attribute

search_term: str | None = None

Optional substring filter for the extracted thread title.

section_id class-attribute instance-attribute

section_id: str | None = None

Omit to include every section, set to null for unsectioned threads, or provide a section ID to return only threads in that section.

sort_direction class-attribute instance-attribute

sort_direction: SortDirection | None = None

Optional sort direction; defaults to descending (newest first).

sort_key class-attribute instance-attribute

sort_key: ThreadSortKey | None = None

Optional sort key; defaults to created_at.

source_kinds class-attribute instance-attribute

source_kinds: list[ThreadSourceKind] | None = None

Optional source filter; when set, only sessions from these source kinds are returned. When omitted or empty, defaults to interactive sources.

use_state_db_only class-attribute instance-attribute

use_state_db_only: bool | None = None

If true, the local store returns indexed metadata without scanning JSONL rollouts for repairs. Requests with includedThreadIds always use indexed metadata.

:fa-brands-github: Show source on GitHub