Skip to content

feat(provider): keep ephemeral injects on the user role - #1325

Closed
TheGreatAxios wants to merge 3 commits into
mainfrom
cl-9897-ephemeral-inject
Closed

TheGreatAxios wants to merge 3 commits into
mainfrom
cl-9897-ephemeral-inject

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Count every ephemeral turn toward the Anthropic cache-breakpoint suffix, since ephemeral turns ride as the request tail
  • Add an honest ephemeral inject-role helper that stays on the user role until a vendor adapter preserves mid-conversation system turns in position

Verification

  • bun test src/provider/ephemeral-inject-role.test.ts src/provider/anthropic-cache-breakpoint.test.ts passes (26 pass, 0 fail)
  • bun run typecheck and bun run lint pass

Fixes CL-9897

@linear-code

linear-code Bot commented Oct 5, 2026

Copy link
Copy Markdown

CL-9897

…ffix

System-role ephemeral turns are hoisted into the head system block and never reach wire messages, so counting them in the suffix undercounts the split and moves the breakpoint onto q1 instead of q2. Filter role!=system and add a q1/a1/q2 + system-ephemeral regression.
@TheGreatAxios

Copy link
Copy Markdown
Collaborator Author

Closed per operator triage decision — Linear issue being canceled; content superseded or deprioritized.

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.

1 participant