Skip to content

v1.22.0

Latest

Choose a tag to compare

@s-nagaev s-nagaev released this 24 Nov 01:23
· 7 commits to main since this release
3153673

Changelog

All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.

[1.22.0] - 2026-11-23

Added

  • IDE clients can select the model per request: the stdio protocol request frame accepts an optional model field (model id, 1-based listing index or display name), applied to the thread before the prompt runs; an unknown selection answers an invalid_request error and the prompt is skipped, while an absent, null or empty field changes nothing.
  • IDE clients can list the selectable models: a new models request is answered by a models_result frame carrying the same models the /model command lists, in the same order, each with its provider, the active flag for the requesting thread and the image-generation capability, plus the account-level default provider and model; ready.capabilities.models advertises the frame.
  • Extra compatible provider instances can be defined with environment variables. Each OPENAICOMPATIBLE_<NAME>_API_KEY registers a provider named <NAME> that serves chat, speech-to-text and text-to-speech, with the endpoint taken from OPENAICOMPATIBLE_<NAME>_URL. The number of instances is not limited.
  • Anthropic-compatible endpoints follow the same scheme. ANTHROPICCOMPATIBLE_<NAME>_API_KEY registers a chat provider per name, and ANTHROPICCOMPATIBLE_<NAME>_URL points it at the endpoint. Left unset, the URL stays https://api.anthropic.com.
  • IMAGE_MODELS_WHITELIST limits which image generation models the bot offers and uses. Comma-separated and optional: when set, image model listings and image generation are restricted to the listed models, and MODELS_WHITELIST / MODELS_BLACKLIST no longer apply to image models. Left unset, image models keep following the global whitelist and blacklist.
  • Replying to a message in Telegram now sends the quoted message to the model. When you reply to a message, the agent receives the quoted message together with its author, so a short follow-up such as "tell me more about that one" keeps the context it answers. A quoted message that contains only media is described by a placeholder, a fragment selected from a longer message takes precedence over the whole message, and a quote that was deleted or is too old to deliver is reported as unavailable.

Changed

  • The built-in CustomOpenAI instance keeps its name and its variables. CUSTOMOPENAI_API_KEY and CUSTOMOPENAI_URL still configure it, so stored selections and existing configuration need no change.
  • A thread without an explicit selection now follows DEFAULT_PROVIDER and DEFAULT_MODEL. The deprecated user-level LLM selection was removed from the user record, so it can no longer override the configured defaults for new threads.
  • Threads pinned to that removed user-level selection keep it for now. A follow-up data cleanup drops those entries, after which the threads follow the configured defaults as well.
  • The dependency stack moved forward across the board: pydantic 2.14.3, pydantic-settings 2.16.3, redis-py 8.1.0 (still forced to RESP2), anthropic 2.8.0, openai 3.51.0, google-genai 3.3.0, dashscope 2.1.0, elevenlabs 2.78.0, mistralai 3.7.0, httpx2 2.16.0, telegramify-markdown 1.4.2, and minor updates of ddgs, click and trafilatura. On the dev side, respx was dropped from the test dependencies.
  • Gemini async traffic runs on httpx2 instead of the SDK's opportunistic aiohttp fallback. The google-genai client receives an injected httpx2.AsyncClient (a maintained httpx fork), so corporate-proxy, timeout and retry settings apply to Gemini requests just as they do for the other providers.
  • fastembed 0.9.1 with onnxruntime 1.32.0 drops Intel Mac support for semantic memory. The embedding backend installs on macOS with Apple silicon, Linux (x86_64 or arm64) and Windows; on Intel Macs semantic memory is now disabled.
  • The default moderation model for the MiniMax provider is now MiniMax-M3. Instances that do not set MODERATION_MODEL themselves get it.

Fixed

  • Semantic memory no longer fills up with copies of the compaction seed. Every conversation compaction re-wrote the same "What we were talking about?" pair into the long-term Chroma memory under a fresh ID, so repeated compactions piled up duplicates that crowded out genuine memories in search results. Compaction seeds now stay out of the archive entirely; entries already stored age out through the normal TTL.
  • CHIBI_ENV=dev runs no longer read the production settings file: a development run ignores ~/chibi-bot/settings and any CHIBI_SETTINGS_FILE path entirely and injects nothing from them into the environment, so the shell environment and the working directory .env stay the only dev sources; production runs keep loading the file with its usual precedence.
  • A host install without LOCAL_DATA_PATH no longer writes to the container path: outside Docker and Podman the data directory falls back to ~/chibi-bot/data, which is created when missing, instead of failing on the image-only /app/data; an explicit environment variable, working directory .env or ~/chibi-bot/settings value still wins.
  • Answers delivered through the say tool call stream to IDE clients instead of arriving only at the end: the text argument of the turn-ending say call is now sent on the live delta channel, so a client that declared the streaming capability shows the answer while the turn is still running.
  • Model enumeration can no longer abort a chat response. When every provider fails to list its models, prepare_system_prompt and the delegate tool now continue without the available_models_to_delegate section and log a warning, instead of letting ModelsUnavailableError escape the chat path. Listing availability degrades the same way the UI listing already did, so chat answers keep flowing.
  • A scheduled command survives an unavailable command moderator. HTTP errors, connection failures and unparseable moderator responses surface to the agent as one standardized error message instead of an unhandled failure or a misleading "declined" verdict; the command is not run, and the agent job wakes itself with the same message so it can decide what to do next.
  • Edited messages no longer re-trigger the agent. An edit arrives as an edited_message update, which the prompt and file-upload handlers now ignore, so editing or reacting to a message that quotes the agent no longer starts a new turn. Fresh messages, including replies to the agent, are handled as before.
  • Command messages carrying an attachment are no longer handled as uploads. The file-upload filter now excludes commands across the whole media expression.
  • Speech-to-text reports a clear error on empty transcriptions. transcribe raises an error instead of returning None when the ElevenLabs API returns no text (behavior aligned with elevenlabs 2.78).

[1.21.3] - 2026-11-11

Fixed

  • Model listing survives provider outages: failed provider fetches are no longer cached as empty listings; the listing serves the last known-good set, partial results stay live, and users get a clear error instead of silently missing models for an hour.
  • Gemini tools with unsupported JSON-Schema keywords no longer crash the provider: oneOf schemas are normalized to anyOf, other rejected keywords are stripped, and a single un-convertible MCP tool is skipped with a warning instead of taking down the whole Gemini tool list.

[1.21.2] - 2026-11-10

Fixed

  • Device and FIFO paths can no longer hang the session: analyze_image and ocr_pdf reject character devices, FIFOs and directories, and read accepted files asynchronously so a special path can never block the reply loop.

[1.21.1] - 2026-11-09

Fixed

  • MistralAI defaults refreshed: the chat default model is now mistral-large-latest, and the moderation default moved from the retired mistral-moderation-2603 snapshot to mistral-small-2603.
  • Forced context compaction now triggers at the configured max_history_tokens budget (capped by the model window) instead of being deferred until near the raw context window on large-window models.

1.21.0 - 2026-11-08

Added

  • The agent can rename the current thread over the IDE protocol: rename_thread now also reaches stdio clients, pushing the persisted name as a thread_renamed frame.
  • A hidden /rename_thread <name> command renames a thread from an IDE client: the name is validated, persisted server-side and advertised in ready.capabilities.commands.
  • Agents keep the thread name in sync with the dialog's intent: on clients that offer rename_thread, the prompt asks the agent to rename the thread as the subject moves on.
  • Voxtral speech-to-text on the MistralAI provider: voice messages transcribe via POST /v1/audio/transcriptions, default model voxtral-mini-transcribe-3-0, selectable with stt_provider.
  • Voxtral text-to-speech on the MistralAI provider: replies can be spoken via POST /v1/audio/speech, default model voxtral-mini-tts-3-0, selectable with tts_provider.
  • Context decisions are now logged and countable in-process: each logs the request size and its provenance (provider_measured or estimated), and counters tell a fired compaction from a skipped one.
  • Forced compaction now runs after an answer by default: CONTEXT_FORCED_COMPACTION_ENABLED re-measures each thread after delivery and compacts it before the next request would be trimmed.
  • Forced compaction results reach the agent as a marked seed: the replacement summary opens with a [SYSTEM] Context was forcibly compacted on <date> marker.
  • Guard trims are now disclosed to the agent: every pre-call or in-loop trim appears on the next request as a guard_trim_warning line inside <context_note>.
  • New provider: StepFun. Set STEPFUN_API_KEY to use it: chat (step-5-preview by default), vision, speech-to-text and text-to-speech via Step-Audio, and moderation via step-3.5-flash.
  • Hidden turns are now silent at every renderer. A turn ended by ack_silently() delivers an empty answer that no longer reaches Telegram, the terminal REPL or scheduler chats.
  • Mechanical silence is now a guarantee. ack_silently() is admitted only for a genuine absorb; a misuse is repaired once, then raises SilentTurnError.
  • Optional forced tool_choice for terminal-tool turns (default off): FORCE_TERMINAL_TOOL_CHOICE=true makes each adapter request a tool call to end the turn (required for OpenAI, any for Anthropic/Mistral, ANY for Gemini).
  • Cross-cutting regression suite for the silence contract: the guarantees are pinned at the integration layer, covering the reproduced infinite say/ack loop and the hidden-message rule.

