langchain-ai
langchain
BlogDocsChangelog

fix(core): use tool_calls instead of deprecated function_call in get_buffer_string

#34355
Comparing
edlsh:fix/get-buffer-string-tool-calls-33970
(
98939ee
) with
master
(
1a3cd46
)
CodSpeed Performance Gauge
-2%
Untouched
13
Skipped
21

Benchmarks

Skipped (21)

Passed

test_async_callbacks_in_sync
libs/core/tests/benchmarks/test_async_callbacks.py
CodSpeed Performance Gauge
+1%
24.7 ms*24.5 ms
test_import_time[HumanMessage]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
-1%
261.8 ms*264.8 ms
test_import_time[InMemoryRateLimiter]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
-1%
172.7 ms*174.9 ms
test_import_time[BaseChatModel]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
-1%
525.8 ms*532.7 ms
test_import_time[LangChainTracer]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
-1%
435.2 ms*441.8 ms
test_import_time[CallbackManager]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
-2%
455.4 ms*463 ms
test_import_time[ChatPromptTemplate]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
-2%
593.7 ms*605.3 ms
test_import_time[PydanticOutputParser]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
-2%
527 ms*539 ms
test_import_time[Document]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
-2%
184.9 ms*189.3 ms
test_import_time[tool]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
-2%
514.9 ms*527.6 ms
test_import_time[Runnable]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
-2%
484 ms*496.4 ms
test_import_time[RunnableLambda]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
-3%
486.3 ms*503.1 ms
test_import_time[InMemoryVectorStore]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
-3%
609.7 ms*631 ms

Commits

Click on a commit to change the comparison range
Base
master
1a3cd46
-1.85%
fix(core): use tool_calls instead of deprecated function_call in get_buffer_string get_buffer_string now checks for the modern tool_calls field on AIMessage before falling back to the deprecated function_call in additional_kwargs. This ensures tool call information is properly included in the buffer output for modern LLM providers. Fixes #33970
98939ee
3 days ago
by edlsh
© 2025 CodSpeed Technology
Home Terms Privacy Docs