Skip to content

v2.0.9 - Portable Build, Role Mentions, Streaming Fixes, Swapper Resilience

Choose a tag to compare

@cyberofficial cyberofficial released this 06 Jul 05:27
· 86 commits to master since this release

Added

  • Portable Build Browser Bundling - Playwright Chromium pre-downloaded at build time and embedded via --add-data into single-file exe (~25 MB); no external ms-playwright folder needed; runs on any Windows machine without playwright install
  • Discord Bot Role Mention Support - Bot now responds when mentioned via role (@&role_id) in addition to direct user mentions; checks if any mentioned role is assigned to the bot

Fixed

  • MCP Server Headless Mode - start_server.py now loads .env before starting MCP server, so MCP_BROWSER_HEADLESS=false and DISCORD_BROWSER_HEADLESS=false are properly applied
  • Tool Choice Conversion - Anthropic tool_choice (any/auto/none/tool) correctly converted to OpenAI format in message_converter.py
  • Streaming 429 Retry Logic - Streaming requests now honor PROVIDER_RETRY_ON_TRUNCATION setting (was hardcoded to 3 retries). Buffered mode already respected this setting.
  • Swapper Model Validation Resilience - Added exponential backoff retry logic to model swapper validation (api/swapper/validator.py). Transient failures (rate limits, network errors, 5xx) during model catalog fetch or test request are now retried up to 3 times before reporting failure.
  • Error Mapping - Updated httpx error handling for better error messages.
  • MCP Server Entry Point - server.py --mcp now correctly starts MCP server (stdio transport) instead of proxy server.

Changed

  • Single-File Portable Build - Browsers extracted to _MEIPASS temp dir at runtime via updated runtime-playwright.py hook; source runs use system Playwright install
  • DuckDuckGo Search Robustness - Uses only lite.duckduckgo.com endpoint via Playwright for reliable results; removes fragile HTML endpoint parsing
  • Debug Logging - Final buffered response logged for Discord web search troubleshooting
  • Documentation - Fixed Request Queue version reference in README (was v2.1, now correctly v2.0.7).

Files Touched

  • build_exe.bat - Pre-download browsers, copy to build_resources, bundle via --add-data
  • build_hooks/runtime-playwright.py - Use _MEIPASS for embedded browsers
  • discord_bot/bot.py - Role mention detection, debug logging
  • websearch/duckduckgo_html.py - Source vs portable browser path logic, error handling
  • start_server.py - Load .env before MCP server launch
  • providers/message_converter.py - tool_choice conversion logic
  • requirements.txt - Added playwright, playwright-stealth, pywin32, dotenv
  • nimbus.spec - Full PyInstaller spec with browser datas and hidden imports
  • providers/provider.py - Pass max_retries=config.retry_on_truncation to streaming execute_with_retry calls
  • api/swapper/validator.py - Added _execute_with_retry helper with exponential backoff for catalog validation and model test requests
  • providers/error_mapping.py - Updated httpx error handling
  • server.py - Handle --mcp/--mcpwebsearch flag to start MCP server