feat(agent): add redis short-term user context cache and align tests

This commit is contained in:
qzl
2026-03-06 12:02:10 +08:00
parent fb8f21bcf3
commit c5ccfc4b88
34 changed files with 2073 additions and 263 deletions
+3
View File
@@ -144,6 +144,9 @@ class AgentRuntimeSettings(BaseModel):
redis_stream_prefix: str = "agent:events"
redis_stream_read_count: int = Field(default=100, ge=1, le=1000)
redis_stream_block_ms: int = Field(default=5000, ge=1, le=60000)
user_context_cache_prefix: str = "agent:user-context"
user_context_cache_ttl_seconds: int = Field(default=600, ge=60, le=86400)
user_context_cache_max_turns: int = Field(default=6, ge=1, le=100)
default_model_code: str = ""
streaming_enabled: bool = True