Skip to content

[BUG] relation "ix_chat_summary_chat_id" already exists #106

Description

@dennypradipta

Plugin Type

Filter

Plugin Name

Filter - Async Context Compression

Plugin Name (if not in list)

No response

Description

I tried to use the context compression v1.7.2, got this error:

openwebui | :523: SAWarning: This declarative base already contains a class with the same class name and module name as function_async_context_compression.ChatSummary, and will be replaced in the string-lookup table.
openwebui | 2026-07-13 04:24:32.513 | INFO | open_webui.utils.plugin:load_function_module_by_id:279 - Loaded module: function_async_context_compression
openwebui | 2026-07-13 04:24:32.530 | ERROR | function_async_context_compression:_init_database:3282 - [Database] ❌ Initialization failed: (psycopg2.errors.DuplicateTable) relation "ix_chat_summary_chat_id" already exists

Steps to Reproduce

  1. Use Open WebUI v0.9.6
  2. Install the function

OpenWebUI Version

0.9.6

Operating System & Container

OS: Ubuntu 24.04
Deployment: Docker Compose

Error Logs (Optional)

When initialized:
openwebui  | <string>:523: SAWarning: This declarative base already contains a class with the same class name and module name as function_async_context_compression.ChatSummary, and will be replaced in the string-lookup table.
openwebui  | 2026-07-13 04:26:29.549 | INFO     | open_webui.utils.plugin:load_function_module_by_id:279 - Loaded module: function_async_context_compression
openwebui  | 2026-07-13 04:26:29.569 | ERROR    | function_async_context_compression:_init_database:3282 - [Database] ❌ Initialization failed: (psycopg2.errors.DuplicateTable) relation "ix_chat_summary_chat_id_covered_refs_hash_unique" already exists

When using it:
openwebui  | 2026-07-13 04:26:10.835 | INFO     | function_async_context_compression:_log:5088 - [Optimization] Saving summary in a background thread to avoid blocking the event loop.
openwebui  | 2026-07-13 04:26:10.854 | WARNING  | function_async_context_compression:_save_summary:4046 - [Storage] Skipping summary save for chat 29f2ea43-4c19-479f-bce8-254fae54c6b7: summary database is unavailable.
openwebui  | 2026-07-13 04:26:10.854 | INFO     | function_async_context_compression:_log:5088 - [🤖 Async Summary Task] ⚠️ Summary generated but was not persisted; skipping success status for future-context summary reuse.
openwebui  | <string>:523: SAWarning: This declarative base already contains a class with the same class name and modu

Additional Information (Optional)

No response

Checklist

  • I have searched for duplicate issues
  • I have provided clear reproduction steps
  • I have mentioned OpenWebUI version and OS/container info

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions