A key issue here is how to diagnose whether AI is capable of something. Some people have a "behaviorist" (or "operationalist") approach to this, i.e., they would say that "AI is capable of XXX" if it looks like it can do it. I'd furthermore distinguish a formal from an informal behaviorist approach. "Formal" means that criteria for diagnosis have to be defined transparently before the experiment in such a way that it can unambiguously be decided whether in the experiment criteria are fulfilled or not. (The Turing test for example is informal in the sense that it doesn't define exactly the criteria by which observers decide whether a system is intelligent or not.)
An advantage of formal criteria is that they are (ideally) objective; they don't rely on interpretation. Experiments and conclusions from them will be reproducible (even though due to variation not necessarily reproduced) and transparent.
A disadvantage of formal criteria is that algorithms handle formalities, and can more or less easily be trained to fulfill specific formal demands, arguably without actually proving "intelligence" or "understanding" in this way. Formal criteria can often be fulfilled in ways that would subvert what they are supposed to show, so to say.
A general objection against behavioral approaches (and particularly formal ones) is that concepts such as "intelligence" and "understanding" can be understood as not exclusively referring to observable behavior, but rather to some states of consciousness that cannot be observed from the outside, at least not by just looking at behavior.
There is a lot to be said for this objection, but it obviously makes it very difficult to make any (even negative) statements of the kind that this or that AI system has (or doesn't have) "real intelligence" or "understands" this or that.
In any case I think that the distinction is an important one to have in mind. We can apply behaviorist criteria, but then we have to keep their limitations in mind, namely what behaviorist observation cannot tell us.
Regarding handling analogies by large language models (LLMs), understanding of how they work is crucial. The language models are based on a very large body of training texts, many of which use analogies. They will come up with analogies because they are trained to behave as the body of training tests does (trying to reproduce the observed distribution of follow up words, sentences etc.), obviously prompted/modified by interlocutor's interventions (trying to reproduce conditional distributions, reinforced by objective functions that assess output according to training assessments given by human beings) and whatever of the general environment of the discussion is used by their model.
They may in principle also come up with creative analogies by potentially mixing closely related trained analogies up, and this may work (or not), maybe even by learning something like a typical structure of texts around their use of analogies. I'd for sure expect them to be able (in a behaviorist sense) to make up new analogies, however many of them may not "work" that well. This can be amended (if somebody wants to construct an LLM that is particularly good at analogies) by providing human assessment of as many as possible invented analogies as additional training.
None of this requires an "understanding" by the system to explain it; the complexity and richness of the training data and the complexity of the encoded model to extract information from the training data are enough. To what extent you still want to call these features "capability" or "understanding" is really up to you, or more precisely, how behaviorist you want to be about these concepts. Note in particular that the system will always in some sense reproduce the variety of training data generated by humans, and the specifically human assessments of what "works" used for training the objective function of reinforcement learning. Any LLM "creativity" is the result of random generation (according to learnt conditional distributions) plus assessment by an objective function designed and potentially updated by human training. (People who follow a behaviorist diagnosis paradigm may say, "maybe humans do it like this, too, so where's the difference?")
For some reason there doesn't seem to be much discussion around these days of Searle's Chinese Room experiment, but in my view this is very relevant.