mirror of
https://github.com/Finesssee/ProxyPilot.git
synced 2026-11-20 20:34:36 +00:00
feat(middleware): add InitSummarizerWithAuthManager for compression setup
Enables Factory.ai-style LLM summarization by wiring the summarizer executor to the core auth manager. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
abe7597d99
commit
095718e31e
@@ -174,6 +174,17 @@ func SetSummarizerExecutor(executor memory.SummarizerExecutor) {
|
||||
}
|
||||
}
|
||||
|
||||
// InitSummarizerWithAuthManager configures LLM-based summarization using the core auth manager.
|
||||
// Call this after the auth manager is initialized to enable Factory.ai-style context compression.
|
||||
func InitSummarizerWithAuthManager(manager memory.CoreManagerExecutor, providers []string) {
|
||||
if manager == nil {
|
||||
return
|
||||
}
|
||||
adapter := memory.NewManagerAuthAdapter(manager)
|
||||
executor := memory.NewPipelineSummarizerExecutor(adapter, providers)
|
||||
SetSummarizerExecutor(executor)
|
||||
}
|
||||
|
||||
func agenticSemanticEnabled() bool {
|
||||
if v := strings.TrimSpace(os.Getenv("CLIPROXY_SEMANTIC_ENABLED")); v != "" {
|
||||
if strings.EqualFold(v, "0") || strings.EqualFold(v, "false") || strings.EqualFold(v, "off") || strings.EqualFold(v, "no") {
|
||||
|
||||
Reference in New Issue
Block a user