Skip to content

Add per-session/per-partner thread-history window control (backend hook not yet available) #59

Description

@zoharbabin

Why

Issue #43 documents that thread history has no default size cap: the full transcript is sent as context on every turn, so per-turn token cost grows indefinitely on long-lived threads. Backend investigation for that issue confirmed a token-budget-based trimming/summarization mechanism exists server-side, but it is a global on/off switch today, with no per-partner or per-session control exposed.

Per that issue's own success criteria, any future SDK-level control for this must be tracked as a separate, explicit enhancement rather than silently assumed to exist. This issue is that tracking item.

What

Once the backend exposes a concrete hook (e.g. a per-partner or per-session parameter for the trimming/summarization budget, or a max-history-window setting), add a corresponding SDK-level control under ./management (Conversations or threads) so integrators can tune thread-history cost/behavior per session or per partner, instead of relying on the current global on/off switch.

Non-goals right now

  • No SDK code should be written until a concrete backend hook exists to wrap. There is nothing to wrap today.
  • This is not a request to change backend behavior; that decision belongs to the backend team.

Acceptance criteria

  • A documented, testable SDK method/option exists for bounding or tuning thread-history size or cost on a per-session or per-partner basis.
  • API-REFERENCE.md's Threads section is updated to describe the new control once it ships, replacing the "no control exists" disclosure.

Related

Related to the thread-history cost/growth documentation in API-REFERENCE.md (Threads section), which flagged this gap as a doc-only, backend-blocked issue at the time of writing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions