AxiaChat AI - Complete Changelog

= 4.3.5 =
* Fixed: Gemini requests now use thinking levels where supported and omit deprecated thinking budgets and custom sampling parameters.
* Updated: Freemius SDK to the latest version.

= 4.3.4 =
* Updated: Reviewed the model catalog against official provider documentation on September 20, 2026. Added GPT-6 Astra, Claude Opus 5/Fable 5.1, and Gemini 3.5 Flash-Lite/3.6/3.7/3.8 Flash.
* Changed: Gemini defaults to economical Gemini 2.5 Flash-Lite. OpenAI GPT-5.6 Luna and Claude Haiku 4.5 remain the defaults; premium models stay optional.
* Fixed: Restored still-active model choices incorrectly redirected as retired, and corrected model pricing, output limits and retirement labels.
* Fixed: GPT-6 Responses routing, Claude temperature compatibility during fallback, and Gemini 3 thinking parameters.

= 4.3.3 =
* Fixed: Prevented duplicate admin asset loading on the Bots screen, which could cause a JavaScript redeclaration error and leave the bot editor blank.
* Improved: Hardened the Bots editor against accidental duplicate script execution while preserving homepage preview functionality.

= 4.3.2 =
* Fixed: The Context (Knowledge Base) panel now discovers and lets you index public custom post types, including selecting all items, recent items, or search results.
* Fixed: Custom post type selections now work with initial indexing, manual updates, and automatic synchronization of new or modified content.
* Improved: Added the `aichat_context_post_types` filter for controlling which custom post types are available in the Context panel.
* Improved: Explicitly selected custom fields can now contribute structured values, including nested arrays and objects, to indexed content.

= 4.3.1 =
* Compatibility: Tested up to WordPress 7.1.
* Updated: OpenAI model pricing metadata aligned with official API pricing for GPT-5.6 Terra and GPT-5.6 Luna.
* Updated: Anthropic pricing metadata aligned with current API promotional pricing for Claude Sonnet 5.
* Changed: Retired OpenAI chat snapshot IDs are now hidden from admin model selectors while remaining auto-resolved for legacy bot configs.
* Improved: Provider runtime model resolution now normalizes legacy/deprecated IDs before API calls across OpenAI, Claude, and Gemini adapters.
* Updated libraries: `symfony/polyfill-mbstring` from 1.37.0 to 1.38.2.

= 4.3.0 =
* Changed: Removed default link-marker prompting in RAG responses. The `[LINK:N]` instruction is now added only when context URLs are enabled/present.
* Changed: Link placeholder replacement (`[LINK]` / `[LINK:N]`) is now gated by context URL availability; when links are disabled, residual markers are stripped from the final answer.
* Changed: URL indexing defaults are now disabled in both Advanced Training Context settings and Easy Setup Wizard context creation.

= 4.2.0 =
* Updated: AI model catalog refreshed across OpenAI, Anthropic Claude, and Google Gemini, including new defaults optimized for fast and cost-efficient chatbot usage.
* Updated: Legacy/deprecated model routing improved so older configured model IDs automatically resolve to current supported replacements.

= 4.1.10 =
* Fixed: Automatic nonce recovery for frontend AJAX requests — when a cached/expired nonce triggers `403`, the widget fetches a fresh nonce and retries once.
* Improved: Added machine-readable `invalid_nonce` codes across chat, history, upload, and lead-form AJAX handlers for reliable frontend recovery.
* Improved: Cache purge hooks now cover updated/added/deleted widget-affecting options with a single-purge-per-request guard.
* Updated: Chat defaults refreshed for current fast/cost-conscious models — OpenAI `gpt-5.6-luna`, Claude `claude-haiku-4-5-20251001`, and Gemini `gemini-3.5-flash`.
* Updated: Deprecated model routing now moves saved legacy IDs to active replacements, including Gemini 2.5 Flash to Gemini 3.5 Flash and retiring OpenAI chat snapshots to GPT-5.6 Luna.
* Updated: Gemini embeddings now use `gemini-embedding-2` instead of the retiring `gemini-embedding-001`.
* Added: Anthropic Claude Fable 5 (`claude-fable-5`) in the model registry with current pricing metadata ($10 input / $50 output per 1M tokens).
* Updated: Gemini metadata refreshed against current API docs (including `gemini-flash-latest` and `gemini-3.1-pro-preview-customtools` aliases plus shut-down labels for retired Gemini 2.0/preview entries).

