=== AI Engine - The Chatbot, AI Framework & MCP for WordPress ===
Contributors: TigrouMeow
Tags: ai, chatbot, gpt, claude, openai
Donate link: https://www.patreon.com/meowapps
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 3.5.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI meets WordPress. Your site can now chat, write poetry, solve problems, and maybe make you coffee.

== Description ==

**AI Engine connects WordPress with AI models.** One install, stable connectors for every major AI provider: OpenAI, Anthropic, Google, Mistral, and more. Build intelligent chatbots, generate content, create AI forms, and automate tasks. All from your WordPress dashboard.

Please make sure you read the [disclaimer](https://meowapps.com/ai-engine/disclaimer/). For more information, check the official website of [AI Engine](https://meowapps.com/ai-engine/).

== Quick Intro ==

Hello! ☀️ I built AI Engine to bring OpenAI, Anthropic, and other AI models into WordPress. Create chatbots that understand your content, generate posts in your voice, translate instantly, create images, or build custom AI tools.

For developers: [internal APIs](https://ai.thehiddendocs.com/php-functions/), [REST endpoints](https://ai.thehiddendocs.com/public-rest-api/), [function calling](https://ai.thehiddendocs.com/function-calling/), and [MCP support](https://ai.thehiddendocs.com/mcp/). Build AI features, automate workflows, or create SaaS applications on WordPress.

Feeling overwhelmed? 🤪 Start simple: Create a chatbot. Then connect [Claude Code](https://ai.thehiddendocs.com/mcp/mcp-server-claude-code/), [Claude](https://ai.thehiddendocs.com/mcp/mcp-server-claude/), [ChatGPT](https://ai.thehiddendocs.com/mcp/mcp-server-chatgpt/), or [OpenClaw](https://meowapps.com/openclaw-wordpress-mcp/) through MCP, giving AI direct access to your site. Desktop clients can connect via OAuth: users just paste the MCP URL, sign in to WordPress, and approve. No shared token to manage. Add [SEO Engine](https://wordpress.org/plugins/seo-engine/) and watch it manage SEO in ways you never imagined. You can even connect AI Engine to multiple WordPress sites and manage them all through conversation.

You'll be having a blast before you've explored everything. You'll probably spot bits of AI Engine in plenty of other AI plugins, code and UI alike. Flattering, really... or fishy? 🤣 But only AI Engine keeps pushing forward with real care for its community, a drive toward perfection, and the patience to get the details right.

== Core Modules ==

🤖 **Chatbots**
Create intelligent chatbots with customizable themes, realtime audio, and multi-file support. Features modular UI Builder, conversation memory, and MacOS-style components.

🎨 **Content & Media**
Generate content, translate text, create images and videos from prompts, and use Copilot in the WordPress editor to correct, enhance, translate, or rewrite text.

📝 **AI Forms**
Build custom AI-powered forms that handle text, images, audio, or file uploads. Create advanced apps with conditional logic.

🧠 **Knowledge & Embeddings**
Create embeddings and build knowledge bases from PDFs. Connect with Pinecone, Chroma, Qdrant, or OpenAI Vector Store for semantic search.

🔧 **Function Calling**
Connect AI to WordPress functions, WooCommerce, appointments, or custom APIs. Let AI interact with your site's data and services in real-time.

🛡️ **Security & Moderation**
IP banning, word filtering, and content moderation to keep your AI interactions safe.

💡 **Advisor**
AI-powered recommendations and insights to help you set up and optimize your WordPress site.

🔌 **Developer Tools**
Internal APIs, REST endpoints, MCP support, and extensive hooks. Build AI-driven features, automate workflows, or create SaaS applications.

== 🤖 Chatbots ==

Transform visitor interactions with intelligent, customizable chatbots.

**Features:**

* Modular UI Builder with containers, headers, footers
* Customizable themes and MacOS-style components
* Realtime audio conversations
* Multi-file upload support
* Discussion memory and history
* Cross-site embedding
* GDPR compliance tools

== 🎨 Content & Media ==

Create, refine, and visualize content with AI assistance.

**Copilot (Magic Wand):**

* Correct grammar and spelling
* Enhance text for readability and quality
* Make text longer or shorter
* Translate text and full posts
* Generate content from scratch
* Multi-block support in the WordPress editor

**Image & Video Tools:**

* Create images from text prompts
* Generate videos with AI (Sora)
* Edit existing images with AI
* Vision AI for image analysis
* Automatic alt text generation

== 📝 AI Forms ==

Build powerful AI-driven forms and applications.

**Capabilities:**

* Text, image, audio, and file inputs
* Conditional logic and validation
* Custom AI-powered apps
* Multi-step workflows
* Result templates

== 🧠 Knowledge & Embeddings ==

Create intelligent knowledge bases and semantic search.

**Vector Databases:**

* Chroma, Qdrant, Pinecone
* OpenAI Vector Store
* Automatic synchronization
* Dimension validation

**Smart Features:**

* PDF import with auto-chunking
* AI-powered search (Simple, Context-Aware, Smart)
* Content classification
* Personalized recommendations

== 🔧 Developer Tools ==

Extend WordPress with AI capabilities.

**APIs:**

* Internal API for plugin integration
* REST API for external applications
* MCP (Model Context Protocol) support
* Function calling framework

**Integration:**

* Works with SEO Engine, Social Engine, Code Engine
* Media File Renamer support
* Custom shortcodes and hooks
* Extensive WordPress filters

**Resources:**

* [Code Examples & Customization](https://ai.thehiddendocs.com/examples/)

== MCP (Model Context Protocol) ==

AI Engine turns your WordPress site into an intelligent MCP server. AI agents like ChatGPT, Claude, Claude Code, and OpenClaw can connect directly, browse content, edit posts, manage media, and handle complex tasks through natural conversation.

**What AI Agents Can Do:**

* Create and edit posts
* Moderate comments
* Install and manage plugins
* Customize themes
* Check SEO and analytics
* Manage media files
* Run SQL queries
* Manage WooCommerce products, orders, inventory, and customers
* Handle Polylang translations

**Setup Guides:**

* [General MCP Overview](https://ai.thehiddendocs.com/mcp/)
* [MCP with ChatGPT](https://ai.thehiddendocs.com/mcp/mcp-server-chatgpt/)
* [MCP with Claude](https://ai.thehiddendocs.com/mcp/mcp-server-claude/)
* [MCP with Claude Code](https://ai.thehiddendocs.com/mcp/mcp-server-claude-code/)

**Plugin Integration:**

Other plugins add their features to the MCP system:

* [SEO Engine](https://wordpress.org/plugins/seo-engine/) - Let AI analyze and optimize your content, fix SEO issues, and manage meta data
* [Social Engine](https://wordpress.org/plugins/social-engine/) - AI can schedule posts, manage social media, and create social content
* [Code Engine](https://wordpress.org/plugins/code-engine/) - Give AI access to code snippets and custom functions

AI Engine can also connect to external MCP servers, extending your chatbots with tools and services beyond WordPress.

== Pro Features ==

* **AI Forms**: Create dynamic forms that generate answers, images, or files using AI.
* **Embeddings & Vector Databases**: Build knowledge bases from your content and PDFs for semantic search.
* **Content-Aware**: Let AI use your post and page content as context for smarter responses.
* **Function Calling**: Connect AI to WordPress functions, WooCommerce, or any custom API.
* **Cross-Site Chatbots**: Embed your chatbots on external websites.
* **Editor Assistant**: An AI sidebar in the post editor that can read, rewrite, insert, and rearrange your content blocks through chained function calls.
* **Realtime Audio**: Voice-based conversations on OpenAI's GA Realtime API, with the latest voice reasoning capabilities.
* **Statistics & Usage Control**: Track usage, set limits per role, and monitor costs.
* **Extra MCP Tools**: Adds plugin, theme, database, Polylang, and WooCommerce management to the MCP server.
* **Priority Support**: Get faster help from the Meow Apps team.

== Why AI Engine? ==

**Native to WordPress**
Built specifically for WordPress with seamless integration. No clunky interfaces, just native WordPress experience.

**Flexible & Powerful**
Built-in connectors for OpenAI, Anthropic, Google, xAI (Grok), Mistral, Perplexity, OpenRouter, Replicate, Azure (OpenAI), plus a Custom (OpenAI-compatible) connector for Ollama, LM Studio, vLLM, llama.cpp, LocalAI, or any self-hosted server. Use the models that work best for you.

**Developer Friendly**
Clean APIs, extensive hooks, and MCP support. Build custom AI features or entire SaaS applications on WordPress.

**Real MCP, for Real WordPress**
You may have heard of MCP Adapter, built by the WordPress team primarily for their WordPress.com hosting service. It's essentially a thin layer on top of the REST API. AI Engine takes a different approach: its MCP tools are specifically crafted for AI agents, with rich context, smart defaults, and practical actions that go far beyond what a generic REST API wrapper can offer. And it works on any WordPress installation, regardless of your hosting provider. AI Engine also exposes its REST API as MCP tools if you want that, but the dedicated tools are where the real power is.

**Privacy First**
IP hashing, GDPR tools, secure file handling, and session-based tracking. You control your data.

**Constantly Evolving**
Weekly updates based on real user feedback. We listen, we improve.

== My Dream for AI ==

I am excited about AI, but I believe we need to use it with intention and clarity. Social media showed us how powerful tools can reshape our lives in ways we never expected, sometimes for the better, sometimes not. I want to avoid repeating those mistakes. AI should help us remove the meaningless, tedious work or enhance the work we enjoy. Modern tools should give us more time for what truly matters: spending beautiful moments with the people we love! 💕

== Installation ==

1. Upload `ai-engine` to `/wp-content/plugins/`
2. Activate through the 'Plugins' menu
3. Get an API key from OpenAI (or your preferred AI provider)
4. Add your API key in Settings (Meow Apps > AI Engine)
5. Start creating! 🚀

== Disclaimer ==

AI Engine is a plugin that helps you to connect your websites to AI services. You need your own API keys and must follow the rules set by the AI service you choose. For OpenAI, check their [Terms of Service](https://openai.com/terms/) and [Privacy Policy](https://openai.com/privacy/). It is also important to check your usage on the [OpenAI website](https://platform.openai.com/usage) for accurate information. Please do so with other services as well.

The developer of AI Engine and related parties are not responsible for any issues or losses caused by using the plugin or AI-generated content. You should talk to a legal expert and follow the laws and regulations of your country. AI Engine does only store data on your own server, and it is your responsibility to keep it safe. AI Engine's full disclaimer is [here](https://meowapps.com/ai-engine/disclaimer/).

== Compatibility ==

Please be aware that there may be conflicts with certain caching or performance plugins, such as SiteGround Optimizer and Ninja Firewall. To prevent any issues, ensure that AI Engine is excluded from these plugins.

== Frequently Asked Questions ==

= Why am I getting "Error 429: You exceeded your current quota"? =

This error comes from OpenAI's API, not AI Engine. Set up billing limits in your [OpenAI account](https://platform.openai.com/account/billing). Caching plugins can sometimes store error responses, so [clear your caches](https://ai.thehiddendocs.com/common-issues/exceeded-current-quota/) too.

= Who is AI Engine for, and how do I manage usage limits? =

AI Engine can be used by site owners, administrators, and visitors via chat widgets. To set query limits and prevent unlimited model runs, follow the [Managing Limits guide](https://ai.thehiddendocs.com/limits/).

= Does the chatbot support my language? =

AI models support many languages, but quality varies. There's no definitive list since models are constantly updated. Test your language in the AI Playground.

= How does MCP work, and what can I do with it? =

MCP (Model Context Protocol) exposes WordPress tools to AI agents. [Learn how to enable the MCP endpoint](https://ai.thehiddendocs.com/mcp/), choose which tools to expose, and secure them. You can manage posts, comments, users, media, and more.

= Can I restrict the chatbot to answer only from my site content? =

You can't completely block the model's built-in knowledge, but you can [use smart prompts and embeddings](https://ai.thehiddendocs.com/restrict-chatbot-topics/) to steer conversations toward your content.

= The chatbot doesn't appear or looks odd on my site =

Check the [Common Issues guide](https://ai.thehiddendocs.com/common-issues/) for solutions to REST API problems, caching conflicts, nonce errors, and layout glitches.

= Where can I learn the basics and troubleshoot problems? =

Start with the [Basics guide](https://ai.thehiddendocs.com/basics/) for installation and key concepts. For specific issues, check [Common Issues](https://ai.thehiddendocs.com/common-issues/).

= How do I report security issues? =

Report security vulnerabilities through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/9e5fbbbc-964a-4204-8bc0-198f21284efd).

== Changelog ==

= 3.5.4 (2026/06/10) =
* Fix: Hold to Talk button on mobile Realtime chatbot no longer triggers the context menu (copy, select) when held.
* Update: Images and files can now be sent without a text message; engines skip the empty text part for providers that reject it.
* Fix: Sending is now blocked while a file is still uploading, with a spinner on the send button and a progress bar on the file preview until upload completes.
* Fix: Eliminated the gap between the chatbot and the keyboard on iOS by locking body scroll while the mobile chatbot is open.
* Fix: Anthropic safety refusals now show a readable message instead of an empty reply.
* Add: Claude Fable 5 model. Marked Claude Sonnet 4, Opus 4, and Opus 4.1 as deprecated.
* Add: Web search support for OpenRouter via the Tools & Capabilities section.
* Add: Full Screen view for Discussions, a Discussions count on the Dashboard, and fixed filenames with underscores being rendered as italics in the admin discussion view.
* Update: AI provider connectors now mentioned in the readme description.
* Update: PDF import now remembers the Density, Overlap, and filename-as-title settings between imports.
* Fix: OpenClaw link in the readme now points to our own article.
* Update: Marked GPT Image 1.5 and GPT Image 1 Mini as deprecated; default image model moved to GPT Image 2.
* Fix: PHP 8.2+ deprecation warning caused by an undeclared `$extraData` property on `Meow_MWAI_Reply`.
* Add: Embeddings sync can now be restricted to specific Polylang languages via a comma-separated languages field.
* Fix: `wp_alter_post` regex mode now handles patterns containing "/" (e.g. Gutenberg block markers) and returns the actual PCRE error instead of a generic one.

= 3.5.3 (2026/05/28) =
* Fix: Filenames with underscores (e.g. `Some_File_2026.pdf`) were getting partially italicized by the chatbot's markdown renderer.
* Fix: ReferenceError (`data is not defined`) in the chatbot response handler that masked the real error message when a host returned a non-JSON body.
* Fix: The Push All button showed "(null)" when a post type had zero matching posts.
* Fix: The `wp_update_option` MCP tool schema no longer logs a "problematic union type" warning on every `list_tools` call.
* Fix: The Meow Apps menu icon now shows correctly in both the expanded and collapsed sidebar states.
* Fix: Hotfix for the MCP endpoint URL being hidden until a bearer token was generated, even though OAuth doesn't need one. It now appears as soon as the MCP Server is enabled.
* Add: Claude Opus 4.8 to the Anthropic model list, with the `latest` tag moved to it.
* Add: AI Forms multi-upload fields now stack new file selections on top of previous ones, with a staged list and per-file remove buttons.
* Add: `mwai-bouncing-loader` and `mwai-bouncing-dot` CSS classes to the chatbot loading dots for custom styling.
* Add: MCP Logs view in Insights with per-tool-call capture, status, duration, and a top tools widget.
* Add: MCP Connection Test in MCP Server settings that detects host-level WAF blocks (e.g. WP Engine's default) before they surface in claude.ai.
* Update: Aligned Forms and Playground markdown rendering with the chatbot so single newlines now produce visible line breaks.
* Update: Extended CORS headers on MCP endpoints with Mcp-Protocol-Version, Mcp-Session-Id, Accept, and Last-Event-ID for browser-context MCP clients.
* Update: Claude Sonnet 4 and Opus 4 (2025/05/14) marked as deprecated ahead of Anthropic's 2026-06-15 retirement date.
* Update: The chatbot Functions empty state now tells Free users that function calling is Pro-only.
* Update: Polished the plugin readme description with cleaner punctuation and brand consistency.

= 3.5.2 (2026/05/22) =
* Add: Setup Assistant on the Dashboard that walks through essential configuration with a progress bar and per-step actions.
* Add: Direct file upload to OpenAI Vector Store via a new Documents tab, with async status polling, Sync from OpenAI action, and clearer PHP upload-limit errors.
* Add: `setField` and `prefill` methods to the AI Forms JS API for setting values programmatically without manual `dispatchEvent` workarounds.
* Update: Redesigned the Dashboard Usage panel into an analytics card with headline, week-over-week delta, daily bar chart, and provider/peak/average/per-query tiles.
* Update: Reorganized the Modules tab into clearer sections with short intros, concise descriptions, renamed Utilities to AI Copilot, and surfaced MCP and Public API as proper modules.
* Update: Renamed the user-facing "Units" metric to "Tokens" across the dashboard, queries explorer, insights, and `[mwai_stats]` shortcode, with full back-compat on REST output and legacy settings.
* Update: Aligned the Discussions, Insights, and Knowledge layouts by standardizing column ratios and removing custom margin and header overrides.
* Update: Added a Refresh button to the Usage panel header, widened the Tokens column in Queries Explorer, and showed "N/A" for queries with no scope.
* Update: MCP tool-registration warnings are now always written to the PHP error log instead of requiring the debug logging flag.
* Fix: Stripped inline citation markers from OpenAI's file_search Responses API text that were surfacing as gibberish in chatbot replies.
* Fix: Stopped embedding the sessionId in chatbot and forms HTML for logged-out visitors, so page caches no longer share one sessionId across all visitors.
* Fix: Guarded REST AI endpoints so they no longer overwrite the cookie-derived session with an empty client-sent sessionId.
* Fix: Gemini embedding queries no longer report bogus token counts by correctly reading promptTokenCount from the response.
* Fix: Dynamic MCP REST tool schemas no longer serialize the meta arg on media/posts/pages as an array, which Claude's MCP validator was rejecting.
* Fix: Translate Post now translates list items inside modern Gutenberg lists, which were silently skipped since WP 6.1+.

= 3.5.1 (2026/05/17) =
* Add: Popup Icon Size option in chatbot settings to resize the popup trigger without custom CSS.
* Fix: Chatbots admin preview now keeps long discussions, fullscreen toggles, and resize actions contained within the preview pane instead of clipping or overflowing the viewport.
* Fix: Chatbot rendering bug where a `$` inside an inline code span caused other message text to leak into the code display.

= 3.5.0 (2026/05/16) =
* Fix: MCP OAuth authorization and token validation now require administrator capability, preventing privilege escalation by non-admin users.
* Update: Marked gpt-5.2-chat-latest and gpt-5.3-chat-latest as deprecated (OpenAI shutting them off August 10, 2026).
* Update: Added a deprecation banner on the Finetunes screen due to OpenAI sunsetting self-serve fine-tuning.
* Fix: CSV import for fine-tuning now shows an explicit error when no usable prompt/completion columns are found.
* Fix: Updated the broken OpenAI tutorial link on the Finetunes screen.

= 3.4.9 (2026/05/12) =
* Add: OAuth 2.1 with Dynamic Client Registration for the MCP server, allowing Claude Desktop and other browser-driven clients to connect without a shared bearer token.
* Add: Per-quality image generation (auto/low/medium/high) for GPT Image models, available in the Image Generator UI and as a global default in Settings → Images.
* Fix: Pulling a remote OpenAI vector store no longer creates entries containing raw JSON error bodies for files uploaded with purpose=assistants.
* Fix: The `mwai_allow_setup` filter now properly grants menu and REST API access to non-admin roles, instead of being overridden by a hardcoded `manage_options` check.
* Fix: Tiktoken vocab cache is now scoped per WordPress install, preventing permission conflicts on multi-tenant hosts.
* Update: Migrated OpenAI Realtime integration from the deprecated Beta endpoint to the GA API, enabling support for gpt-realtime-2 and new voice models.
* Update: Reorganized MCP settings panel with a dedicated section for Bearer Token and Access Level, and a new Connected Apps section to review and revoke OAuth grants.
* Update: Generalized the `manage_options` gate in shared code so each Meow Apps plugin gets its own `{prefix}_allow_setup` filter instead of hardcoding `mwai_allow_setup`.
* Update: Removed gpt-4o-realtime-preview, gpt-4o-mini-realtime-preview, and gpt-realtime-translate from the model list.
* Update: SSE transport for MCP is scheduled for removal in July 2026 and is now hidden from the UI for new users.

= 3.4.8 (2026/05/09) =
* Fix: Resolved OpenAI Responses API "No tool output found" errors during chained recursive tool calls and static-only turns. Static-skip is now disabled for Responses API because every `function_call` must be answered.
* Add: Custom OpenAI-compatible provider for Ollama, LM Studio, vLLM, llama.cpp, LocalAI, and similar servers.
* Add: Built-in xAI/Grok provider with dynamic model fetching and fallback support.
* Add: Insights retention setting with daily cleanup for old log rows. Defaults to Never.
* Add: Embedding chunk metadata: source, partIndex, and partTotal, exposed through `mwai_embeddings_vector_metadata` for Pinecone, Qdrant, Chroma, and OpenAI Vector Store. PDF imports can now use the filename as the chunk title, and Modify Embedding can edit the new fields.
* Add: Code Engine static/dynamic Behavior now applies to Callable function snippets, skipping AI feedback when all calls are static.
* Update: Reworked onboarding with a default OpenAI environment, Knowledge provider chooser, one-click OpenAI vector store creation, no-key welcome message, and AI Assistant enabled by default.
* Update: Reworked Pro license management with a Modify License flow for Re-Validate, Modify, and Remove actions.
* Update: Hardened MCP handling by releasing PHP session locks, using proper trash hooks, deduplicating cache busts, enforcing `confirm_write` for non-read SQL, and purging LiteSpeed/WP Rocket caches after post writes.
* Update: Usage widget preferences for Price/Units/Queries and Daily/Monthly now persist across reloads.
* Update: Query and Reply tabs now point users to Settings > Others > Insights when data is unavailable.
* Fix: Managed-mode WP AI Client and AI Engine integrations now satisfy WordPress 7 AI plugin credential requirements, preventing false rejections for Ollama, OpenRouter, Mistral, Perplexity, and Replicate.
* Fix: Removed redundant vector-DB addon initialization to prevent idle "OpenAI Vector Store ID is not configured" logs.
* Fix: Resolved PHP 8.4 nullable-parameter deprecations in query and MCP helpers.
* Fix: ChatML base now supports string-shaped `error` fields in API responses.
* Update: Removed the legacy snippet-vault fallback and unused per-environment usage field.

= 3.4.7 (2026/04/25) =
* Add: GPT-5.5, GPT Image 2, and Claude Opus 4.7 to the model lists.
* Update: Refreshed default fallback models to GPT-5.4 and GPT-5-mini, and marked several upcoming OpenAI shutdowns as deprecated (gpt-5-chat-latest, gpt-4.1-nano, o3-mini, gpt-realtime-mini, gpt-image-1, sora-2, sora-2-pro).
* Update: Major UI/UX updates! I hope you'll enjoy them, otherwise... let me know! 😊
* Add: New Environments panel on the Dashboard with brand-colored rows, smart setup messages, and warnings for missing or deprecated default models.
* Fix: MCP write helpers (wp_alter_post, wp_update_post) were silently stripping backslashes from Unicode escapes.
* Add: Live timer on the Image Generator "Generating..." row so progress is visible.
* Fix: Auto-open is now skipped on mobile so a fullscreen chatbot no longer hijacks the screen on page load.
* Fix: AI Forms not rendering with their theme CSS when embedded via a synced Pattern.
* Add: Split print-to-PDF into its own toggle, moved behind a new "More options..." modal in Appearance settings.
* Update: Redesigned the Usage and Activity widgets with compact CSS-only stacked bars grouped by provider.
* Fix: Oversized embedding inputs are now caught before they hit OpenAI's 8192-token limit.
* Add: System-prompt hint for Anthropic's code_execution tool so Claude uses the sandbox instead of refusing.
* Update: Switched chatbot and form shortcode displays to the NekoShortcode component.
* Update: Functions section now appears as soon as the model supports it.

= 3.4.6 (2026/04/15) =
* Add: Print-to-PDF button next to the copy icon on the last AI message, allowing export of the full conversation via the browser's Save as PDF dialog.
* Add: Retention setting for discussions cleanup under Settings > Chatbot > Discussions, with a `mwai_discussions_retention_days` filter for overrides.
* Fix: Chatbot auto-scroll no longer fights users who scroll up during streaming.
* Fix: AI Form and Chatbot blocks no longer save as "Unsupported" placeholders when used in patterns created via Appearance > Editor.
* Fix: Hardened chatbot parameter processing so non-string values no longer crash the frontend with "trim is not a function".
* Fix: (Hotfix) Two mobile chatbot issues — keyboard pushing header and messages off-screen, and ChatGPT theme's submit button stretching into an oval below the input pill.
* Fix: Blocks with line breaks breaking after save in the Forms editor.
* Fix: REST MCP tools failing schema validation by forwarding nested JSON Schema fields (items, enum, default, etc.) from WordPress REST arg definitions.
* Fix: NekoUI dropdowns rendering broken inside Gutenberg block iframes.
* Fix: Temperature settings missing for Anthropic models in chatbot params.
* Fix: `ai.formReply` filter firing on every stream chunk instead of only once when the reply is complete.
* Update: Removed DALL-E and migrated existing defaults to gpt-image-1.
* Update: Bumped the discussions messages column from TEXT to MEDIUMTEXT.
* Update: Persisted the Query Mode and Expert Mode toggles in the Knowledge tab via localStorage.
* Update: Simplified `estimate_tokens` to a single-argument signature and added multi-file support to assistant queries.
* Update: Opus 4.6 and Sonnet 4.6 context window updated to 1M tokens.
* 🎵 Discuss with others about Ai Engine on [the Discord](https://discord.gg/bHDGh38).
* 🌴 Keep us motivated with [a little review here](https://wordpress.org/support/plugin/ai-engine/reviews/). Thank you!
* 🥰 If you want to help us, check our [Patreon](https://www.patreon.com/meowapps). Thank you!
* 🚀 [Click here](https://trello.com/b/8U9SdiMy/ai-engine-feature-requests) to vote for the features you want the most.

= 3.4.5 (2026/03/22) =
* Fix: Ensure additional CSS classes set in the block inspector.
* Fix: Stop mapping tool categories to annotation titles so MCP tools display their correct names.
* Add: Support for GPT-5.4 Pro, Mini, Nano, and GPT-5.3 Chat models.
* Fix: Resolve an MCP dispatch type mismatch that caused some MCP tools to fail.
* Update: Add new getStatus(), hasAI(), and hasMCP() API helpers (deprecated the older checkStatus() method).

= 3.4.4 (2026/03/15) =
* Fix: Hotfix resolves MCP server connection failures with clients using protocol version 2024-11-05 by adding automatic version negotiation.
* Add: Display shortcut prompts and names in the Discussions tab.
* Add: Introduce image embeddings support (Gemini Embedding 2) with multimodal embedding: bulk media push, and an AI-powered Library Search that replaces the native Media Library Search.
* Fix: Resolve a broken access control issue in the AI Forms shortcode to ensure only authorized users can access protected content (Private Page/Post).
* Fix: Prevent crashes when working with multi‑modal messages.
* Fix: Prevent the Embeddings screen from crashing when closing a modal.
* Update: Preserve links and inline HTML formatting in both the Editor Assistant and Magic Wand tools.
* Update: Refactor Magic Wand actions to use system messages.
* Update: Clean up old, deprecated options and legacy migration code.
* Update: Fixed Quick Test for Anthropic to use the models endpoint.
* Update: Chatbot Max Height moved to the Appearance section.
* Update: Rename Assistant Mode to Chatbot Mode in AI Forms, you can now use any chatbot to handle your AI Forms.
* Fix: Improve the discussions shortcode by falling back to customId to avoid invalid class names.
* Fix: Styles for the AI Chatbot Block are back.

= 3.4.1 (2026/03/06) =
* Update: Hide the Editor Assistant functions from the chatbot settings to simplify the interface.
* Add: Support for the new GPT-5.4 model for improved AI responses.

= 3.4.0 (2026/03/04) =
* Add: Introduce a fully featured Editor Assistant sidebar (with a client-side feedback loop for chained AI actions). It's called Assistant in the Admin Modules.
* Add: Introduce new dev filters (`mwai_mcp_server` and `mwai_function_call_params`) for customizing MCP servers and function call parameters.
* Add: Allow ignoring posts during embeddings sync, with a “hide” icon for linked posts, a “Show Ignored” modal, and a `mwai_embeddings_sync_post` filter for developers.
* Fix: Hotfix chat sessions so the chat ID resets correctly when needed.
* Fix: Restore the missing scope for AI Search.
* Update: Remove outdated internal TODOs, deprecated fields, legacy crons, and old migration code.

= 3.3.9 (2026/02/21) =
* Add: Cross Site now support shorcuts (Quick Actions), blocks (GDPR-friendly), etc.
* Update: Modernized all Gutenberg Blocks.
* Fix: Avoid crashes caused by Claude when using MCP tools together with function calling.
* Fix: Prevent React-related crashes during streaming.

= 3.3.8 (2026/02/18) =
* Add: Support for the Claude Sonnet 4.6 model.
* Add: Forward Anthropic keepalive events to the browser.
* Add: Make Realtime transcript captions clickable links.

= 3.3.7 (2026/02/14) =
* Add: Introduced role-based access control for MCP with three levels (admin, read-write, read-only).
* Add: Improved Content Aware features (better placeholder replacement, more accurate context detection, etc).
* Fix: Automatic bearer token generation when MCP is first enabled.
* Update: Improvements in the Realtime module, more to come soon.  
* Update: OpenAI now exclusively uses the Responses API, simplified and optimized the code.

= 3.3.6 (2026/02/06) =
* Add: Support for the new Claude Opus 4.6 and Opus 4.5 models for improved AI responses.
* Update: Deprecated GPT-4o, GPT-4o mini, GPT-4.1, GPT-4.1 mini, and their related realtime/transcribe models to guide users toward newer, supported options.
* Update: Replaced shortcut-based data storage with AES-256 encryption to avoid cache corruption issues.
* Add: Enhanced the wp_update_post MCP tool with better truncated JSON detection, content verification, and richer response data.
* Update: Linked PDF chunks via unique refChecksum and added ref filter to embeddings table.
* Add: Added WooCommerce MCP module with 25 tools for managing products, orders, inventory, customers, reviews, and analytics.

= 3.3.4 (2026/01/30) =
* Fix: Prevent duplicate shortcut transients from being created on every page.  
* Fix: Hotfix TypeError crashes in MCP tool calls when JSON-RPC requests are missing an id field.  
* Add: Introduce a new wp_upload_request MCP tool that generates one-time upload URLs so agents can upload local files via curl instead of base64.  
* Add: Add a new MCP "Database" module that lets you execute SQL queries.  
* Update: Remove the default popup title and AI name fallback so leaving the title field empty now shows no title at all.  
* Fix: Resolve a PHP 8.2 deprecation warning related to a dynamic property.

= 3.3.3 (2026/01/27) =
* Add: Introduce a Streamable HTTP transport for MCP so Claude Code can connect directly to WordPress. 
* Fix: Prevent unsafe file renaming during metadata updates.  
* Fix: Hotfix SSRF vulnerabilities by using wp_safe_remote_get for external URLs and secure URL fetching in audio transcription and file handling.  
* Add: Improved embedding dimension handling with matryoshka support, showing fixed vs configurable dimensions in the UI with clearer tooltips.  
* Update: Redesign and refine the ChatGPT Theme and Foundation Theme with improved layouts, bubble styling, and more flexible avatar/name display and header titles.  
* Add: Introduce 'context framing' for embeddings with a new filter.  
* Add: Moved Embeddings "Sync Settings" into Settings > Knowledge with separate Local Content and Remote URLs sections and a new Sync Interval option.  
* Add: Store Shortcuts prompts securely on the server and only send a shortcutId to the client so prompt text is no longer exposed.  
* Add: Load plugin translations properly with load_plugin_textdomain to ensure all text is translatable.  
* Fix: Via MCP, ensure scheduled posts created via wp_update_post respect the schedule_for parameter and edit_date flag so they publish at the correct time.  
* Add: New MCP integration for Polylang.
* Fix: Improve Gemini 3 support, restoring vision capabilities, function calling, and enforcing a single candidate response, and fixed image generation pricing.
* Add: Support image generation via OpenRouter.  
* Fix: Resolve undefined array key warnings in Remote URL sync and only update timestamps when content actually changes.
* 🎵 Discuss with others about Ai Engine on [the Discord](https://discord.gg/bHDGh38).
* 🌴 Keep us motivated with [a little review here](https://wordpress.org/support/plugin/ai-engine/reviews/). Thank you!
* 🥰 If you want to help us, check our [Patreon](https://www.patreon.com/meowapps). Thank you!

= 3.3.2 (2026/01/23) =
* Add: New "Remote URL" feature for Embeddings to create and auto-sync embeddings from external URLs with change detection.  
* Fix: Corrected auto-scroll behavior for non-streaming chatbots so conversations stay in view.  
* Add: Enabled multi-block support for Magic Wand tools (Correct Text, Enhance Text, and Translate Text).  
* Add: Introduce a user.query filter in the JS API so developers can intercept, modify, or cancel user messages before sending.  
* Add: Support next_run_delay for multi-step tasks to better control task scheduling.  
* Fix: Resolved an issue where multi-file uploads were empty.  
* Fix: Ensured the Standard Header correctly displays the Popup Title.  
* Fix: Adjusted link colors in the Timeless theme.  
* Fix: Prevent shortcuts from bypassing locked chatbots (GDPR consent, for example).  
* ⚠️ Important: Changed the mwai_chatbot_reply filter to pass a reply object instead of a query. Developer! Use reply->query where query was previously used.

= 3.3.1 (2026/01/04) =
* Update: Removed unused files and code to reduce clutter and improve performance.
* Info: Wishing you a Happy New Year 2026 ☀️🎉 No doubt this year will be full of surprises again, let's continue riding the AI wave together! 😊
