Skip to content

Commit

Permalink
Fix(chat): prompt caching feature flag enrollement (#7177) (#7188)
Browse files Browse the repository at this point in the history
This commit fixes a bug in the prompt caching feature flag
implementation where we were incorrectly using the enrollment event
result instead of the actual feature flag value. This caused prompt
caching to be enabled for all users regardless of their feature flag
state.

Key changes:
- Added proper feature flag value tracking in PromptBuilder using a
PromptCachingSetting interface
- Separated the enrollment event logging from the feature flag
evaluation
- Ensures the feature flag value is correctly respected while still
tracking enrollment events

The fix maintains proper A/B testing capabilities while correctly
respecting the intended feature flag distribution for prompt caching
functionality.

<!-- Required. See

https://docs-legacy.sourcegraph.com/dev/background-information/testing_principles.
-->

prompt caching should not be used for users who are not enrolled
(non-dot com users)

(cherry picked from commit 9cc2415)


## Test plan

<!-- Required. See
https://docs-legacy.sourcegraph.com/dev/background-information/testing_principles.
-->

Co-authored-by: Beatrix <[email protected]>
  • Loading branch information
julialeex and abeatrix authored Feb 23, 2025
1 parent 58372b0 commit f51cc90
Show file tree
Hide file tree
Showing 9 changed files with 381 additions and 250 deletions.
176 changes: 130 additions & 46 deletions agent/recordings/cody-chat_103640681/recording.har.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f51cc90

Please sign in to comment.