= 4.1.9 =
* Added: New OpenAI models for advanced usage — `gpt-5.5-pro`, `gpt-5.4-pro`, and ChatGPT rolling alias `chat-latest`.
* Updated: Model lists refreshed with current Claude/Gemini lineup, including Claude Opus 4.8 and Gemini 3.1 Flash-Lite (stable).
* Updated: Defaults optimized for chat speed/cost — OpenAI keeps `gpt-5.4-mini` and Gemini now defaults to `gemini-3.1-flash-lite`.
* Improved: Internal provider flows now resolve default models from the central registry (avoids hardcoded fallback IDs).

= 4.1.8 =
* Added: Advanced Settings diagnostic card with live sequential checks (environment, provider probe, embeddings, context retrieval, 3-turn chat, tool execution and timeout timings).
* Added: Admin AJAX diagnostic runner that uses the selected bot/provider/model configuration and returns a copyable JSON report.
* Updated: Model registry refreshed with Claude Opus 4.8 and the current Gemini 3.x lineup (Gemini 3.5 Flash, 3.1 Pro, 3 Flash, 3.1 Flash-Lite).
* Updated: Defaults tuned for fast/cheap chat usage — OpenAI keeps GPT-5.4 Mini as default, and Gemini default is now Gemini 3.1 Flash-Lite.
* Updated: Claude default strategy remains Sonnet 4.6 (best speed/quality/cost for chat); Opus 4.8 stays as optional premium model.
* Updated: OpenAI catalog synced with latest ChatGPT/API models — added GPT-5.5 Pro (`gpt-5.5-pro`), GPT-5.4 Pro (`gpt-5.4-pro`) and ChatGPT alias `chat-latest`.
* Updated: New OpenAI entries now include full pricing metadata in the central registry ($30/$180 for GPT-5.5 Pro and GPT-5.4 Pro; $5/$30 for `chat-latest`).
* Updated: Deprecated/shut-down models are now clearly marked as legacy in model lists (Claude 4 snapshots and older Gemini 3/2.0 variants).
* Fixed: Auxiliary defaults and vision routes no longer rely on retired model IDs.

= 4.1.7 =
* Updated libraries: `smalot/pdfparser` from 2.12.4 to 2.12.5 and `symfony/polyfill-mbstring` from 1.33.0 to 1.37.0.

= 4.1.6 =
* Added: OpenAI GPT-5.5 model (`gpt-5.5`) with API pricing metadata ($5 input / $30 output per 1M tokens), 1M context window, and 128K max output.
* Added: Anthropic Claude Opus 4.7 model (`claude-opus-4-7`) with API pricing metadata ($5 input / $25 output per 1M tokens), 1M context window, and 128K max output.


= 4.1.5 =
* shortcode add maximized


= 4.1.4 =
* Added: Claude Sonnet 4.6 model (`claude-sonnet-4-6`, $3/$15, 1M context, 64K output) — now the default Anthropic model.
* Updated: All model pricing verified against official provider pages (OpenAI, Anthropic, Google) as of April 2026.

= 4.1.3 =
* Compatibility: Tested with WordPress 7.0 RC

= 4.1.2 =
💰 **Budget Limits & Usage Dashboard**
* Added: Budget limits — set daily/monthly caps on token usage and dollar spend for your AI chatbot from Settings → Usage & Moderation. When exceeded, the chatbot widget hides completely or falls back to showing only the WhatsApp CTA button.
* Added: Server-side pre-render check — budget limits are evaluated at page load so new visitors never see the AI chat widget when the budget is already exhausted. Admins always see the widget for testing.
* Added: Monthly usage summary in the Usage dashboard — select any month to view total input/output/combined tokens, estimated cost, conversation count, and a per-model breakdown table.
* Improved: "When limit is reached" behavior for budget limits now supports two modes: hide chatbot entirely, or show WhatsApp button only (requires WhatsApp CTA configured in bot settings).

= 4.1.1 =
* Added: OpenAI GPT-5.4 family — `gpt-5.4` (1M context, $2.50/$15), `gpt-5.4-mini` (400K, $0.75/$4.50), and `gpt-5.4-nano` (400K, $0.20/$1.25). GPT-5.4 is now the default model for new bots.
* Added: Google Gemini 3.1 models — `gemini-3.1-pro-preview` ($2/$12) and `gemini-3.1-flash-lite-preview` ($0.25/$1.50).
* Updated: Gemini model pricing aligned with current Google API rates (2.5 Pro, 2.5 Flash, 2.5 Flash-Lite, 3 Flash).
* Updated: Gemini 3 Pro Preview marked as shut down (deprecated Mar 9 2026) — use Gemini 3.1 Pro Preview.
* Updated: Gemini 2.0 Flash / Flash-Lite marked as legacy (deprecated Jun 2026).

