Enhancement: Allow configuring Redis host/URL via environment variables in test_redis_cache.py

Summary

In libs/checkpoint/tests/test_redis_cache.py, the setup fixture currently hardcodes host="localhost" when initializing the redis.Redis client.

In my development environment, I have a dedicated Redis instance persistently running on my local area network (LAN) rather than directly on localhost:6379. Because the restriction, I have to start one redis (or do some network tricky ) locally every time to run test suite.

This restricts developers from running the Redis test suite against custom, containerized, or remote LAN Redis instances via standard environment variables (such as REDIS_HOST, REDIS_PORT, or REDIS_URL). Unless OS-level port forwarding or host rewrites are applied, these tests are automatically skipped (SKIPPED (Redis server not available)) whenever Redis is running on a different host or containerized network.

Proposed Solution

Support reading the Redis connection configuration from environment variables with sensible defaults falling back to localhost:6379. For example:

  • REDIS_HOST (default: "localhost")
  • REDIS_PORT (default: 6379)
  • Or optionally supporting REDIS_URL

@wuzm2k05 welcome to langchain community. Will recommend you open this is a suggestion on official langgraph repo: GitHub - langchain-ai/langgraph: Build resilient agents. · GitHub