Plugin Directory


Ignore:
Timestamp:
10/17/2026 01:47:11 PM (12 days ago)
Author:
mxchat
Message:

Release 3.2.26 - security hardening, new models (GPT-6.1 Sol, Claude 5.5 family, Grok 4.7, Gemini 4 Argon, DeepSeek Flash), automatic moves off discontinued models, token usage in Transcripts, page-builder and ACF Blocks imports

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mxchat-basic/trunk/includes/admin-content-page.php

    r3670236 r3751971  
    563563                            <label class="mxch-field-label" for="mxch-image-model"><?php esc_html_e('Image Model', 'mxchat'); ?></label>
    564564                            <div class="mxch-field-control">
    565                                 <?php $image_model = $options['content_image_model'] ?? 'gpt-image-1.5'; ?>
     565                                <?php $image_model = $options['content_image_model'] ?? 'gpt-image-2.5-flare'; ?>
     566                                <?php
     567                                // Direct task M4 (2026-10-16): only current image models are
     568                                // offered. A saved model whose provider has shut it down, or
     569                                // announced a date, still shows as this site's value with its
     570                                // status (MxChat_Model_Catalog::image_model_lifecycle()) so a
     571                                // save never changes it silently; the generator sends the
     572                                // replacement once the date passes and the upgrade moves it.
     573                                // Plan d9da28: the offered list comes from the catalog, the
     574                                // same list mxchat_generate_media_image() accepts.
     575                                $mxch_image_groups = array();
     576                                if (method_exists('MxChat_Model_Catalog', 'image_generation_models')) {
     577                                    foreach (MxChat_Model_Catalog::image_generation_models() as $mxch_provider) {
     578                                        $mxch_image_groups[$mxch_provider['label']] = $mxch_provider['models'];
     579                                    }
     580                                }
     581                                $mxch_image_offered = false;
     582                                foreach ($mxch_image_groups as $mxch_g) {
     583                                    if (isset($mxch_g[$image_model])) {
     584                                        $mxch_image_offered = true;
     585                                    }
     586                                }
     587                                if (!$mxch_image_offered && $image_model !== '') {
     588                                    $mxch_rows = method_exists('MxChat_Model_Catalog', 'image_model_lifecycle') ? MxChat_Model_Catalog::image_model_lifecycle() : array();
     589                                    $mxch_name = isset($mxch_rows[$image_model]['from_label']) ? $mxch_rows[$image_model]['from_label'] : $image_model;
     590                                    $mxch_status = method_exists('MxChat_Model_Catalog', 'image_model_status_label') ? MxChat_Model_Catalog::image_model_status_label($image_model) : '';
     591                                    $mxch_group = (strpos($image_model, 'grok') === 0) ? __('xAI', 'mxchat') : ((strpos($image_model, 'gemini') === 0 || strpos($image_model, 'imagen') === 0) ? __('Google', 'mxchat') : __('OpenAI', 'mxchat'));
     592                                    /* translators: 1: image model name, 2: status such as "retires December 1, 2026" */
     593                                    $mxch_image_groups[$mxch_group][$image_model] = $mxch_status !== '' ? sprintf(__('%1$s — %2$s', 'mxchat'), $mxch_name, $mxch_status) : $mxch_name;
     594                                }
     595                                ?>
    566596                                <select id="mxch-image-model" data-field="content_image_model" class="mxch-cg-select">
    567                                     <optgroup label="<?php esc_attr_e('OpenAI', 'mxchat'); ?>">
    568                                         <option value="gpt-image-2" <?php selected($image_model, 'gpt-image-2'); ?>><?php esc_html_e('GPT Image 2 (Latest)', 'mxchat'); ?></option>
    569                                         <option value="gpt-image-1.5" <?php selected($image_model, 'gpt-image-1.5'); ?>><?php esc_html_e('GPT Image 1.5', 'mxchat'); ?></option>
     597                                    <?php foreach ($mxch_image_groups as $mxch_label => $mxch_models) : ?>
     598                                    <optgroup label="<?php echo esc_attr($mxch_label); ?>">
     599                                        <?php foreach ($mxch_models as $mxch_value => $mxch_text) : ?>
     600                                        <option value="<?php echo esc_attr($mxch_value); ?>" <?php selected($image_model, $mxch_value); ?>><?php echo esc_html($mxch_text); ?></option>
     601                                        <?php endforeach; ?>
    570602                                    </optgroup>
    571                                     <optgroup label="<?php esc_attr_e('xAI', 'mxchat'); ?>">
    572                                         <option value="grok-imagine-image-pro" <?php selected($image_model, 'grok-imagine-image-pro'); ?>><?php esc_html_e('Grok Imagine Pro', 'mxchat'); ?></option>
    573                                         <option value="grok-imagine-image" <?php selected($image_model, 'grok-imagine-image'); ?>><?php esc_html_e('Grok Imagine', 'mxchat'); ?></option>
    574                                     </optgroup>
    575                                     <optgroup label="<?php esc_attr_e('Google', 'mxchat'); ?>">
    576                                         <option value="gemini-2.5-flash-image" <?php selected($image_model, 'gemini-2.5-flash-image'); ?>><?php esc_html_e('Nano Banana (Gemini 2.5 Flash)', 'mxchat'); ?></option>
    577                                         <option value="gemini-3-pro-image-preview" <?php selected($image_model, 'gemini-3-pro-image-preview'); ?>><?php esc_html_e('Nano Banana Pro (Gemini 3 Pro)', 'mxchat'); ?></option>
    578                                     </optgroup>
     603                                    <?php endforeach; ?>
    579604                                </select>
    580605                            </div>
Note: See TracChangeset for help on using the changeset viewer.