= 3.1.7 =
* Changed: Footer attribution is now opt-in for all users (default off). Site administrators can enable it from Settings → Add-ons or during the Easy Setup Wizard.
* Improved: External Services documentation updated — added Google Gemini and Freemius SDK disclosures.


= 3.1.5 =
🎯 **Lead Capture — Major Overhaul**
* Added: Inline lead forms (`show_form`) — the bot displays a styled form directly inside the chat widget. Visitors fill it out and submit without leaving the conversation.
* Added: Multiple Lead Lists — create independent lists, each with its own fields, destination, form design, bot assignment, and notifications.
* Added: Form Appearance customization per list — display mode (full/compact), custom HTML header, submit button text, success message, background color, and button color.
* Added: Live form preview panel in admin — see real-time changes to form appearance, fields, types, and required markers as you edit.
* Added: Custom field types — Text, Email, Phone, Textarea, Number, and URL with proper validation and mobile keyboard support.
* Added: Required field support — mark fields as mandatory with red asterisk indicator and client-side validation.
* Added: Bot assignment per list — assign a list to all bots or restrict it to a specific bot for multi-bot setups.
* Added: List name column in leads table and list filter for multi-list management.
* Added: Total leads footer row in lists table with global count.
* Improved: `show_form` is now the primary recommended capture method; `save_lead` (conversational) remains available as fallback for non-visual channels (WhatsApp, SMS).
* Improved: Chat input is temporarily disabled while the inline form is visible to focus visitor attention.
* Improved: Form submit shows a customizable success message with green checkmark, then conversation resumes normally.
* Fixed: Lead list filter and per-list count now work correctly (list_id properly stored on capture).


= 3.1.0 =
* Added: Quick Questions — predefined question buttons displayed above the chat input to guide visitors and boost engagement from the first interaction.
* Added: Per-bot Quick Questions configuration — enable/disable and manage questions from Bots → Extras with dynamic add/remove fields and auto-save.

= 3.0.9 =
* Added: File & Image Uploads — visitors can now send photos (JPG, PNG, WebP) and PDF documents directly in the chat widget via a new 📎 attachment button.
* Added: AI Vision support — uploaded images are sent to the AI model's vision capability (GPT-4o, Claude Sonnet/Opus, Gemini Pro/Flash) for real-time visual analysis.
* Added: PDF text extraction — uploaded PDFs have their text extracted automatically and injected into the conversation context.
* Added: Automatic image optimization — uploaded images are resized (max 1536px) and compressed to reduce API costs and speed up processing.
* Added: In-chat file preview — sent messages show a thumbnail (images) or file indicator (PDFs) attached to the user's message bubble.
* Added: Admin log file indicators — conversation log list shows 📎 icon for sessions with attachments; detail view shows clickable thumbnails with secure full-size preview (base64 data URI, no public file exposure).
* Added: Per-bot upload configuration — enable/disable uploads, select allowed file types (PDF, JPG, PNG, WebP), and set max file size (1–20 MB) independently for each bot.
* Security: Uploaded files are never exposed via public URLs — images are stored as base64 in the database, accessible only to authenticated administrators.


= 3.0.8 =
* Added: OpenAI GPT-5.3 model support (`gpt-5.3-chat-latest`) — now the default model for new bots.
* Improved: Full page-cache compatibility — automatic cache purge when bot settings change, supporting WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache, SiteGround Optimizer, WP Fastest Cache, WP-Optimize, Cache Enabler, Hummingbird, Breeze (Cloudways), Kinsta, Cloudflare Super Page Cache, Autoptimize, and Nginx Helper. Third-party plugins can hook into `aichat_after_purge_cache`.
* Added: View and Edit buttons for indexed documents in Training → Context — inspect individual chunks, spot indexing errors, and surgically edit specific chunks with automatic re-embedding on save.

= 3.0.7 =
* Added: GDPR Consent now supports two modes — classic accept button or an email form gate that captures visitor contact details before the chat starts.
* Added: Email form mode collects email (required), name, and phone (both optional toggles with configurable placeholders).
* Added: GDPR Contacts tab under Leads — view, search, delete, bulk-delete, and export contacts captured via the email form. No plan limits apply.
* Added: "Delete all plugin data on uninstall" option in Settings → Advanced — when enabled, uninstalling the plugin removes all database tables and settings; disabled by default to prevent accidental data loss.


= 3.0.5 =
* Added: WhatsApp CTA button — optionally show a WhatsApp contact button inside the chat window, configurable per bot (phone number, custom message, button label, and display position).
* Added: Automatic front-end translation 

