Repository: langchain
Issue: get_buffer_string() use deprecated keys
Labels: 🤖:bug

### Checked other resources

- [X] I added a very descriptive title to this issue.
- [X] I searched the LangChain documentation with the integrated search.
- [X] I used the GitHub search to find a similar question and didn't find it.
- [X] I am sure that this is a bug in LangChain rather than my code.
- [X] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

### Example Code

```python
from langchain_openai import ChatOpenAI
from langchain_core.tools import tool
from langchain_core.tracers import ConsoleCallbackHandler
from langchain_core.runnables import RunnableConfig
from langchain_core.messages import HumanMessage, SystemMessage, AIMessage
from pydantic import SecretStr


@tool
def get_temperature_date(location: str, date: str, unit: str = "celsius"):
    """Get temperature at a location and date.

    Args:
        location: The location to get the temperature for, in the format "City, State, Country".
        date: The date to get the temperature for, in the format "Year-Month-Day".
        unit: The unit to return the temperature in. Defaults to "celsius". (choices: ["celsius", "fahrenheit"])

    Returns:
        the temperature, the location, the date and the unit in a dict
    """
    return {
        "temperature": 25.9,
        "location": location,
        "date": date,
        "unit": unit,
    }


messages = [
    SystemMessage(
        "You are Qwen, created by Alibaba Cloud. You are a helpful assistant.\n\nCurrent Date: 2025-01-11"
    ),
    HumanMessage("What's the temperature in San Francisco now? How about tomorrow?"),
]

config = RunnableConfig(callbacks=[ConsoleCallbackHandler()])
model = ChatOpenAI(
    model="Qwen/Qwen2.5-14B-Instruct",
    base_url="http://localhost:8192/v1",
    api_key=SecretStr("EMPTY"),
)
llm_with_tool = model.bind_tools([get_temperature_date])

res = llm_with_tool.invoke(messages)
print(res.tool_calls)
messages.append(res)
for tool_call in res.tool_calls:
    tool_msg = get_temperature_date.invoke(tool_call)
    messages.append(tool_msg)
res = llm_with_tool.invoke(messages, config=config)
print(res)
```

### Error Message and Stack Trace (if applicable)

After checking the output of ConsoleCallbackHandler, I find:

```
[llm/start] [llm:ChatOpenAI] Entering LLM run with input:
{
  "prompts": [
    "System: You are Qwen, created by Alibaba Cloud. You are a helpful assistant.\n\nCurrent Date: 2025-01-11\nHuman: What's the temperature in San Francisco now? How about tomorrow?\nAI: To provide you with the current and tomorrow's temperatures in San Francisco, I need to know today's date and then calculate tomorrow's date based on that. However, since you did not specify today's date, I will assume today is the current date of my last update, which might not be the actual current date. For the sake of this query, let's assume today is 2025-01-11. Therefore, tomorrow would be 2025-01-12.\n\nLet's get  the temperature for both dates.\n\nTool: {\"temperature\": 25.9, \"location\": \"San Francisco, California, USA\", \"date\": \"2025-01-11\", \"unit\": \"fahrenheit\"}\nTool: {\"temperature\": 25.9, \"location\": \"San Francisco, California, USA\", \"date\": \"2025-01-12\", \"unit\": \"fahrenheit\"}"
  ]
}
```

Note that there is no information about tool use in the AI message.

### Description

I meet a problem when using `ConsoleCallbackHandler` with chat models.

The exact problems is that when output LLM input, it omit those related to tool use. After reading the source code of langchain, I find the reason. In the implementation of [`get_buffer_string()`](https://github.com/langchain-ai/langchain/blob/bbc3e3b2cfc20381b212f8fcb463cab56946ab0c/libs/core/langchain_core/messages/utils.py#L82), it still uses the key `'function_call'`. However, openai have deprecated it and start to use `'tool_calls'`.

This is the code snippet of `get_buffer_string()`:

```python
def get_buffer_string(
    messages: Sequence[BaseMessage], human_prefix: str = "Human", ai_prefix: str = "AI"
) -> str:
    """Convert a sequence of Messages to strings and concatenate them into one string.
//.....
        if isinstance(m, AIMessage) and "function_call" in m.additional_kwargs: # <------------ NOTE HERE!!!
            message += f"{m.additional_kwargs['function_call']}"
        string_messages.append(message)
//......
```



### System Info


System Information
------------------
> OS:  Linux
> OS Version:  #134-Ubuntu SMP Fri Sep 27 20:20:17 UTC 2024
> Python Version:  3.10.12 (main, Nov  6 2024, 20:22:13) [GCC 11.4.0]

Package Information
-------------------
> langchain_core: 0.3.29
> langsmith: 0.2.10
> langchain_openai: 0.2.14
> langgraph_sdk: 0.1.51

Optional packages not installed
-------------------------------
> langserve

Other Dependencies
------------------
> httpx: 0.28.1
> jsonpatch: 1.33
> langsmith-pyo3: Installed. No version info available.
> openai: 1.59.6
> orjson: 3.10.14
> packaging: 24.1
> pydantic: 2.7.4
> PyYAML: 6.0.2
> requests: 2.32.3
> requests-toolbelt: 1.0.0
> tenacity: 9.0.0
> tiktoken: 0.8.0
> typing-extensions: 4.12.2
> zstandard: Installed. No version info available.