Changed

  • Interfaces and events are now organized into dedicated packages: the interface contracts and the event services moved into chibi/interfaces and chibi/services/events.
  • Mistral defaults refreshed: chat and vision use mistral-small-2603, moderation uses mistral-moderation-2603, and context-window limits for mistral-large-4 and mistral-small-2603 are now real.
  • The say/ack_silently delivery contract is rebuilt: say(text) delivers specific information, ack_silently() absorbs everything else, and the fail-safe speaks only once all planned work is finished.
  • An oversized request is now prevented instead of failing. Older turns collapse into a summary when the thread exceeds its context threshold (default 200k tokens, overridable with MAX_HISTORY_TOKENS).
  • Context-size metadata moved from the system payload into a per-turn <context_note> on the last user message, so prompt caching is no longer invalidated each turn.
  • The volatile context-size warning no longer tells the model to compact before answering. The "compact first" imperative now lives only in the base prompt and the descriptions of summarize_history and clear_tool_call_history.
  • Gemma models no longer silently lose the system prompt. Gemma 4 now gets the system channel with tools, while Gemma 1-3 get the prompt folded into the first user message.
  • The loud-empty delegation contract: say and ack_silently are offered only to requests carrying a user interface, so sub-agents must reply with a plain-text report, and an empty one is now an error.
  • A say() or ack_silently() call now actually ends the turn. say(text) becomes a visible assistant message and ack_silently() a hidden one, with a visibility field persisted on every backend.
  • Silence and user-facing text are now stated through tool calls. say(text) is the only channel to the user and ack_silently() acknowledges a background event invisibly.

Fixed

  • summarize_history now performs a real compaction. Calling the tool replaces the stored thread history with the summary exchange, so the context actually shrinks.
  • A forced compaction can no longer make the context worse. A fit check runs before anything is written: a result that does not fit or does not reduce leaves the history untouched.
  • The scheduler wakeup timer is re-armed when a job pass comes up empty: a silent stall with live jobs queued no longer leaves the timer disarmed; the guard re-arms from the nearest next_run_time, and a watchdog wakes it every 120 s.
  • The <chibi>ACK</chibi> sentinel is no longer mishandled. Only an answer that is precisely the sentinel counts as an ACK, and the marker is stripped from every other answer before delivery.
  • The contradictory "ACK grammar" block is gone from the system prompt. The addendum made every assistant turn a bare ACK or plain text, contradicting the approved fail-safe; it is removed and the ACK rule is unchanged.

1.20.1 - 2026-10-25

