Skip to content

refactor(contexto): Update episodic payload#129

Merged
sm86 merged 1 commit intomainfrom
episodic-payload
Apr 17, 2026
Merged

refactor(contexto): Update episodic payload#129
sm86 merged 1 commit intomainfrom
episodic-payload

Conversation

@DaevMithran
Copy link
Copy Markdown
Collaborator

Summary

  • buildEpisodePayload no longer splits messages into userMessage / assistantMessages / toolMessages. The full messages array is now sent as-is under data.messages.
  • stopReason is removed from the episode context block — it was unused downstream.
  • estimatePayloadTokens updated to read from data.messages.
  • Role-based separation moves to the backend, which is the source of truth for how episodes are interpreted and stored.

Why

Splitting messages by role in the client coupled the SDK to one backend's data model. Sending the raw turn lets the backend decide how to slice it, keeps the client a thin passthrough, and removes a small but real surface area for shape drift between client and server.

Signed-off-by: DaevMithran <daevmithran1999@gmail.com>
@DaevMithran DaevMithran requested a review from sm86 April 17, 2026 09:36
@sm86 sm86 merged commit c70d0c2 into main Apr 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants