Skip to content

feat: Send x-session-affinity and x-parent-session-id headers#20744

Merged
rekram1-node merged 1 commit intoanomalyco:devfrom
kflansburg:kflansburg/always-include-x-session-affinity
Apr 3, 2026
Merged

feat: Send x-session-affinity and x-parent-session-id headers#20744
rekram1-node merged 1 commit intoanomalyco:devfrom
kflansburg:kflansburg/always-include-x-session-affinity

Conversation

@kflansburg
Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #12930

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

This change adds a header that allows all providers to correlate requests across sessions (x-session-affinity). It also adds a header for requests related to sub-agent sessions that indicate the parent session id (x-parent-session-id).

How did you verify your code works?

  • Ran bun test locally.
  • Ran with bun run and confirmed the provider received the header.

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

The following comment was made by an LLM, it may be inaccurate:

Based on my search, I found a potentially related PR:

PR #12932 - feat: send x-session-id and x-parent-session-id headers in LLM API requests
#12932

This PR appears to be very similar to the current PR #20744. Both are about sending session-related headers (x-parent-session-id) to track session relationships in LLM API requests. The main difference seems to be that PR #12932 mentions x-session-id while the current PR uses x-session-affinity, but they're addressing the same fundamental goal of correlating requests across sessions and indicating parent-child session relationships.

You should verify the current state and scope of PR #12932 to ensure there's no duplication of effort.

@rekram1-node rekram1-node merged commit e89527c into anomalyco:dev Apr 3, 2026
11 checks passed
@kflansburg kflansburg deleted the kflansburg/always-include-x-session-affinity branch April 3, 2026 13:12
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.

[FEATURE]: Forward session & parent-session IDs as HTTP headers in LLM API requests

2 participants