= 3.0.4 =
* Changed: Google Gemini is now the default and first provider in the Easy Config wizard — free tier covers ~100 messages/day.
* Added: "How to get a free API key" tip banner below provider cards in Easy Config (step 3) with step-by-step modal guide.
* Added: Same free API key tip banner on the Settings → General page when no API keys are configured.
* Improved: Provider card order updated across the plugin: Google Gemini → OpenAI → Anthropic.

= 3.0.3 =
* Added: Email alerts for new conversations — receive an email each time a user finishes chatting with your bot (enabled by default, configurable under Settings → General).
* Added: Advanced email alert options modal — choose between full transcript or summary-only emails, per-conversation or digest mode, and configurable idle timeout.

= 3.0.2 =
* Fixed: Tool continuation no longer triggers embedding generation (prevented 400 errors with Gemini provider).
* Fixed: Tool execution continuation now works reliably for Gemini and Claude providers (silent death resolved).
* Fixed: Suggestions chips now render correctly after tool continuation responses.
* Fixed: GPT-5.x hallucinated tool narration (e.g. "(executing tools…)") is detected and retried automatically.

= 3.0.1 =
🎨 **Redesign & User-Friendly Overhaul**
* Redesigned: Brand-new Easy Config wizard — set up a fully working bot in under 2 minutes with a guided, step-by-step flow.
* Redesigned: Training → Instructions now uses a clean card-based layout with built-in universal guidelines and a "Quick mode / Full editor" toggle.
* Redesigned: Training → Context page rebuilt with a modern batch-processing UI, real-time progress, and clearer status indicators.
* Redesigned: Bot Settings reorganized into logical tabs (General, Appearance, Window, Advanced) with live preview and simplified controls.
* Added: One-click AI-generated bot instructions — describe what you need and the AI writes the full system prompt for you.
* Added: Built-in prompt templates (Customer Support, Lead Generation, E-commerce Assistant, etc.) selectable from the Instructions page.
* Improved: AI Tools settings simplified — per-tool System Policy removed; all bot behavior is now centralized in Training → Instructions with clear usage tips and examples.
* Improved: Full JavaScript internationalization audit — all admin UI strings are now translatable.

= 2.0.9 =
* Added: Advanced Indexing Options per context — configure which fields are embedded (excerpt, URL, featured image, taxonomies, custom meta keys).
* Added: WooCommerce static fields in indexing — short description and attributes can now be included in embeddings.
* Added: WooCommerce dynamic enrichment — price, stock status and SKU are injected at query time with fresh data (no re-indexing needed when prices change).
* Added: Featured image URL option — when enabled, the AI can show product/post images directly in the chat using Markdown.
* Added: Image rendering support in chat widget — bot responses can now display images via Markdown syntax.
* Added: Post URL included by default in embeddings — the AI can now reference direct links to content. Configurable in Advanced Indexing Options.
* Fixed: Pinecone upsert metadata now includes content and post type — fixes empty context and enables WooCommerce enrichment for Pinecone-based contexts.
* Improved: Markdown-to-HTML fallback now supports image syntax `![alt](url)`.

= 2.0.8 =
* Added: Knowledge Sources Limit setting (3–10 slider) in Thresholds — control how many RAG chunks are included in each AI response (default 5).
* Added: History Persistence toggle per bot — when OFF, chat history is not restored on page refresh.
* Improved: Context Max Length default raised from 4096 to 6000 characters to avoid truncating rich RAG contexts.


= 2.0.7 =
* Contexts can now be modified.
* Preview page to test the bot before deploying it globally.
* Button in the widget to clear conversation history.

= 2.0.6 =
🛡️ **CSS Isolation – Theme-Proof Styling**
* Fixed: Chat widget text and background colors are now hardened with `!important` declarations to prevent WordPress themes from overriding them.
* Fixed: Dark themes can no longer cause invisible text (white-on-white) inside chat bubbles.
* Hardened: All critical UI elements protected — message bubbles, input field, send button, header, suggestions chips, GDPR consent block, footer, and super-minimized avatar.

🔧 **Diagnostics ZIP Export**
* Added: One-click "Export Diagnostics ZIP" button in Settings → Advanced tab for faster remote support.
* Includes: Full environment report (WP/PHP/MySQL versions, active theme, active plugins, bot & context summaries) plus plugin log files. Never includes API keys or secrets.

= 2.0.2 =
**Major Release: Business Automation Suite**

🎯 **Lead Capture System**

📅 **Appointment Booking System**
