test: add regression test for issue #234 prompt caching behavior#375
Merged
robert-j-y merged 6 commits intomainfrom Jan 28, 2026
Merged
test: add regression test for issue #234 prompt caching behavior#375robert-j-y merged 6 commits intomainfrom
robert-j-y merged 6 commits intomainfrom
Conversation
Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai>
Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai>
… requests Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai>
Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai>
…wn facts Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai>
Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai>
kesavan-byte
pushed a commit
to osm-API/ai-sdk-provider
that referenced
this pull request
Feb 13, 2026
… behavior (OpenRouterTeam#375) * test: add regression test for issue OpenRouterTeam#234 prompt caching behavior Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai> * fix: use correct Kimi K2 model ID (moonshotai/kimi-k2-thinking) Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai> * refactor: improve test robustness - match exact issue scenario with 3 requests Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai> * refactor: match exact issue OpenRouterTeam#234 format with 3 requests for both models Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai> * refactor: remove root cause analysis from test header - keep only known facts Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai> * refactor: remove redundant comments from test file Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a regression test for issue #234 ("Delayed caching with GPT 4.1, none with Kimi K2 Thinking") to the
e2e/issues/directory.What the test verifies:
cachedTokensinproviderMetadata.openrouter.usage.promptTokensDetailswhen presentpromptTokens,completionTokens,totalTokens)reasoningTokensis correctly exposedTest structure:
Updates since last revision
Human Review Checklist
e2e/issues/pattern from PR test: add e2e/issues directory with issue #194 regression test #369Checklist
pnpm stylecheckandpnpm typecheckpnpm testand all tests passChangeset
pnpm changesetto create a changeset fileLink to Devin run: https://app.devin.ai/sessions/7ed009fd989445428e2bd9f81b697781
Requested by: Robert Yeakel (@robert-j-y)