Skip to content

fix(core): preserve prompt cache affinity - #1

Closed
phall1 wants to merge 1 commit into
devfrom
cache-affinity
Closed

fix(core): preserve prompt cache affinity#1
phall1 wants to merge 1 commit into
devfrom
cache-affinity

Conversation

@phall1

@phall1phall1 commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Summary

Fixesanomalyco#42246

  • propagate the stable V2 session cache key to OpenRouter requests
  • send prompt_cache_key for native OpenAI Chat Completions
  • avoid sending OpenAI-specific fields to generic compatible providers

This restores cache-affinity wiring described by anomalyco#39907 for current V2 routes.

Verification

  • bun test test/provider/openai-chat.test.ts test/provider/openai-compatible-chat.test.ts test/provider/openrouter.test.ts in packages/llm (36 pass)
  • bun typecheck in packages/llm
  • bun test test/session-runner.test.ts in packages/core (85 pass)
  • bun typecheck in packages/core
  • full workspace typecheck (30 packages)
  • Prettier check on all touched files

@github-actions

Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@phall1

Copy link
Copy Markdown
OwnerAuthor

Superseded by upstream PR anomalyco#42248.

@phall1phall1 closed this Aug 13, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

V2 drops prompt cache affinity for OpenRouter and OpenAI Chat

1 participant

@phall1