transformBeforeLlmCall

Transform history before sending to LLM. Return modified list.