Added

  • Scheduler observability: APScheduler logs are now visible in Chibi's loguru sinks. APScheduler 3.x emits everything through stdlib logging on the apscheduler.* logger family, and Chibi never bridged it — so every INFO/DEBUG record (Scheduler started, Added job ... to job store, Next wakeup is due at ..., No jobs; waiting until a job is added) was discarded outright, and even the surviving WARNING+ records (e.g. Run time of job ... was missed by 2:00:00) leaked to stderr as bare, unformatted lines with no timestamp, no level and no scheduler marker, making "did not fire" and "fired but delivery failed" indistinguishable in the logs. A dedicated stdlib→loguru bridge (chibi.config.logging) now installs a single intercepting handler on the apscheduler logger (idempotent, propagation disabled — no duplicate or double-formatted output, no logging.lastResort leak), scoped narrowly to the apscheduler.* family so all other loggers and every runner sink behave exactly as before. Bridged records render in the standard datetime | LEVEL | message shape with the stdlib logger name embedded in the message ([apscheduler.scheduler] ...), so a plain grep -i scheduler over the logs finally matches.
  • New SCHEDULER_DEBUG_LOGS setting (default false): the bridge floor is flag-gated — with the flag off the floor is INFO (start, scheduling, missed-run warnings; no per-wakeup chatter), with SCHEDULER_DEBUG_LOGS=true it drops to DEBUG so Next wakeup is due at ... and Added job ... become visible for diagnosing wakeup-arming issues. Toggling the env var only requires a process restart, not a rebuild. Documented in the generated configuration reference and the settings docstring.
  • Explicit Chibi-level scheduler logging, independent of the stdlib bridge: every successful scheduling call (schedule_interval_job / schedule_cron_job / schedule_once_job) now logs an INFO line carrying the job id, the owner (derived from the job-id namespace — system or the agent's user id), a trigger summary and the next run time, and a failed add_job logs a WARNING with the job id and error before re-raising. Additionally, a Chibi-level WARNING is logged whenever APScheduler dispatches a missed-run event (EVENT_JOB_MISSED), carrying the job id and the missed-by duration — the exact signature of the macOS-sleep digest failures, previously invisible.
  • Docs: self-sufficient trigger_text contract for self-type scheduled jobs. The schedule_task tool now states explicitly (in the trigger_text parameter description, the action-type descriptions and the SCHEDULER_HINT_PROMPT system-prompt hint) that for self jobs the trigger text must be exhaustive and self-sufficient — goal, requirements, constraints and expected output — because at fire time the model may have no memory of the scheduling conversation (thread cleared, context evicted, or a different chat). Includes good vs. bad examples. Docs-only: no schema or runtime changes.

Fixed

  • Scheduler wakeup guard against silent job starvation: a transient job store failure (e.g. a Redis hiccup) inside APScheduler's wakeup() left the wakeup timer permanently disarmed — the scheduler stayed "running" but silently stopped executing jobs until an unrelated external wakeup() (a new job or a chat message) happened to re-arm it. This mirrored an upstream APScheduler bug (agronholm/apscheduler#1132, merged to the 3.x branch on 2026-08-31 but not yet released). Chibi now ships GuardedAsyncIOScheduler, a local guard that mirrors the upstream fix verbatim: an exception escaping _process_jobs() is logged through the standard apscheduler.scheduler logger and the wakeup timer is re-armed with jobstore_retry_interval. Both scheduler flavors (Telegram ChibiScheduler and stdio/IDE StdioScheduler) use it. The guard is marked TODO(apscheduler-3.11.4): remove guard and is a pure-deletion revert once APScheduler 3.11.4 ships. Regression tests simulate a jobstore.update_job() failure mid-wakeup and verify the scheduler keeps firing jobs.
  • Local semantic memory no longer breaks after OS temp cleanup: the LOCAL fastembed embedding model was cached in the system temp directory ($TMPDIR/fastembed_cache), which the OS wipes periodically — a wiped or interrupted download then made the ONNX model unloadable and killed Chroma archival and semantic search for the whole deployment. The model is now cached in a persistent per-user directory (~/.cache/chibi/fastembed), so a temp-directory cleanup can no longer destroy it; the location is overridable with the FASTEMBED_CACHE_PATH environment variable. Embedding vectors, model and dimension are unchanged, so existing collections need no re-embedding.

Changed

  • APScheduler upgraded 3.11.2 → 3.11.3 across all dependency artifacts: poetry.lock, and the exported requirements.txt (the production Docker image pin) and requirements-dev.txt (pyproject.toml already allowed ^3.11); regenerating the requirements via the deps task (poetry export) keeps everything consistent. 3.11.3 fixes #1103 — sub-minute interval jobs stalling across a DST spring-forward gap with ZoneInfo timezones, relevant ahead of the 2026-10-26 CEST→CET transition (our tzlocal yields ZoneInfo). No API changes; PTB 22.x compatibility range (>=3.10.4,<3.12.0) unaffected.

1.20.0 - 2026-10-13

Added

  • Local file sending via send_image, send_video and send_audio: the tools now accept either an http(s) URL (behaviour unchanged) or a path to a file on disk — no more spinning up a throwaway HTTP server just to hand a locally generated file to the chat. Local-path access is gated by FILESYSTEM_ACCESS exactly like the agent's file tools, and nonexistent paths or directories are rejected with a clear, actionable error. The parameter names keep their *_url names (they are part of the model-facing tool contract) — only the schema descriptions changed to advertise both forms. On the Telegram and Scheduler runtimes, images from disk are delivered through the same size-partitioned buffer pipeline as generated images (photo vs document), while audio/video are streamed by python-telegram-bot directly from the path; audio URLs keep their download-then-attach behaviour. If the image media-group upload fails, the plain-text fallback reports only the file's base name for local files, so no absolute filesystem path can leak into the chat history or the model's context. (This fix also repairs the URL fallback on the Telegram runtime, which previously crashed with a duplicate-keyword error instead of delivering the fallback text.)

  • Image-to-image support in the generate_image tool: the tool now accepts optional reference_file_ids (Telegram file IDs of previously uploaded images) and/or reference_paths (local filesystem paths; requires filesystem_access to be enabled) and passes the resolved reference images to the selected image model. Provider and model capability gating prevents calls to models without image input support: supported out of the box for Gemini Nano Banana content-creation models (gemini-*-image, via inline prompt parts) and OpenAI gpt-image-* models (via the Images Edit API), while imagen-* / dall-e-* models and providers without image input reject the call with a clear error. Reference images are limited to PNG, JPEG and WebP, at most 10 images, 10 MB each; calls without reference input behave exactly as before.

  • Provider failover engine (auto ladder, manual chains, 20-minute cooldown store): when an LLM request fails on rate limits, server errors, timeouts or network failures (context overflow and moderation errors are deliberately excluded — they have their own recovery paths), the request is retried behind a fallback policy resolved per role (master / subagent). AUTO (default, zero config): the failed provider goes on a 20-minute cooldown (the only persistent state — Redis when configured, in-memory otherwise; it affects only auto-selection, never manual choices), then the same model is retried on another provider (exact-name match against the in-memory model registry), then the next provider's default model, then an honest failure — no model mixing, no revisiting already-tried pairs, no cross-mode cascades. The primary is always attempted first and the ladder — including model enumeration and cooldown-store access — is built lazily only after the primary fails, so the happy path keeps zero extra latency. MANUAL: an ordered chain of provider/model pairs fully replaces the ladder for that role, head of the chain is the primary, and the cooldown never blocks it (explicit user choice). DISABLED: a single attempt, honest failure.

  • Failover chain configuration with non-fatal validation: two new settings, FAILOVER_CHAIN_MASTER (main chat) and FAILOVER_CHAIN_SUBAGENT (sub-agent requests), each accepting auto (default), disabled, or an ordered comma-separated list of provider/model pairs split on the first slash (model names may contain slashes, e.g. google/gemini-3.5-flash-lite). Validation is non-fatal by design: empty, missing-slash, empty-part and duplicate entries are warned about and skipped — a malformed chain never prevents Chibi from starting. Policies are resolved once per process and memoized; the resolved policy (policy cache, cooldown store, model registry) can be reset programmatically for tests and future runtime overrides.

  • In-chat warnings on every fallback attempt: each transition to a fallback (auto ladder or manual chain alike, never the primary attempt) announces the trigger (rate limit / server error / timeout / network) and the pair about to be attempted — as a chat warning for master requests and a log warning for sub-agent requests. The final failure, when every step of the chain fails, is always reported honestly with the last provider error; hook failures are logged and swallowed so a notification can neither block nor break the fallback walk.

  • Wiring integration tests: five end-to-end tests exercise the real call sites (main chat and sub-agent request paths) against the engine — the fallback walk, in-chat warning delivery, cooldown behaviour across requests, and the disabled policy bypass — rather than only the engine in isolation.

  • Text-to-video generation via three new providers: Alibaba (Wan, wan2.6-t2v — async AioVideoSynthesis submit/poll/download), ZhipuAI (cogvideox-3 on the same z.ai base URL and API key as chat/image) and MiniMax (Hailuo H3/H3-Max via the V2 API). Polling happens inside the provider (get_videos, bounded 15 s interval / 480 s timeout) and always returns downloaded MP4 bytes — provider URLs expire after 1–24 h. Providers declare their video models and are video_generation_ready when a key is configured.

  • New generate_video and get_available_video_generation_models tools: the model picks a provider (or uses the user's active video provider fallback, mirroring the image flow), generation runs in the background (1–6 min), and the finished clip is delivered to Telegram via send_video with a cover thumbnail downscaled to the Bot API constraints (JPEG < 200 kB, ≤ 320 px). Clips larger than ~48 MB are delivered as documents. Tools are registered only when at least one video-capable provider key is configured (respecting TOOLS_WHITELIST and PUBLIC_MODE semantics of the other tools).

  • Video generation limits, 1:1 with images: VIDEO_GENERATIONS_LIMIT monthly cap, VIDEO_GENERATIONS_WHITELIST allowlist, User.videos history with backward-compatible storage defaults, per-thread and per-user active video provider/model selection (/video_models-style plumbing), and e2e-style flow tests covering delivery, the size guard and the limit-exceeded path.

  • Docs: video generation providers documented in README and all translated READMEs.

  • Header/secret authentication for SSE MCP servers and a new REST transport: initialize_sse_mcp_server now accepts optional headers (plain HTTP headers sent with every request, e.g. Authorization) and secret_envs (secret entries resolved from the process environment with fallback to the env file), both merged into the request by a shared auth-header helper with a documented precedence. A new initialize_rest_mcp_server tool connects to MCP servers over plain JSON-RPC HTTP POST (the SDK's stateless streamable-HTTP transport), for JSON-RPC endpoints that support neither SSE nor session negotiation; it is gated by the new enable_mcp_rest setting (ENABLE_MCP_REST, default false, documented in the Docker Hub README and the generated sample config), and deinitialize_mcp_server is registered whenever it is enabled. The mcp SDK was bumped to 2.3.0 (with an explicit httpx2 dependency and regenerated lock/exports), covered by new unit tests, a dedicated SSE-auth module and an offline mock-transport regression test for stateless servers.

Fixed

  • MiniMax video model names are normalized and failed API calls now surface their error details: the H3 / H3-Max shorthands are resolved to the declared MiniMax-H3 / MiniMax-H3-Max names expected by the MiniMax V2 API (exact match first, then a case-insensitive suffix match against the declared video models), and an unknown name now fails immediately with a clear ServiceResponseError listing the supported models instead of being sent to the API as an unsupported model. Failed REST API calls that carry no base_resp payload now raise with the HTTP status_code and the first 200 characters of the response body, instead of an opaque ServiceResponseError with no detail at all.
  • MCP secret/header semantics are aligned with the stdio tool, and real connection errors are surfaced instead of being swallowed: secret_envs now accepts Header-Name=template ${VAR} entries alongside bare variable names, with every referenced variable resolved from the process environment and falling back to the values in env_file_path (dotenv_values), through one shared helper used by all three transport tools. env_file_path for SSE/REST is a pure variable store: only header-like names (hyphenated such as X-Api-Key, or canonical mixed case such as Authorization) are merged as literal headers, so all-uppercase, all-lowercase and underscore-style names are never sent as headers. Connection failures no longer collapse into a generic "failed to connect" RuntimeError — MCPManager records the lifecycle-task exception before signalling readiness and every connect_* re-raises it (ExceptionGroups unwrapped to the single meaningful member), with the generic RuntimeError kept only as the timeout fallback. The lifecycle task also stays registered after a successful connect, so deinitialize_mcp_server still cancels it, unwinds the exit stack and closes the transport.

Changed

  • The video generation polling lifecycle is now logged in the MiniMax, ZhipuAI and Alibaba providers: submission acceptance (including the provider task id, so a finished generation can be recovered by querying the provider after a restart), each poll attempt with status and elapsed time (debug level), and every terminal outcome — success (with elapsed time, clip duration and size), timeout and failure/cancellation (error level). No behaviour, timing or payload changes; previously the entire submit → poll → download loop ran in complete log silence.

1.19.0 - 2026-10-09

Added

  • New jina_read web tool: reads pages through the Jina Reader API with return_format (text/markdown/html/screenshot/pageshot), target_selector, link summaries and a configurable timeout. Works without an API key on the free 20 RPM tier; with JINA_API_KEY the limit rises to 500 RPM. Handles JS-heavy and anti-bot pages that plain extraction cannot.
  • New jina_search web tool (key-gated): searches the web via the Jina Search API and returns top results with titles, URLs and content truncated to ~2000 characters per result (title and URL always preserved). Registered only when JINA_API_KEY is configured — the Search API hard-requires a key and bills ≥10k tokens per request.
  • Hybrid read_web_page with quality gating and a circuit breaker: the tool is now a smart orchestrator. With JINA_API_KEY the Jina Reader path is tried first; without it, trafilatura goes first and the free r.jina.ai tier acts as the fallback. Every result passes a quality gate (minimum length, raw-HTML fallback detection, JavaScript-garbage heuristics); each path is guarded by an in-memory circuit breaker (3 consecutive failures → 5-minute cooldown → single half-open trial). When both paths fail the gate, the better raw result is returned with a warning instead of nothing. The return contract is unchanged.
  • JINA_API_KEY setting documented in the generated configuration reference (Section 12, Search Capabilities).
  • New read_telegram_file tool: reads the content of a text-based file (e.g. .md, .txt, .py, .json) previously sent as a document to the Telegram chat. The file_id comes from upload captions or the get_file_info tool; content is served by the new TelegramFileStorage.get_text backed by a shared text-file detector (MIME allowlist first, file-extension fallback — Telegram often reports application/octet-stream for plain-text files it cannot classify). Non-text files (images, binaries) and oversized files are rejected; very long files may be truncated with an explicit marker at the end of the content; tool-level errors (ValueError, FileNotFoundError, StorageError) propagate per the tool error conventions. Only works when file storage is set to Telegram; covered by 10 new tool tests.
  • Document upload captions now include file readability hints: the caption metadata exposed to the model for every uploaded document gains file_name, mime_type and an is_text_file flag (computed by the shared detector), so the agent knows upfront whether a file can be read with read_telegram_file.

Fixed

  • Legacy retention_cleanup-<timestamp> scheduler job duplicates are now removed automatically at startup: the old registration code created a uniquely-named retention-cleanup job on every restart (retention_cleanup-YYYYMMDDHHMMSS), leaving dozens of redundant copies in the persistent store that would each fire and run perform_retention_cleanup again. register_retention_cleanup_job now performs a one-shot O(jobs) self-heal pass that deletes any job id matching retention_cleanup-\d{14} from the persistent store (Redis or SQLite) before registering the fixed-id job — system:* and agent:* jobs are never touched — so affected deployments clean themselves up on the next restart without manual intervention.
  • LLM thoughts in scheduler-triggered turns now render as native Telegram thinking drafts instead of plain "💡💭" text messages: SchedulerInterface no longer inherits the base implementation that spammed the chat with plain text; it mirrors TelegramInterface by sending an ephemeral <tg-thinking> sendRichMessageDraft through the shared scheduler Bot and clearing it before the final message. Draft failures are logged and swallowed — thoughts are deliberately never delivered as plain chat content.
  • Scheduled/self-wake turns can now deliver media and chat actions to Telegram: SchedulerInterface.send_audio, send_video, send_images and send_document no longer raise NotImplementedError (which crashed the job into a generic "Scheduled job failed" note) — they mirror TelegramInterface delivery through the shared scheduler Bot with the payload-fixed chat_id/message_thread_id. Typing / uploading-photo / recording-voice chat actions are sent as best-effort cosmetic hints whose failures are logged and swallowed instead of failing the job; image URL lists fall back to a plain text message with the URLs when the media group upload fails.
  • Web pages are no longer returned as mojibake when a server negotiates brotli compression: the shared HTTP helper manually advertised Accept-Encoding: gzip, deflate, br, but httpx has no brotli decoder installed, so servers honoring the header returned brotli-compressed bytes that were passed through undecoded. The header now advertises only the encodings httpx can actually decode (gzip, deflate).
  • Selecting an image model no longer overwrites the thread's LLM model: tapping "← Back to providers" in the /image_models menu (shown when a provider has more than 12 image models) previously switched the inline-keyboard state to the LLM flow, so the next tap stored the image model as the thread's chat model until it was re-selected manually.
  • Semantic history saving and search no longer fail with a ChromaDB embedding-function conflict error: the custom FastEmbed embedding function did not implement the embedding-function protocol expected by chromadb 1.5.9, so every write to semantic memory failed — background archival tasks died silently and the affected threads' conversation history was lost from semantic memory. A legacy silent fallback to ChromaDB's default (English-only ONNX) embedding model could additionally poison collections.
  • The FastEmbed embedding function now fully implements the ChromaDB embedding-function protocol (name / get_config / build_from_config, registered in the Chroma embedding-function registry): collections now persist the embedding function as "known", and its configuration round-trips through save/load.
  • Embedding-function-conflict ValueErrors are now wrapped and logged instead of silently killing background archival tasks.
  • The fastembed mean-pooling deprecation notice no longer leaks into logs: the store is homogeneous — fastembed 0.8.0 has been pinned since the memory subsystem landed, so the notice is factually inapplicable and was suppressed narrowly (by message and category).
  • Emergency summarization now uses the thread's active model instead of the provider default model: previously the request could hit a different, separately-billed model and fail with rate-limit errors that were swallowed by the reactive recovery path, leaving the conversation permanently over the context limit.
  • Emergency summarization requests now fit the context window: the summarizer input is truncated under a token budget (background tool-response blobs dropped largest-first, then the oldest turns; the latest turn is never dropped, and in-loop tool-call pairs are excluded as before), and the completion cap is raised to 130% of the configured max_tokens (threaded as an explicit per-call parameter through all provider completion paths).
  • The token usage cache is invalidated after a successful emergency summarization (previously stale usage data could re-trigger summarization pointlessly).

Added

  • Mandatory imperative context-size warning in the system prompt: the advisory warning was replaced with a mandatory instruction to summarize or drop stale tool results before answering.
  • Volume-based tool-results warning: when background tool results exceed 25% of the context size, the system prompt lists the top-3 largest offenders (tool name + estimated tokens) and suggests clear_tool_call_history.

Changed

  • The silent fallback to ChromaDB's default embedding model is removed: when fastembed is unavailable, semantic memory is now disabled loudly instead of silently switching to an incompatible model (a different vector space that would corrupt search results).
  • The embedding model now loads lazily (once, on the first embed) instead of on every get_or_create_collection call (~0.3 s saved per archived message).
  • The default local embedding model is unified as sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 — an intentional multilingual default; ChromaDB's built-in default model is English-only.

[1.18.0] - 2026-10-01

Added

  • Internal scheduler v1 — the agent can now schedule recurring and one-time tasks that survive restarts:
    • The scheduler core is implemented as a singleton ChibiScheduler with a typed scheduling API (schedule_interval_job / schedule_cron_job / schedule_once_job, plus job listing and removal), a job-id namespace contract (system:* for built-in jobs, agent:<user_id>:* for agent-created ones) and a persistent job store: Redis when configured, local SQLite otherwise.
    • Misfire policy: bounded catch-up with SCHEDULER_MISFIRE_GRACE_TIME (default 3600 seconds), coalesce=true, max_instances=1. One-time reminders keep an unlimited grace period, so a reminder always fires after a wake-up no matter how late the process is.
    • Six new settings: SCHEDULER_TOOL_ENABLED (default true), SCHEDULER_NOTIFY_ENABLED (default false), SCHEDULER_AGENT_COMMANDS_ENABLED (default true), SCHEDULER_COMMAND_TIMEOUT_MAX (default 900), SCHEDULER_MISFIRE_GRACE_TIME (default 3600) and SCHEDULER_FAILURE_NOTIFY (default true).
    • Three new agent tools: schedule_task, list_scheduled_tasks and delete_scheduled_task. Every task fixes its delivery context (chat/thread) at creation time and runs one of three action types: self (wake the agent in the fixed thread — the answer is delivered to the user, or nothing is sent when the agent replies with the internal silence marker), notify (static message, zero LLM usage) and command (shell command, pre-moderated at creation and re-moderated before every run, killed by process group on timeout; after every run the agent is woken with the full result and owns communication with the user). notify is disabled by default and must be enabled explicitly; command is enabled by default and gated by SCHEDULER_AGENT_COMMANDS_ENABLED, with every command pre-moderated.
    • Startup recovery: agent jobs with broken payloads or unexpected job functions, and jobs of users that no longer exist, are removed at startup; a corrupt job store never prevents Chibi from starting.
    • Failed scheduled jobs notify the user with a per-job anti-flood cooldown (at most one notification per job per hour), governed by SCHEDULER_FAILURE_NOTIFY; direct user notifications are the fallback for failed agent wake-ups (LLM/provider errors) and non-command action failures only.
  • Scheduler support in the stdio runner (IDE/TUI clients): the agent can now also schedule tasks from JSONL stdio sessions (tui, vscode, pycharm, neovim), in addition to Telegram:
    • The schedule_task, list_scheduled_tasks and delete_scheduled_task agent tools are registered for every stdio client; jobs are keyed by the runner's negative reserved IDE identity and live in a dedicated SQLite job store at {local_data_path}/scheduler_stdio.db — fully isolated from the Telegram scheduler's store (Redis settings are deliberately ignored for the stdio store), so the two processes can never double-fire each other's jobs.
    • self and notify deliveries (and per-job failure notifications) reach the client as unsolicited {type: "message", thread_id, content} frames, reusing the background_messages capability machinery (same frame shape, same serialized stdout pathway as background tool answers).
  • Stop conditions for interval tasks (heartbeat support): schedule_task now accepts optional schedule.stop_at (ISO8601 datetime after which the task stops running, mapped to the native interval trigger end_date) and schedule.max_fires (the task is removed automatically after this many runs; the fire counter is persisted in the job store, so it survives restarts, and a double-fire guard makes the counter the source of truth). Both are interval-only — cron and once schedules reject them with a clear error — and whichever limit is reached first wins. list_scheduled_tasks shows stop_at and remaining_fires when they are set, enabling the one-call heartbeat pattern (wake → check state → do due work → ACK) instead of chained sleep-in-terminal background tasks.
  • Scheduler heartbeat hint in the system prompt: when the scheduler tools are registered for the active runner, the system prompt gains a short conditional block telling the agent to prefer schedule_task heartbeats (interval + max_fires) over chaining sleep-in-terminal background calls; the hint is wired through the same registration predicate as the tools, so it never appears where the tools are unavailable (e.g. the terminal REPL).

Changed

  • Scheduled command actions no longer deliver anything to the user directly: after every run (success or failure, any exit code, empty or non-empty output) the agent is always woken in the fixed thread with the full result context (command, exit code, stdout, stderr — truncated), through the same self-wake pipeline as self actions, and decides itself what — if anything — to tell the user. Only a failed wake (LLM/provider error) falls back to a direct user notification, guarded by the existing per-job anti-flood cooldown.
  • SCHEDULER_AGENT_COMMANDS_ENABLED now defaults to true (previously false): scheduled shell commands are allowed out of the box — premoderation at creation and re-moderation before every run still apply.
  • Scheduler tools are no longer registered in the terminal runner entrypoint (chibi REPL): the tool gate is runner-aware (Telegram and stdio clients only), and the terminal entrypoint additionally deregisters them explicitly, so terminal sessions never expose scheduling tools.
  • Scheduler tool calls in stdio sessions now resolve the stdio scheduler singleton: jobs created by an IDE/TUI client are registered on the started stdio scheduler instead of the Telegram-flavored one (which is never started in a stdio process, so jobs added to it silently never fired).
  • The scheduler now always starts together with the bot (previously only when semantic memory was configured) and is shut down by a single combined post_shutdown handler.
  • The semantic memory retention cleanup job is registered with a fixed job id, so restarting Chibi no longer leaves duplicate cleanup jobs in the persistent job store.

Fixed

  • REDIS_PASSWORD is now correctly applied to the scheduler's Redis job store connection when the REDIS URL has no embedded password (a password embedded in the URL takes priority when both are set).

Known limitations (scheduler, v1)

  • The scheduler runs in-process: while the machine is asleep, interval jobs do not tick. On wake-up, missed interval/cron runs fire at most once (coalesced) within the grace window; one-time reminders always fire.
  • The stdio process lifetime equals the session lifetime: jobs persist in scheduler_stdio.db, and missed runs fire on the next launch — one-time jobs always fire no matter how late (unlimited grace), while interval/cron catch-up is bounded by SCHEDULER_MISFIRE_GRACE_TIME (default 3600).
  • Scheduled deliveries to Telegram use a dedicated Telegram Bot instance built from the token only; custom TELEGRAM_BASE_URL / TELEGRAM_BASE_FILE_URL (e.g. a local Bot API server) are ignored on that path. Scheduled deliveries to stdio clients require the client to declare the background_messages capability at handshake; frames are dropped and logged otherwise.
  • A payload thread id that does not exist in the current session (stale, minted by a previous session) is skipped (deliver-if-exists-else-skip): the job itself still ran — only the answer delivery is skipped.
  • All stdio sessions share the single negative IDE identity/namespace (IDE_STORAGE_ID): there is no per-client or per-user isolation between different IDE installations on the same machine.
  • There is no per-user limit on the number of scheduled jobs in v1.
  • Cron schedules accept 5-field crontab expressions only (minute hour day-of-month month day-of-week); expressions with a seconds field are rejected.
  • command actions require a configured moderation provider.

[1.17.0] - 2026-09-28

Added

  • Live response streaming to IDE clients: the chibi stdio --tui transport can now stream the model's answer as it is generated instead of delivering it only at the end. IDE clients opt in by declaring capabilities.streaming: true in the initialize handshake (protocol v1 unchanged — additive, no version bump); they then receive delta frames ({"type": "delta", "request_id", "thread_id", "text"}) carrying partial answer text, followed by the authoritative final result frame as before, so existing renderers can simply overwrite the partial text. Deltas are coalesced by the transport (flushed at most every ~200 ms or 512 chars) to keep frame rates sane; deltas strictly precede the terminal frame on the wire; cancelling a request or hitting an error drops any buffered deltas — a delta frame never follows a terminal one. Deltas are in-memory only: they are never persisted to thread history. Clients that do not declare the capability see no protocol change at all (VS Code extension and other v1 consumers are unaffected; thinking/reasoning tokens are never streamed as body text).
  • New LLM provider: Entrim (https://api.entrim.ai/v1) — an OpenAI-compatible endpoint serving DeepSeek, GLM and other open models, with defaults deepseek-ai/DeepSeek-V4.1-Flash for chat and zai-org/GLM-5.3-Flash for vision and moderation; activated by setting the ENTRIM_API_KEY environment variable.

[1.16.2] - 2026-09-24

Fixed

  • Gemini async traffic now always runs on Chibi's MITM-aware httpx client instead of a bare aiohttp session: all google.genai.Client constructions in the Gemini provider receive client-level HttpOptions(httpx_async_client=...) (the only level at which the google-genai SDK selects the transport), and the inert config-level http_options were removed from GenerateContentConfig/GenerateImagesConfig. On TLS-inspecting corporate proxies this eliminates raw aiohttp.client_exceptions.ServerDisconnectedError tracebacks on generateContent (aiohttp is always importable in Chibi installs — it arrives as a hard dependency via both dashscope and chromadb → kubernetes). The Gemini chat retry policy additionally covers aiohttp.ServerDisconnectedError as a safety net.

[1.16.1] - 2026-09-22

Fixed

  • Unified MITM-aware retry policy across all provider families: get_chat_response on anthropic, gemini and mistral now retries connection failures with exponential backoff (wait_exponential, 4 attempts, ~30/60/120s waits), matching the openai family; the openai family's fixed 10/25/45s waits were replaced with the same exponential schedule. Long single-shot requests killed by TLS-inspecting corporate proxies (WinError 64 / connection reset) are retried automatically instead of failing on the first attempt.
  • Rate limits (429) and transient server errors (5xx) are now retried on all provider families: anthropic retries RateLimitError/InternalServerError, gemini retries ServerError (5xx) via the decorator (its internal 429 loop with Retry-Info delays is unchanged), mistral retries SDKError with status 429/>=500. After retries are exhausted the user gets a clear "connection interrupted" message instead of a generic error.

Fixed

  • Built-in skills now ship inside the Python package (chibi/skills/) and are available out of the box after pip install (previously missing from wheels).

Changed

  • load_builtin_skill tool renamed to load_skill; skills_dir setting is now for custom user skills only (same-name user skill overrides the built-in).

1.15.0 - 2026-09-17

Added

  • LLM reasoning in IDE result frames: result frames now carry an optional thoughts string with the model's reasoning whenever the provider surfaced it and the client declared capabilities.thoughts: true in the initialize handshake; reasoning is capped at 256 KB, keeping the tail closest to the answer and prepending a \n[... LLM reasoning truncated: 256 KB limit reached ...] marker at the head, is delivered on the final result frame only (never on background message frames), and is never persisted to thread history: clients that do not declare the capability, and providers that expose no reasoning (Gemini, Anthropic, MiniMax), see no change at all.
  • Token usage in IDE result frames: result frames now carry an optional usage object with input_tokens, output_tokens and context_window whenever the provider reported usage for the request that produced the answer. Numbers are the real provider-reported counts, not estimates; for Anthropic-compatible APIs cached input tokens are added to the input count, and context_window comes from a curated per-model map capped at MAX_HISTORY_TOKENS (the effective summarization ceiling; null when the model is unknown). That map was rebuilt from verified September 2026 provider sources and now covers every model family of all supported providers, legacy lines and the Alibaba Qwen roster included. Clients that never send usage-related data are unaffected: when no usage is available the field is omitted entirely, so v1 clients see no change.
  • Subagent lifecycle events (IDE stdio): clients that declare capabilities.subagents: true in the initialize handshake now receive {"type": "agent_event", "request_id", "event": "started" | "finished", "active", "total", "name"?} frames while a request runs: active counts the subagents currently running for that request, total counts the ones spawned so far, and name carries only the delegated model name (never prompt content). A started event is emitted only once the delegation attempt has been accepted, so failed attempts produce no traffic; finished is guaranteed on every exit path (timeout, exception, cancellation) via cleanup. The last natural finished carries active: 0, which is the signal to hide the client's spinner line; the result frame stays the implicit end of a request, and no agent_event frame ever arrives after it. On a successful /stop or /reset that kills background work with counters still in flight, exactly one kill-flush finished event with active: 0 and no name is emitted as the authoritative reset. Emission is fire-and-forget on the same serialized stdout pathway as background messages, and failures are logged and dropped. Clients without the opt-in are unaffected; no protocol_version bump.
  • New LLM providers: Novita AI, Xiaomi (MiMo models), DeepInfra, Together AI, Nebius (Token Factory), Fireworks AI, Baseten, SambaNova, SiliconFlow, Parasail, Featherless, Lyceum (https://api.lyceum.technology/openai/v1) and GreenPT (https://api.greenpt.ai/v1) — all OpenAI-compatible endpoints, each activated by setting its *_API_KEY environment variable.
  • Music generation expansion: music is no longer Suno-only — new ElevenLabs Music generation via the generate_music_via_elevenlabs tool.
  • cwd statusline updates (IDE stdio): clients that declare capabilities.cwd_updates: true in the initialize handshake receive an additive {"type": "cwd_update", "thread_id", "cwd"} frame whenever the agent changes the thread's working directory via the set_working_dir tool; emission is fire-and-forget and clients without the capability see no wire traffic.
  • /stop over IDE stdio: the /stop prompt is routed through the same command dispatch as /reset, so IDE clients can stop a running request with the exact Telegram runner semantics (task cancellation, subagent counter kill-flush, feedback text); the ready frame's advertised command list includes the new entry.
  • Continuation thoughts on background message frames: when a background tool task's continuation turn produces new LLM reasoning, the delta beyond the reasoning already reported on the result frame is now attached to the background message frame instead of being lost.
  • Thread-scoped agent notes: new update_notes tool lets the agent keep working notes (current project state, conventions, decisions, progress) for the current thread; notes are stored per thread on the user record with full-replace semantics, and an empty string clears them.
  • Unified backend+TUI Docker image: CI now builds and publishes a full pysergio/chibi image bundling the backend and the terminal UI (new full.Dockerfile), with a local build:lfull Taskfile task.
  • Provider contract test suite (internal): 278 parametrized invariant tests covering the class-attribute contracts of every registered provider (no instantiation, no network).

Changed

  • Stdio client CLI: the stdio JSONL session is now launched with chibi stdio --tui; the old chibi ide --stdio invocation is removed without an alias. ApplicationSettings gained a client selector with the values telegram, tui, vscode, pycharm and neovim (default telegram) that each launch path sets for itself: --tui marks a stdio session as serving the terminal UI, and the Telegram runner marks its process as telegram. The handshake (protocol_version 1 + capabilities) and every protocol frame are unchanged. The chibi stdio command also accepts per-client launch flags — --vscode, --pycharm and --neovim alongside --tui (exactly one required) — and the selected client identity is propagated into the system prompt.
  • Backend log format: backend log lines are now plain datetime | LEVEL | message, dropping the colored loguru markup.

Fixed

  • Unmatched slash prompts are now treated as plain user prompts in IDE stdio and terminal sessions instead of failing with "Unknown command" errors.
  • SunoAPI compatibility restored: track schemas now tolerate upstream gateway response changes (empty-string URLs, createTime delivered as a datetime string).
  • Provider base_resp error details are now propagated in ServiceResponseError instead of being swallowed.
  • Tool calls always receive the originating session identity (caller_storage_id/caller_thread_id are now required), fixing terminal-tool access for sessions where the caller context was previously missing.
  • Subagent counters are retained while background subagents outlive the request, so clients keep accurate active/total counts after the result frame.

1.14.1 - 2026-09-02

Added

  • Background message delivery (IDE stdio): background tool completions (e.g. delegation results) are no longer silently lost when the original request has already finished. Clients that declare capabilities.background_messages: true in the initialize handshake receive out-of-band {type: "message", thread_id, content, model?, provider?} frames routed by thread; model/provider are set when the producing response carries them. Emission failures are logged and the frame is dropped. Clients that do not declare the capability are unaffected; no protocol_version bump.

1.14.0 - 2026-08-31

Added

  • Thread cloning with context: support for IDE stdio protocol.
  • IDE stdio sessions (chibi ide --stdio) now redirect loguru output to stderr via an explicit use_stderr_logging() switch called from the runner entry, so stdout strictly carries JSONL protocol frames (log lines previously could corrupt the line-by-line JSON protocol). Terminal and Telegram modes are unchanged.

Fixed

  • clone_thread_messages no longer wipes the cloned history on LocalStorage (caused by a stale user save); cloned threads now persist correctly.

1.13.1 - 2026-08-27

Added

  • Rich Text rendering: Markdown tables in bot replies are automatically rendered as native Telegram rich-message tables (with graceful fallback to ASCII tables if the API call fails), and LLM reasoning streams are displayed as collapsible "thinking" blocks instead of plain-text emoji headers.
  • Reactive context recovery: New REACTIVE_CONTEXT_RECOVERY setting (default true) — when a provider rejects a request with a typed context_length_exceeded error, Chibi summarizes the conversation and retries the turn exactly once. Disable it to keep the previous log-and-apologize behavior.
  • New LLM providers: Melious (MELIOUS_API_KEY) and CheaperInference (CHEAPERINFERENCE_API_KEY).

Changed

  • System prompt now reports the real provider-reported prompt token count (from UsageCacheStore) instead of the heuristic (len(content)+len(role))//4 estimate, which under-reported by ~4.8x.
  • approximate_context_size is now expressed as "N tokens (P% of M limit)" where the percentage is of max_history_tokens, or "n/a" when no provider data is available yet (e.g. first turn after restart).
  • Context-overflow warning threshold is now configurable via CONTEXT_SIZE_WARNING_THRESHOLD (default 50, range 0–100) instead of a hardcoded 70%. The warning is suppressed when the real context size is unknown (n/a).
  • Auto-summarization trigger (check_history_and_summarize) now compares the real provider-reported prompt size from UsageCacheStore (same (user_id, thread_id) key as the write/read sides) instead of the history-only estimate_tokens heuristic. On cold start (store empty for the key) it falls back to sum(estimate_tokens) so summarization still functions.
  • IDE stdio sessions (chibi ide --stdio) now enable filesystem-access tools and stdio MCP servers by default (FILESYSTEM_ACCESS, ENABLE_MCP_STDIO). Explicit settings/environment overrides still take precedence; Telegram sessions are unaffected.
  • Background tool completions are acknowledged silently by the assistant via an internal marker instead of generating extra chat messages.
  • CHIBI_ENV=dev runs skip loading ~/chibi-bot/settings, isolating development runs from production configuration.
  • ZhipuAI available-models list expanded (glm-4.7-flash, glm-4.7-flashx, glm-4-32b-0414-128k).

Fixed

  • MAX_HISTORY_TOKENS default re-based from 64000 to 100000 to prevent aggressive false-positive summarization now that the trigger measures the truthful (entire-request) prompt size (~4.8x larger than the old history-only estimate). Existing deployments that set MAX_HISTORY_TOKENS explicitly should re-tune it upward by ~5x (see README migration note).
  • Conversation memory no longer accumulates tool responses and non-JSON user entries — Chroma archival skips them.
  • Windows hardening: terminal tool output decoding uses an OEM/locale-aware fallback; UTF-8 stream reconfiguration for python -m chibi.

1.13.1b1 - 2026-07-20

Fixed

  • chibi ide --stdio now reads user settings from ~/chibi-bot/settings (respects chibi config)

1.13.1-beta - 2026-07-20

Added

  • EditorContextProvider protocol for safe IDE editor-context access
  • IDE editor_context injection into LLM prompt (code-aware chat)
  • Structured cause field on request_failed errors
  • _FRONTEND_CODE_MAP for aligned error code taxonomy
  • emit_rate_limited() helper for frontend-compatible rate-limit frames
  • Configurable chibi.shutdownTimeoutMs (default 6000ms)

Changed

  • Selection schema pinned to flat {start_line, end_line, text} shape
  • /quit and /exit now emit deterministic terminal result frame
  • Generic exception handler now includes cause=type(exc).__name__
  • Client identity (client.name, client.version) persisted and logged

Fixed

  • Non-JSON user messages no longer crash Chroma archival

[1.13.0] - 2026-07-16

Added

  • IDE JSONL transport: Added chibi ide --stdio for compatible local IDE clients using protocol v1.

1.12.0 - 2026-06-19

Added

  • Semantic Memory: Implemented ChromaDB-backed long-term conversation memory
    • Messages are automatically archived to vector storage when saved
    • New search_in_conversation_history tool for semantic search through past conversations
    • Configurable retention period (default 90 days)
    • Supports both embedded and external ChromaDB deployments
  • Background job for automatic retention cleanup

Changed

  • Group Chat Behavior: bot now ignores file uploads in groups unless user explicitly uses /ask or is in private chat; thread ID handling fixed for non-forum supergroups; dynamic command list based on bot capabilities
  • TTS: All providers now use tts_voice and tts_model from settings with provider defaults as fallback; new tts_voice configuration option per provider
  • Provider Model Updates:
    • Anthropic: claude-sonnet-4-5-20250929 → claude-sonnet-4-6
    • DeepSeek: deepseek-chat → deepseek-v4-pro; moderation → deepseek-v4-flash
    • Grok: new image model grok-imagine-image-quality; reasoning → grok-4.20-0309-reasoning
    • MoonshotAI: kimi-latest → kimi-k2.6
    • OpenAI: default image → gpt-image-2; STT → gpt-4o-transcribe; vision/OCR → gpt-5-mini
  • Suno Music Tool: Added V5_5 model, default changed from V5 to V5_5
  • CI/CD: build.yml and nightly.yml workflow improvements; new local build tasks in Taskfile.yml

Fixed

  • send_llm_thoughts now skips sending when thoughts content is "No content"
  • Thread ID captured before model selection to avoid stale references

1.11.0 - 2026-06-10

Fixed

  • The /reset and /stop commands now terminate not all user-related processes, but only those launched from the same thread where the command is applied.
  • A bug where changing the model in a group chat would change it not for the group chat, but for the user's private chat.

1.10.0 - 2026-06-07

Added

  • Custom agent role/persona (LLM_ROLE): operator-assignable free-form persona that shapes the assistant's tone, focus, and scope while remaining subordinate to safety, honesty, privacy, and hard-rule invariants.
  • AGENTS.md / CLAUDE.md convention: the assistant now looks for and reads project guidance files before working with code (applies to both the main agent and sub-agents).
  • Group chat shared context: in group chats, the bot maintains a single shared conversation context common to all channel members, rather than per-user isolation.

Changed

  • Sub-agent prompt: filesystem & operations rules are now included only when filesystem access is enabled, reducing prompt size otherwise.

Fixed

  • Command moderation: added a plain-text JSON verdict fallback for models that don't honor forced tool calls (e.g. MiniMax M2.7/M3 on the Anthropic-compatible API), and fixed a crash when no tool call was returned.

1.9.0 - 2026-06-02

Added

  • Models Blacklist: New MODELS_BLACKLIST / models_blacklist configuration to exclude specific models from the available selection
    • When both whitelist and blacklist are set, whitelist takes priority (blacklist is ignored)
    • Startup warning logged when both lists are configured
    • Runtime filtering of models based on blacklist (when whitelist is empty)
  • Telegram topic commands for managing threads in private chats:
    • /new_thread [name] — create a new topic with clean LLM context (auto-names "Thread N")
    • /new_thread_with_current_context [name] — create a new topic and clone the current context (messages, model preferences)
    • /drop_thread confirm — delete current thread (requires confirmation; refuses thread 0 or single-thread state)
  • AI rename tool: RenameThreadTool — assistant can rename the current topic
  • Feature gate: commands appear only when topics enabled via @Botfather (has_topics_enabled)

Changed

  • OpenAI Provider: Migrated from Chat Completions API to Responses API as the primary interface
  • OpenAI Provider: Added GPT-5 image generation support via Responses API

1.8.1 - 2026-05-28

Added

  • OpenRouter provider: new provider (OpenRouter) with support for chat and moderation endpoints.

Changed

  • Model selection UX: when more than 12 models are available, selection becomes two-level — first pick a provider, then a model from that provider. Model lists now support pagination.
  • Gemini provider: expanded model name exclusion keywords (robotics, computer, audio, stt), updated default TTS model to gemini-3.1-flash-tts-preview, fixed TTS sample rate from 44100 to 24000.
  • MistralAI provider: expanded model name exclusion keywords (transcribe, tts, voxtral), added exclusion filter in get_available_models.

Fixed

  • Active model matching now also checks provider.name, preventing ambiguous matches when models with identical names exist across different providers.

1.8.0 - 2026-05-04

Added

  • Threads: Telegram message threads support — thread_id is now tracked and handled across all components
  • Interface: Added thread_id property to UserInterface base class;
    thread-aware message sending (typing, photo upload, voice recording actions)
  • Storage: All backends (DynamoDB, Redis, Local) now support thread-scoped message storage and retrieval
    via thread_id parameter

1.7.2 - 2026-03-10

Fixed

  • Docker Image Tagging: Fixed GitHub Actions workflow where agent Docker image was incorrectly overwriting
    the latest tag. The latest tag is now correctly assigned only to the regular image, while agent image receives only agent-* prefixed tags.

1.7.1 - 2026-03-10

Added

  • PDF OCR support for extracting text from PDF files via LLM providers

1.7.0 - 2026-03-09

Added

  • Basic support for handling user-uploaded files (photos, documents) via Telegram
  • File storage abstraction layer (FileStorage, LocalFileStorage, TelegramFileStorage)
  • File metadata persistence in Redis
  • Initial vision support across multiple providers (Anthropic, OpenAI, Gemini, Mistral)
  • New vision tool for image analysis
  • OCR capabilities for uploaded images
  • Automatic image description generation
  • Task manager refactoring to support user-specific task execution
  • Added user_id parameter to task execution
  • Prepared infrastructure for future scheduling capabilities
  • macos_desktop_developer_skill.md — macOS Desktop App Developer role
  • product_manager_skill.md — Product Manager role
  • skill_maker_skill.md — Skill creation and management
  • pm_workflow_skill.md — Artifact-driven PM workflow protocol
  • executor_workflow_skill.md — Executor workflow protocol
  • reviewer_workflow_skill.md — Reviewer workflow protocol
  • /stop command to stop LLM and running processes
  • handlers for file uploads (photo, document)

Changed

  • Renamed /gpt_models → /llm_models for better model-agnostic naming
  • Updated bot command descriptions
  • Command /gpt_models renamed to /llm_models

1.6.6 - 2026-02-21

Added

  • Gemini TTS: New text-to-speech capability using Gemini API, outputs PCM 16-bit 44.1kHz mono WAV.
  • Gemini STT: New speech-to-text capability for transcribing voice messages.

1.6.5 - 2026-02-17

Changed

  • Nightly Release Workflow: Refactored GitHub Actions workflow to use scheduled builds (cron) instead of push-based triggers, with manual dispatch option and concurrency control to prevent duplicate runs.
  • Workflow Optimization: Conditional execution of setup steps only when builds are needed, improving CI efficiency.

Fixed

  • File Editor: Fixed FindAndReplaceSectionTool bug where single-line sections with trailing newlines were incorrectly detected as multi-line, causing unwanted newline injection.

Added

  • Tests: Added regression tests for single-line and multi-line section replacement in FindAndReplaceSectionTool.

1.6.4 - 2026-02-17

Added

  • Delegate Task Timeout Setting: New DELEGATE_TASK_TIMEOUT configuration option allowing to set a custom timeout (in seconds) for delegated sub-agent tasks. Defaults to None (no timeout).

Fixed

  • OpenAI Provider: Removed stray debug print() statement from model display name formatting.

1.6.3 - 2026-02-15

Changed

  • ZhipuAI Provider: Renamed env variable containing API Key.
  • Config Generator: Added ZHIPUAI_API_KEY variable with short description.

1.6.2 - 2026-02-15

Added

  • ZhipuAI Provider: Added support for ZhipuAI (GLM models) as a new LLM provider.
  • MiniMax Image Generation: Enabled image generation capabilities for the MiniMax provider.
  • Loop Detection: Implemented LoopDetectedException to prevent infinite loops in tool calls.

Changed

  • Documentation: Updated README with new providers and API key links.

1.6.1 - 2026-02-11

Added

  • Pre-start security checks to prevent dangerous bot configurations that could lead to serious security issues.

1.6.0 - 2026-02-10

Added

  • CLI Interface & Pip Installation: New chibi command for easy bot management (start, stop, restart, config, logs)
  • MiniMax Provider: Added chat completion support via Anthropic-compatible API
  • Chinese Localization: Complete README translations for Simplified (zh-CN) and Traditional (zh-TW) Chinese

Changed

  • Command Moderation System: Upgraded feature allowing terminal commands to be validated by LLM providers before execution
  • Dependencies Updated: anthropic 0.75.0 → 0.79.0, google-genai 1.53.0 → 1.62.0, mcp 1.23.1 → 1.26.0, redis 5.2.1 → 7.1.0, and more
  • Thinking Models: Improved reasoning_content preservation for DeepSeek-Reasoner and Moonshot KIMI models
  • MoonshotAI: Default temperature changed from 0.3 to 1.0 for better reasoning
  • Provider Defaults: Gemini → gemini-2.5-pro, Grok → grok-4-1-fast-reasoning, OpenAI → gpt-5.2

Fixed

  • Anthropic Messages: Fixed loading messages with tools usage when switching providers
  • Telegram Reaction: Bot now sets OK reaction to user message when bot doesn't answer immediately

1.5.2 - 2026-01-18

Added

  • Telegram message reaction: Bot now will set OK reaction to user message bot doesn't answer immediately.

Changed

  • Base Prompt updated: Multi-task aggregation protocol described.

Changed

  • Base Prompt updated: Multi-task aggregation protocol described.

1.5.1 - 2026-01-17

Added

  • Background Tasks: Long-running tools (Image/Music generation, Delegation) now execute in the background, freeing up the chat interface.
  • Global Tool Parameter: Added a global run_in_background parameter to all compatible tools, allowing the LLM to choose execution mode.
  • Silent ACK: Implemented a protocol for the LLM to silently acknowledge tool completion without notifying the user.
  • System Prompt: Updated system prompt with instructions for the "ACK" rule and async tool handling.
  • STT/TTS Configuration: New settings in GPTSettings for explicit STT/TTS provider selection (stt_provider, tts_provider).
  • Provider Helpers: Added first_stt_ready and first_tts_ready helpers to RegisteredProviders for automatic provider selection.

Changed

  • Tool Execution: GenerateImageTool, GenerateMusicViaSunoTool, TextToSpeechTool, and DelegateTool default to background execution.
  • Provider Logic: Refactored how STT and TTS providers are selected; added fallback to the first available provider if not explicitly configured.
  • Provider Interface: Standardized transcribe and speech methods in the Provider base class.
  • Anthropic: Enabled ephemeral caching for prompts to optimize costs/performance.
  • Internal: Renamed core message handling functions (handle_user_prompt, get_llm_chat_completion_answer) for clarity.
  • Internal: GenerateAdvancedMusicViaSunoTool migrated to the new global background execution mechanism.

1.5.0 - 2026-01-06

Added

  • Suno AI Integration:
    • Support for high-quality music generation via Suno AI.
    • New tools: generate_music_via_suno and generate_music_via_suno_custom_mode.
    • Asynchronous polling for generation results with robust retry logic.
  • Enhanced Media Tools:
    • New tools for direct media interaction: send_audio, send_image, send_video, and send_media_group.
  • AI Skills System:
    • Added specialized prompting guides (Skills) for Imagen, Jina Reader, Nano Banana, Suno, and Wan models to improve output quality and consistency.
  • Custom Telegram API Support:
    • Added TELEGRAM_BASE_URL and TELEGRAM_BASE_FILE_URL settings for compatibility with local Telegram Bot API servers.
  • Agent Environment:
    • Added WORKING_DIR setting to define the default path for agent operations.

Changed

  • Architecture: Refactored BackgroundTaskManager to use a Singleton pattern for better task lifecycle management.
  • MCP Improvements: Increased call_tool timeout to 600s and improved error reporting for SSE connections.
  • Dependencies: Added tenacity for resilient API polling and updated mistralai and mcp versions.
  • Logging: Standardized tool call logging to include the specific model name requesting the action.

Fixed

  • Improved cleanup and error handling in background tasks to prevent "zombie" tasks on failure.

1.4.1 - 2025-12-27

Added

  • Model Context Protocol (MCP) integration:
    • Support for Stdio transport (local tools like SQLite, Filesystem).
    • Support for SSE transport (remote tools).
    • Lifecycle management for MCP servers (connect/disconnect/list tools).
    • New settings ENABLE_MCP_SSE (default True) and ENABLE_MCP_STDIO (default False).

Changed

  • Improved BackgroundTaskManager to return asyncio.Task objects for better control.
  • Added an option to set the size of the image generated by Imagen.
  • Implemented retry for Gemini with proper handling of the 429 response.

1.4.0 - 2025-12-09

Added

  • InfluxDB Integration: Added integration with InfluxDB for storing and visualizing metrics (token usage, cost, latency, etc.). Metrics can now be pushed to InfluxDB for monitoring via Grafana or other tools.
  • Mistral Native Client: Reimplemented the Mistral AI client using the native mistralai library (v1.0.0+) for better stability and feature support, replacing the generic requests-based implementation.
  • Metrics Service: Introduced a dedicated MetricsService (chibi/services/metrics.py) to handle data collection and reporting to InfluxDB.
  • Dobby Installation Scripts: Added a comprehensive suite of scripts (scripts/) for installing, configuring, and controlling the "Dobby" local agent mode, including install.sh, dobby-control.sh, and documentation.

Changed

  • Task Manager Refactoring: Refactored TaskManager to better handle recursive delegation and metrics tracking.
  • Provider Interface Updates: Updated the base Provider class and implementations (Anthropic, Gemini, DeepSeek) to support the new metrics collection system.
  • Dependency Updates: Updated poetry.lock and requirements files to include influxdb-client and updated mistralai SDK.

Changed

  • image generation functionality for Gemini models reimplemented using the official google.genai library
  • upload image to Telegram chat logic updated

1.3.0 - 2025-11-23

Added

  • Enhanced Tooling with Recursive Delegation: Implemented recursive delegation for sub-agents, enabling the bot to tackle complex, multi-step tasks efficiently. This approach drastically reduces token consumption (up to 76% in various tests) by offloading processing to sub-agents.
  • Initial Voice Interaction Support: Introduced preliminary support for voice messages, allowing the bot to receive voice input and respond with generated speech. This feature is an initial implementation and is planned for significant future development.
  • Moderated Terminal Access: Integrated a moderated terminal access tool. All terminal commands are pre-moderated by a specialized LLM using strict rules to ensure safety and prevent unauthorized operations. This is an initial implementation with extensive future enhancements planned. (Refer to chibi/constants.py for moderation prompt details).
  • Google Web Search Integration: Added a dedicated tool for web searching using the official Google Search API for more accurate and comprehensive search results.
  • Enhanced Built-in Toolset: Expanded the bot's capabilities with a new suite of built-in tools, including command execution (cmd.py), general utilities (common.py), robust file editing (file_editor.py), memory management (memory.py), and a structured framework for tool development (tool.py, schemas.py, utils.py, exceptions.py).
    • Note: Access to the filesystem via tools is governed by the FILESYSTEM_ACCESS setting and is strongly discouraged for publicly accessible bots due to potential security implications.
  • DynamoDB Support: Implemented initial support for DynamoDB as a persistent storage backend.

Changed

  • Major Codebase Refactoring: Performed extensive refactoring across the core codebase, models, and provider logic to significantly improve maintainability, scalability, and overall code quality.
  • Rewritten Gemini Provider: The Gemini provider has been completely rewritten to leverage the native genai library, moving away from the previously used OpenAI-compatible interface.
  • Rewritten Anthropic Integration: The integration with Anthropic has been entirely re-engineered to utilize the official Python module. This change enables Claude models to fully access the bot's comprehensive toolset and benefits from native caching mechanisms.
  • Reworked Base Chatbot Prompt: The fundamental system prompt used to initialize the chatbot's personality and guidelines has undergone a significant overhaul for improved performance and clarity.
  • Updated Existing AI Provider Integrations: Updated integrations for Alibaba, Grok, and OpenAI to align with their latest APIs and introduce new features.
  • Revised Tool Initialization and Web Search: The process for initializing tools has been overhauled, and the web search tool (web_search.py) specifically refactored for improved performance and reliability.
  • Project Configuration and Dependencies Refresh: Updated pyproject.toml, Taskfile.yml, and managed dependencies (poetry.lock, requirements-dev.txt, requirements.txt).

Removed

  • Unnecessary Dependencies and Configurations: Cleaned up unneeded dependencies and configurations as part of the overall project restructuring.

Chore

  • GitHub Actions Workflows Refinements: Added new steps to GitHub Actions workflows (.github/workflows/main.yml) and updated the GitHub setup action (.github/actions/setup/action.yml) for optimized CI/CD processes.
  • ARMv7 Dockerfile Experimentation: Included armv7.Dockerfile as part of ongoing experimental efforts to restore ARMv7 platform support. This work is still in progress.
  • Linter and Test Configuration Fixes: Addressed issues within linter configurations and made improvements to test setup for greater accuracy and coverage.
  • New Comprehensive Test Suites: Introduced new test files covering database interactions (test_database.py), file editor functionalities (test_file_editor.py), and model integrity (test_models.py).

1.2.1 - 2025-04-21

Added

  • Optional heartbeat functionality. The bot can now periodically fetch a specified URL (e.g., a healthchecks.io endpoint or a custom monitoring system endpoint) to signal that it is operational.

1.2.0 - 2025-04-20

Added

  • Implemented initial support for LLM function calling (tool use).
  • Added initial tools available for LLM invocation:
    • web_search
    • search_news
    • read_web_page
    • get_current_datetime
  • Integrated Vulture for dead code detection in the development workflow.

Changed

  • Updated core project dependencies to their latest compatible versions.
  • Replaced Flake8, isort, and Black with Ruff for linting and formatting, streamlining the development toolchain.
  • Updated GitHub Actions CI workflow (Quality Gate) to use Ruff and Vulture, and optimized setup steps.

Fixed

  • Addressed issues with Telegram Markdown rendering when LLM responses were split into multiple messages.

1.1.0 - 2025-04-13

Added

  • Integrated support for new LLM providers:
    • MoonshotAI (Kimi)
    • Cloudflare (available in the private mode only: temporary unavailable in the public mode)

Changed

  • Project dependencies updated.

1.0.0 - 2025-04-01

Added

  • Integrated support for new LLM providers:
    • Alibaba (Qwen)
    • Deepseek
    • xAI (Grok)
    • Google (Gemini)
  • Enabled image generation using models from various supported providers, extending beyond the default DALL-E.
  • Implemented the /image_model command, allowing users to select their preferred model for image generation tasks.

Changed

  • Redesigned and improved the user interface and workflow for setting up provider tokens in the public mode.
  • Extensively refactored the core application codebase to significantly simplify the future integration of new LLM providers.
  • Updated project dependencies to their latest compatible versions.
  • Thoroughly rewrote the README.md file to accurately reflect the current features and structure.
  • Updated provided examples to align them with the latest codebase and functionalities.

Fixed

  • Addressed issues related to inconsistent or incorrect Markdown rendering in responses from Language Models, significantly reducing the occurrence of these problems.

0.10.0 - 2025-02-06

Changed

  • Dependencies updated: openai module updated to 1.61.1.

0.9.0 - 2025-02-06

Added

  • OpenAI O1/O3 models support.

Changed

  • Mistral AI models selection updated.
  • Anthropic available models list updated.

0.8.2 - 2024-08-01

Fixed

  • Data validation error after Mistral AI updated their GET /models API signature.

Changed

  • Project dependencies updated.

0.8.1 - 2024-07-11

Added

  • Claude 3.5 Sonnet model support.

0.8.0 - 2024-06-05

Fixed

  • A bug, when after the first image generation, all subsequent messages were treated as image generation prompts.

0.7.0 - 2024-05-24

Added

  • Anthropic provider support.
  • MistralAI provider support.
  • Optional HIDE_MODELS setting to hide models option from the bot menu.
  • Optional HIDE_IMAGINE setting to hide imagine option from the bot menu.

Changed

  • Project structure significantly refactored.
  • README updated: environment variables description significantly improved.

0.6.2 - 2024-02-18

Added

  • Optional MODELS_WHITELIST setting to limit the number of available GPT models.

0.6.1 - 2024-01-12

Added

  • Optional IMAGE_GENERATIONS_LIMIT setting to limit the number of images a user can generate within a month using
    DALL-E (to avoid excessive spending). The default value is 0, which means the feature is turned off, and no limits are
    applied.
  • Optional IMAGE_GENERATIONS_WHITELIST setting for a list of user IDs exempt from image generation limits.

0.6.0 - 2023-11-28

Fixed

  • Fixed an issue preventing the bots' use with local data storage
  • Resolved a problem where the bot would lose asynchronous tasks during long server response times from OpenAI
  • Fixed a bug that sometimes prevented sending images to users

Changed

  • Updated key project dependencies and adapted code for integration with the latest version of the OpenAI library
  • Significantly improved the informativeness of logs
  • Implemented the ability to send large responses across multiple messages
  • Added the option to select the model for generating images (currently only through bot setting using environment variables)
  • Refactored the code
  • Base Docker image updated to python:3.11-alpine
  • REDIS_PASSWORD environment variable is deprecated.

0.5.3 - 2023-06-20

Changed

  • Project dependencies updated.

0.5.2 - 2023-04-15

Fixed

  • A bug when users whitelist couldn't work with the telegram user ID.

0.5.1 - 2023-04-15

Added

  • LOG_PROMPT_DATA setting. If true, the application will log user's prompts and GPT answers. The default value is False.

Changed

  • The log of disallowed user actions now includes the user's ID.

0.5.0 - 2023-04-15

Fixed

  • A bug when the bot didn't answer messages quoting the bot's ones.
  • A bug when the bot checked the user whitelist using the user's username, not the user's name.
  • A bug when setting the application via .env was impossible.

Added

  • Now it's possible to connect to Redis via password (using the REDIS_PASSWORD setting).

Changed

  • Settings refactored.

0.4.0 - 2023-04-10

Added

  • "Public mode" - now the bot can run without a "master" OpenAI API Key, and every user will have to provide their own.

Changed

  • Codebase has been refactored.

0.3.4 - 2023-04-08

Added

  • ANSWER_DIRECT_MESSAGES_ONLY setting: if it True the bot in group chats will respond only to messages, containing its name (see the BOT_NAME setting)

0.3.3 - 2023-04-07

Changed

  • Dependencies updated, redundant modules removed.
  • Now, if the telegram bot raises the markdown parse error and the GPT answer contains some code, such an answer will be additionally provided to the user in the MD file as the attachment.
  • Readme updated.

0.3.2 - 2023-04-04

Fixed

  • An error when user without Telegram username could not interact with the bot.

Changed

  • Now the USERS_WHITELIST setting can also contain telegram user IDs.
  • Logging additionally set up.

0.3.1 - 2023-04-03

Added

  • Setting ALLOW_BOTS with False default value. If ALLOW_BOTS is set to False, it means that other bot requests will be ignored, and only non-bot requests will be processed.

0.3.0 - 2023-04-02

Fixed

  • A bug in local data storage management when the conversation summarizing function didn't clean the summarized history.

Changed

  • Now the /menu option displays all the available GPT-based models.
  • A GPT4_ENABLED setting (default: True) allows administrators to exclude GPT-4 models from the available choices in /menu option. The reason for this is that the GPT-4 token is 15 times more expensive than the GPT-3 one.
  • A GPT4_WHITELIST setting, that allow andinisstrator to specify users for whom the restriction on using the GPT-4 model does not apply.
  • Now, during the entire waiting time for a response, the user sees the bot's activity such as "typing..." or "uploading photo...".
  • Code slightly refactored.
  • README updated.

0.2.1 - 2023-03-31

Added

  • Added the ability to switch between GPT-3 and GPT-4 models.

0.2.0 - 2023-03-30

Added

  • Added the ability to configure many application properties through environment variables.
  • Redis support implemented.
  • Added README and this changelog.
  • Added examples of running the application.

Changed

  • Now each request is processed in a separate thread, greatly speeding up the bot's performance with multiple users simultaneously.
  • Saving session management between application restarts (by using Redis or local storage).
  • Project dependencies updated.
  • Code refactored.

[0.1.0] - 2023-03-05

Added

  • Basic functionality.
  • Session management.
  • Dockerfile.
  • Flake8 and Mypy setups.
  • GitHub Action for linters.