Skip to content

Release v2.5.0

Choose a tag to compare

@newfpv newfpv released this 19 Oct 23:23

Compact Bot Settings & Saved Messages Update ⚙️

This release makes history usage configurable, brings API key management and testing into one compact panel, and adds optional online status and automatic Saved Messages transfers.

🔑 Compact API Key Management

  • One API Keys Section: Key status, editing, explicit show/hide controls, and tests are grouped under Settings → API keys. Full keys are revealed only to the administrator in their private bot chat.
  • Readable Test Results: Key checks and model checks have a compact progress bar, status totals, grouped model results, cancellation, and paginated saved reports. Model checks request minimal output; checks run only when requested.
  • Invalid-Key Removal with Notification: An explicit API_KEY_INVALID response removes the key, clears its saved cooldown state, records a masked audit entry, and notifies the bot administrator. Quota exhaustion, permission errors, and temporary failures do not delete keys.
  • Accurate Status Labels: Availability reflects observed API cooldowns rather than an invented remaining daily quota. File-upload errors retain structured API details for invalid-key handling.

🧠 Configurable History Budget

  • Persistent Setting: AI Twin settings now expose a history budget from 4,096 to 262,144 tokens, with 65,536 as the default.
  • Independent Requests: Each reply passes its own budget through history pruning without changing a shared global setting. The existing window remains up to 1,000 messages; system instructions and current raw attachments are separate from the history budget.

🟢 Online Status & Saved Messages

  • One-Button Always Online: A single menu button toggles persistent online status. The worker restores an enabled setting after restart, respects Telegram flood waits, and stops cleanly when replaced or disabled. Disabled by default; visibility follows Telegram privacy settings.
  • Optional Saved Messages Transfer: Custom Saved settings can automatically forward new Saved Messages to the configured chat/topic and delete originals after successful forwarding. The module and transfer setting must both be enabled.
  • Transfer Receipts & Albums: A persistent receipt is committed before source deletion, allowing deletion retries without repeating a successful forward. Albums are handled together; forwarding failures preserve originals. Messages predating activation and self-destination loops are excluded.
  • Fact Checker Paused: Fact checking no longer registers its userbot handler or menu button. Configuration is retained for a future redesign.

✅ Verification & Changed Files

  • 139 Automated Tests Passed: Includes history persistence and isolation, invalid-key removal and notification, owner-only key reveal, compact reports, cancellation, online worker lifecycle, Saved Messages forwarding/deletion order, retry receipts, albums, and activation boundaries, alongside existing media and AI Twin regressions.
  • core/services.py, core/api_key_tests.py, core/gemini_media.py
    • Added configurable history budgeting, explicit invalid-key handling, safe API diagnostics, and retained structured upload errors.
  • core/auth.py, main.py, modules/api_keys_info.py, language_RU.json, language_EN.json
    • Consolidated API controls and localized compact menus, progress, reports, and notifications.
  • modules/always_online.py, modules/custom_saved.py, modules/fact_checker.py, modules/ai_twin.py
    • Added the online toggle and optional Saved Messages transfer, paused fact checking, and connected the history setting to replies.
  • tests/test_settings_online.py, tests/test_compact_settings.py
    • Added persistent-settings, key-management, lifecycle, compact-interface, and transfer regression coverage.

Full Changelog: v2.4.0...v2.5.0