This release adds compatibility support for Open WebUI 0.9.x.
Compatibility
- Open WebUI 0.9.x compatibility: Detects Open WebUI version at runtime and adapts database access accordingly.
- Async DB fix:
Users.get_user_by_idandChats.get_chat_by_idnow use the correct async/sync call path based on Open WebUI version.
Release Scope: v0.13.1 is a critical compatibility release that adds transparent dual-support for OpenWebUI 0.9.x async APIs and retains full compatibility with pre-0.9 (sync) versions. No Valve keys were added, removed, or renamed. No functional behavior changes for users on older OpenWebUI versions.
Overview
OpenWebUI 0.9.0 introduced a sweeping async migration: nearly every database-backed model method (Files, Users, Tools, Models, etc.) and many helpers in open_webui.config and open_webui.utils.tools are now async def and must be awaited. The plugin's internal call graph had numerous direct (non-awaited) calls into these APIs, which would silently break on 0.9.x — coroutine objects returned instead of results, or runtime crashes in thread-offload paths.
Rather than splitting the codebase by version, v0.13.1 introduces a thin compatibility layer that auto-detects whether an OpenWebUI API call returns a coroutine or a direct value, and handles both transparently. This keeps a single codebase working across OpenWebUI versions.
Changes
-
New Compatibility Helpers: Added four module-level helpers at the top of
github_copilot_sdk.py:_resolve_awaitable_compat()— resolves a value or coroutine uniformly_call_openwebui_compat()— async-compatible caller with optional thread-offload for sync-only APIs_resolve_awaitable_sync()— resolves a coroutine from synchronous context (used in Valve option providers)_call_openwebui_sync_compat()— sync wrapper around_resolve_awaitable_sync_extract_search_result_items()— extracts.itemsfrom search results that may be a list, tuple, dict, or Pydantic model
-
Files API Compatibility:
publish_file_from_workspacenow uses_call_openwebui_compat(Files.get_file_by_id, ...)and_call_openwebui_compat(Files.insert_new_file, ...)instead of rawasyncio.to_thread. This prevents the silent crash where an asyncFilesmethod passed toto_threadreturns a coroutine object instead of the expected file record. -
Tool Server Config & Request Building Promoted to Async:
_read_tool_server_connectionsand_build_openwebui_requestare nowasync def. All callers updated toawait. Handlesget_config()andModels.get_all_models()which are async in 0.9.x. -
Tool Loading Chain Compatibility:
Users.get_user_by_id,Tools.get_tools_by_user_id,Tools.get_tool_by_id,get_openwebui_tools,get_builtin_tools, andModels.get_model_by_idin all tool-loading paths are now called through_call_openwebui_compat(...)withprefer_thread_for_sync=True. -
MCP Server Parsing Promoted to Async:
_parse_mcp_serversis nowasync def. Callers in async paths useawaitdirectly. The one caller in a synchronous context (_build_session_config) uses_resolve_awaitable_sync(...)for safe bridging. -
Sync Valve Option Providers Safe:
ValvesandUserValvesclassmethods that callOWModels.search_models(...)(sync in pre-0.9, potentially async in 0.9.x) now use_call_openwebui_sync_compat(...)instead of direct calls. The result iteration uses_extract_search_result_items(...)instead of.itemsattribute access. -
Agent Team Model Search Compatibility:
_get_openwebui_models_by_tagand_get_openwebui_model_by_id(async methods) now use_call_openwebui_compat(...)forsearch_modelscalls. -
Models.get_model_by_idin System Prompt Extraction:_extract_system_promptnow uses_call_openwebui_compat(...)for the model DB lookup in its async loop.
Migration Notes
- No action required for users already on OpenWebUI < 0.9. The compatibility layer detects sync behavior and calls functions directly as before.
- Users upgrading to OpenWebUI 0.9.x will now have a fully functional Copilot SDK Pipe without any plugin updates or config changes.
- No Valve keys were added, removed, or renamed.
- All changes are internal to the API call layer.
Version Changes
Plugin Updates
- GitHub Copilot Official SDK Pipe: v0.13.0 → v0.13.1 | 📖 README