From 40663511b403cbe64fcbd4930e64fef34f8ef979 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Sun, 14 Dec 2025 14:36:56 +0100 Subject: [PATCH] feat: memory system fixes and Redis config cleanup (v1.3.0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix Qdrant client to use query_points API (qdrant-client >= 1.10) - Rename REDIS_DB to REDIS_BENCHMARK_DB for clarity - Update Redis defaults to match stack allocation (benchmark=6, memory=1) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .env.example | 5 +++-- CHANGELOG.md | 11 +++++++++++ README.md | 2 +- pyproject.toml | 2 +- src/core/config.py | 10 +++++----- src/core/qdrant.py | 8 ++++---- 6 files changed, 25 insertions(+), 13 deletions(-) diff --git a/.env.example b/.env.example index 9178493..82d9abd 100644 --- a/.env.example +++ b/.env.example @@ -21,7 +21,8 @@ SEARXNG_TIMEOUT=30 # Redis Configuration REDIS_HOST=redis-shared REDIS_PORT=6379 -REDIS_DB=1 +REDIS_MEMORY_DB=1 +REDIS_BENCHMARK_DB=6 REDIS_TIMEOUT=5 # Logging @@ -30,4 +31,4 @@ ENABLE_BENCHMARKS=true # Note: Log format is auto-selected based on ENVIRONMENT (console for dev, json for production) # CORS (comma-separated list) -CORS_ORIGINS=* +CORS_ORIGINS=["*"] diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ad53b1..d8ca146 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.3.0] - 2025-12-14 + +### Fixed + +- **Memory**: Update Qdrant client to use `query_points` API (qdrant-client >= 1.10) + +### Changed + +- **Config**: Rename `REDIS_DB` to `REDIS_BENCHMARK_DB` for clarity +- **Config**: Update Redis defaults to match stack allocation (benchmark=6, memory=1) + ## [1.2.5] - 2025-12-14 ### Fixed diff --git a/README.md b/README.md index 54fdc76..300c68d 100644 --- a/README.md +++ b/README.md @@ -432,7 +432,7 @@ For LLM agent development guidelines and architectural decisions, see [AGENTS.md ## Version -Current version: **1.2.5** - Dependency fix +Current version: **1.3.0** - Memory system fixes and Redis config cleanup --- diff --git a/pyproject.toml b/pyproject.toml index a983b37..7000841 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "tatlock" -version = "1.2.5" +version = "1.3.0" description = "OpenAI-compatible API with Ollama backend" requires-python = ">=3.12" dependencies = [] diff --git a/src/core/config.py b/src/core/config.py index 86618d2..a8e0a0e 100644 --- a/src/core/config.py +++ b/src/core/config.py @@ -101,9 +101,9 @@ class Config(BaseSettings): default=6379, description="Redis server port" ) - REDIS_DB: int = Field( - default=1, - description="Redis database number" + REDIS_BENCHMARK_DB: int = Field( + default=6, + description="Redis database number for benchmarks" ) REDIS_TIMEOUT: int = Field( default=5, @@ -146,7 +146,7 @@ class Config(BaseSettings): # Redis Memory Database (separate from benchmarks) REDIS_MEMORY_DB: int = Field( - default=2, + default=1, description="Redis database number for memory cache" ) REDIS_MEMORY_TTL_HOURS: int = Field( @@ -170,7 +170,7 @@ class Config(BaseSettings): @property def redis_url(self) -> str: """Construct Redis connection URL for benchmarks.""" - return f"redis://{self.REDIS_HOST}:{self.REDIS_PORT}/{self.REDIS_DB}" + return f"redis://{self.REDIS_HOST}:{self.REDIS_PORT}/{self.REDIS_BENCHMARK_DB}" @property def redis_memory_url(self) -> str: diff --git a/src/core/qdrant.py b/src/core/qdrant.py index fba5741..5b71b43 100644 --- a/src/core/qdrant.py +++ b/src/core/qdrant.py @@ -232,14 +232,14 @@ class MemoryQdrantClient: ] ) - # Search - results = self._client.search( + # Search using new Query API (qdrant-client >= 1.10) + results = self._client.query_points( collection_name=collection_name, - query_vector=query_vector, + query=query_vector, limit=limit, query_filter=query_filter, score_threshold=score_threshold, - ) + ).points # Format results memories = []