KEMBAR78
fix: Add proper serialization to RedisStore for complex objects by tejas-dharani · Pull Request #6905 · microsoft/autogen · GitHub
Skip to content

Conversation

@tejas-dharani
Copy link
Contributor

Why are these changes needed?

The RedisStore implementation currently doesn't properly handle serialization of complex objects like Pydantic models, causing ChatCompletionCache to fail when used with RedisStore. This PR fixes the issue by adding proper JSON serialization and deserialization while maintaining backward compatibility for primitive types.

Related issue number

Closes #6899

Checks

@codecov
Copy link

codecov bot commented Aug 7, 2025

Codecov Report

❌ Patch coverage is 91.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.89%. Comparing base (c83674d) to head (2eb92a5).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...s/autogen-ext/src/autogen_ext/cache_store/redis.py 91.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6905      +/-   ##
==========================================
- Coverage   81.00%   80.89%   -0.11%     
==========================================
  Files         237      237              
  Lines       18329    18349      +20     
==========================================
- Hits        14847    14844       -3     
- Misses       3482     3505      +23     
Flag Coverage Δ
unittests 80.89% <91.66%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ekzhu
Copy link
Collaborator

ekzhu commented Aug 11, 2025

@biradrags pls review to see if this addresses your issue, thx.

@ekzhu ekzhu merged commit a666c65 into microsoft:main Aug 19, 2025
72 checks passed
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.

ChatCompletionCache doesn't work with RedisStore

3 participants