Repository navigation
π DiscordianAI v0.2.10 Release Notes
Provider adapters, vision, a hardened message pipeline, aiohttp health endpoints, and a DRY/KISS cleanup across the whole bot π‘οΈ
Released: 2026-11-28
β οΈ Upgrade Notes (read first)
- Default chat provider is now Ollama Cloud (
https://ollama.com/v1/, modeldeepseek-v4.1-flash:1017). OpenAI still works: setOPENAI_API_URL,GPT_MODELand your key.REASONING_EFFORT(defaulthigh) is now actually sent, and requests usemax_tokens. - Reinstall requirements (
pip install -r requirements.txt):starlette,uvicornandbeautifulsoup4are gone;aiohttp,cachetools,tree-sitter,tree-sitter-markdownand thediscord.py[voice]extra are added. - The local web scraper is removed, along with
MAX_URLS_PER_MESSAGE,MAX_TOTAL_SCRAPED_CHARSandSCRAPE_DEADLINE_SECONDS. Web access is provider-side only. - Logs go to stderr;
LOG_FILEis parsed but ignored. 0.4.0was never published: its changes are folded into this release.
π New: Provider Adapters & Routing
One provider protocol, two adapters (OpenAI-compatible chat and Perplexity Agent API) behind a single registry. The orchestrator is the only place that routes, falls back and records the conversation turn.
- Deterministic routing gate replaces the old regex chain; optional Clef decision model via
ROUTER_MODE=clef - Web access for both providers, provider-native search and fetch, bounded and treated as untrusted
- Perplexity answers are now cached (5-minute TTL), scoped per conversation
- One history writer: each turn is recorded once, per conversation, never per user
πΌοΈ New: Vision
Image attachments (PNG, JPEG, GIF, WebP): up to 4 images, 5 MB each, magic-byte verified. Image messages always take the local path, and history keeps only [image: name] captions. VISION_ENABLED=false restores the old behaviour.
π‘οΈ Hardened: Message Delivery
- One delivery helper owns replies, allowed-mentions and reference policy: an answer can never ping
@everyoneor a role - One code parser (tree-sitter) decides what is code; every chunk is re-sanitised after splitting
- Link safety fails closed: multi-scheme autolinks, look-alike hosts and unicode tricks are neutralised
- Long answers arrive whole (the old splitter cut off at about 19,000 characters)
- Typed errors: failures are classified by type and status; provider text never reaches logs or health probes
π₯ Rebuilt: Health & Operations
/health,/health/live,/health/readyon aiohttp, bound before Discord login; an idle bot is no longer reported degraded- SIGTERM/SIGINT now shut down cleanly (they were previously handled as user input)
- One instance per config in the launcher; supervisor-owned logging with no duplicate lines
- Voice extra installed, so the voice warnings are gone
π§ Fixed
- A cached answer could be served to a different person or channel; keys are now scoped to the conversation
- The published package could not start (
No module named 'src'); the wheel now ships correctly - Perplexity Agent API calls failed on
max_steps; it now travels inextra_body - The OpenAI key-shape check is removed (it rejected valid Ollama Cloud keys)
- Retries and breaker accounting: one logical call counts as one failure
ALLOWED_CHANNELSnames resolve in every guild; a busy health port no longer kills the bot- Perplexity attribution header
X-Pplx-Integration: discordian-aiis sent to the official host only (thanks @qirh)
π§ͺ Tests, CI & Docs
- Coverage 92.31% (floor 84%); the mutation checker kills 22 of 22 mutations
- Golden delivery fixtures freeze output format; docs-truth tests keep docs and code in step
- New CI: minimum-versions job, shellcheck, wheel smoke test, a
pip-auditscript, and a Docker publish gate - GitHub Actions dependencies updated (checkout 7, setup-python 7, cache 6, codecov 7, qemu 4, dependency-review 5.0.1)
- CodeQL: the clear-text-logging and cyclic-import alerts are fixed
π By the Numbers
| Metric | Before (0.2.9.9) | After (0.2.10) |
|---|---|---|
| Tests | 587 | 1,859 |
| Test files | 34 | 118 |
| Coverage | β | 92.31% |
| Mutation checker | β | 22/22 killed |
| Source modules | 28 | 48 |
| Docs pages | 17 | 20 |
| Runtime dependencies | 10 | 9 |
| Commits | β | 372 since 0.2.9.9 |
π New Contributors
Full Changelog: v0.2.9.9...v0.2.10