query( $wpdb->prepare( "DELETE FROM {$wpdb->options} WHERE option_name LIKE %s OR option_name LIKE %s", $wpdb->esc_like( '_transient_ai_client_' ) . '%', $wpdb->esc_like( '_transient_timeout_ai_client_' ) . '%' ) ); if ( wp_using_ext_object_cache() && function_exists( 'wp_cache_supports' ) && wp_cache_supports( 'flush_group' ) ) { wp_cache_flush_group( 'transient' ); } // WordPress 7 keeps the AI Client's own model list in the object cache, not in a transient. ModelSettings::invalidate_model_list(); } }