* fix(provider): disable OpenAI SDK built-in retries under AstrBot retry layer (#9663) AsyncOpenAI/AsyncAzureOpenAI inherit the SDK default max_retries=2, which nests underneath AstrBot's tenacity-based retry_provider_request(). As a result provider_settings.request_max_retries no longer reflects the true attempt count (e.g. request_max_retries=1 still sends up to 3 HTTP requests) and delays fallback-provider switchover. Pass max_retries=0 so AstrBot's retry layer is the single source of truth for retries. * test(provider): add retry-count regression test, parameterize client retry tests Address review feedback on #9669: merge the near-identical official/Azure client construction tests into a parametrized test, and add a regression test asserting _query() performs exactly request_max_retries attempts through retry_provider_request() when the call keeps failing, guarding against multiplicative retries being reintroduced. * fix(media): guard oversized image inputs and attachment uploads 为模型图片输入与聊天附件上传增加大小护栏 / Add size guards for model image inputs and chat attachment uploads: - _convert_image_bytes_sync 复用原始编码字节的分支增加 2MB 上限;更大的 输入重编码,输出始终受像素尺寸与质量约束 - prepare_model_image 在读入前检查文件大小,超过 32MB 跳过并记录日志 - 聊天附件上传上限 100MB:路由先检查 Content-Length,服务层落盘后复核 实际大小 - Reuse the original encoded bytes in _convert_image_bytes_sync only for stills up to 2MB; larger inputs are re-encoded so the output stays bounded by pixel size and quality. - prepare_model_image checks the file size before reading and skips inputs above 32MB with a warning log. - Chat attachment uploads are capped at 100MB: the route checks Content-Length first, and save_uploaded_file re-checks the on-disk size after saving. Tests: tests/test_media_utils.py, tests/test_chat_route.py * fix(media): sniff image headers instead of decoding for MIME detection MIME 探测改为读取文件头魔数,不再解码整个图片 / Detect image MIME types by reading header magic bytes instead of decoding the whole file: - detect_image_mime_type 仅读取前 32 字节识别 PNG/JPEG/GIF/WebP/BMP/ TIFF/AVIF,内存占用与文件大小无关 - 聊天附件上传上限从 100MB 放宽到 512MB - detect_image_mime_type reads only the first 32 bytes and recognizes PNG/JPEG/GIF/WebP/BMP/TIFF/AVIF, so memory usage no longer scales with file size - Chat attachment upload limit raised from 100MB to 512MB Tests: tests/test_media_utils.py * test: remove obsolete image assertion and fix upload fixtures * test: mock plugin marketplace requests in dashboard tests --------- Co-authored-by: RuochenPan <badbatch0x01@gmail.com>
简体中文 | 繁體中文 | 日本語 | Français | Español | Русский
Documentation | Blog | Roadmap | Issue Tracker | Email Support
AstrBot is an open-source all-in-one Agent chatbot platform that integrates with mainstream instant messaging apps. It provides reliable and scalable conversational AI infrastructure for individuals, developers, and teams. Whether you're building a personal AI companion, intelligent customer service, automation assistant, or enterprise knowledge base, AstrBot enables you to quickly build production-ready AI applications within your IM platform workflows.
Key Features
- 💯 Free & Open Source.
- ✨ AI LLM Conversations, Multimodal, Agent, MCP, Skills, Knowledge Base, Persona Settings, Auto Context Compression.
- 🤖 Supports integration with Dify, Alibaba Cloud Bailian, Coze, and other agent platforms.
- 🌐 Multi-Platform: QQ, WeChat Work, Feishu, DingTalk, WeChat Official Accounts, Telegram, Slack, and more.
- 📦 Plugin Extensions with 1000+ plugins available for one-click installation.
- 🛡️ Agent Sandbox for isolated, safe execution of code, shell calls, and session-level resource reuse.
- 💻 WebUI Support.
- 🌈 Web ChatUI Support with built-in agent sandbox and web search.
- 🌐 Internationalization (i18n) Support.
Quick Start
One-Click Cloud Deployment (RainYun)
For users who want one-click 24-hour-online deployment and do not want to manage servers themselves, we recommend RainYun's one-click cloud deployment service ☁️:
One-Click Deployment
Note
Requires uv to be installed. For macOS users: due to macOS security checks, the first run of the
astrbotcommand may take longer (about 10-20s).
For users who want to quickly experience AstrBot, are familiar with command-line usage, and can install a uv environment on their own, we recommend the uv one-click deployment method ⚡️:
uv tool install astrbot --python 3.12
astrbot init # Only execute this command for the first time to initialize the environment
astrbot run
Update astrbot:
uv tool upgrade astrbot --python 3.12
Docker Deployment
For users familiar with containers and looking for a more stable, production-ready deployment method, we recommend deploying AstrBot with Docker / Docker Compose.
Please refer to the official documentation: Deploy AstrBot with Docker.
Desktop Application Deployment
For users who want to use AstrBot on desktop and mainly use ChatUI, we recommend AstrBot App.
Visit AstrBot-desktop to download and install; this method is designed for desktop usage and is not recommended for server scenarios.
Launcher Deployment
For desktop users who also want fast deployment and isolated multi-instance usage, we recommend AstrBot Launcher.
Visit AstrBot Launcher to download and install.
More deployment methods
If you need panel-based management or deeper customization, see BT-Panel Deployment for BT Panel app-store setup, 1Panel Deployment for 1Panel app-market deployment, CasaOS Deployment for NAS/home-server visual deployment, and Manual Deployment for fully custom source-based installation with uv.
❤️ Sponsors
Welcome to sponsor us via Afdian or contact us.
Supported Messaging Platforms
Connect AstrBot to your favorite chat platform.
| Platform | Maintainer |
|---|---|
| Official | |
| OneBot v11 protocol implementation | Official |
| Telegram | Official |
| Wecom & Wecom AI Bot | Official |
| WeChat Official Accounts | Official |
| Feishu (Lark) | Official |
| DingTalk | Official |
| Slack | Official |
| Discord | Official |
| LINE | Official |
| Satori | Official |
| KOOK | Official |
| Misskey | Official |
| Mattermost | Official |
| WhatsApp (Coming Soon) | Official |
| Matrix | Community |
| Rocket.Chat | Community |
| VoceChat | Community |
Supported Model Services
| Service | Type |
|---|---|
| OpenAI and Compatible Services | LLM Services |
| Anthropic | LLM Services |
| Google Gemini | LLM Services |
| Moonshot AI | LLM Services |
| Zhipu AI | LLM Services |
| DeepSeek | LLM Services |
| Ollama (Self-hosted) | LLM Services |
| LM Studio (Self-hosted) | LLM Services |
| MiraRouter | LLM Services (API Gateway, supports all models) |
| AIHubMix | LLM Services (API Gateway, supports all models) |
| CompShare | LLM Services |
| 302.AI | LLM Services |
| TokenPony | LLM Services |
| SiliconFlow | LLM Services |
| PPIO Cloud | LLM Services |
| ModelScope | LLM Services |
| OneAPI | LLM Services |
| Dify | LLMOps Platforms |
| Alibaba Cloud Bailian Applications | LLMOps Platforms |
| Coze | LLMOps Platforms |
| OpenAI Whisper | Speech-to-Text Services |
| SenseVoice | Speech-to-Text Services |
| Xiaomi MiMo Omni | Speech-to-Text Services |
| OpenAI TTS | Text-to-Speech Services |
| Gemini TTS | Text-to-Speech Services |
| GPT-Sovits-Inference | Text-to-Speech Services |
| GPT-Sovits | Text-to-Speech Services |
| FishAudio | Text-to-Speech Services |
| Edge TTS | Text-to-Speech Services |
| Alibaba Cloud Bailian TTS | Text-to-Speech Services |
| Azure TTS | Text-to-Speech Services |
| Minimax TTS | Text-to-Speech Services |
| Xiaomi MiMo TTS | Text-to-Speech Services |
| Volcano Engine TTS | Text-to-Speech Services |
❤️ Contributing
Issues and Pull Requests are always welcome! Feel free to submit your changes to this project :)
How to Contribute
You can contribute by reviewing issues or helping with pull request reviews. Any issues or PRs are welcome to encourage community participation. Of course, these are just suggestions—you can contribute in any way you like. For adding new features, please discuss through an Issue first.
Development Environment
AstrBot uses ruff for code formatting and linting.
git clone https://github.com/AstrBotDevs/AstrBot
pip install pre-commit
pre-commit install
🌍 Community
QQ Groups
We have 15+ chat groups, please see: Community for details.
Discord Server
❤️ Special Thanks
Special thanks to all Contributors and plugin developers for their contributions to AstrBot ❤️
Open Source Friends ❤️
- NapNeko/NapCatQQ - The amazing cat framework
- Mai-with-u/MaiBot - The powerful "digital life" in your QQ!
⭐ Star History
Tip
If this project has helped you in your life or work, or if you're interested in its future development, please give the project a Star. It's the driving force behind maintaining this open-source project <3
