litellm/litellm
Mateo Wang 9ba4cc4fb3
fix(anthropic): keep tool_search_tool_result so the search call replays with its result (#46440)
* fix(anthropic): keep tool_search_tool_result so the search call replays with its result

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(anthropic): drop a client tool_result for a search call replayed with its server result

* fix(anthropic): replay a server tool call the client answered as the client sent it

* fix(anthropic): keep a server tool result under modify_params, count client-answered marks, and replay it from run_tool_loop

modify_params no longer adds a placeholder answer for a server tool call whose result is kept, unless the call ends the request. The cache control hook counts a mark on a server tool call the client answered, since that call goes out as a plain tool_use. run_tool_loop sends provider_specific_fields back and runs only the client's tool calls.

* fix(anthropic): keep a server tool result when another tool answer follows, scope run_tool_loop's replay, and keep code_interpreter_results off tool search turns

* test(anthropic): audit cells for tool search result round trips, replay, cache marks, pass-through logging and chaos

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-14 18:52:32 -07:00
..
_v2 feat(cache): select Rust caching through explicit cache objects (#43601) 2026-09-29 00:01:44 +00:00
a2a_protocol chore(typing): clear 670 basedpyright Any errors by validating provider payloads at the boundary (#45388) 2026-10-13 15:35:23 -07:00
anthropic_interface fix(proxy): send a real error event when a /v1/messages stream fails (#41826) 2026-09-25 15:36:35 -07:00
assistants refactor(types): replace Any with proven types in 157 files (#44798) 2026-10-06 15:31:54 +00:00
batch_completion
batches chore(typing): clear 670 basedpyright Any errors by validating provider payloads at the boundary (#45388) 2026-10-13 15:35:23 -07:00
caching fix(caching): report zero response_cost on a response-cache hit (#46471) 2026-10-14 18:45:49 -07:00
chat_completions refactor(python-bridge): ship a signature base and read the resolved call (#45450) 2026-10-08 17:20:29 -07:00
completion_extras fix(responses bridge): keep defer_loading on function tools sent to the Responses API (#46439) 2026-10-14 18:46:28 -07:00
compression refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
containers refactor: expose core private helpers under public names (#44871) 2026-10-07 00:05:27 +00:00
decisions feat(decisions): add Laya and Bespoke providers to the Add Model form (#45260) 2026-10-14 08:11:11 -07:00
embeddings refactor(python-bridge): ship a signature base and read the resolved call (#45450) 2026-10-08 17:20:29 -07:00
endpoints/speech/speech_to_completion_bridge
evals
experimental_mcp_client fix(mcp)!: preserve scopes during managed OAuth reauthorization (#45886) 2026-10-12 17:10:05 -04:00
files refactor: expose core private helpers under public names (#44871) 2026-10-07 00:05:27 +00:00
fine_tuning
google_genai refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
harness chore(typing): clear 670 basedpyright Any errors by validating provider payloads at the boundary (#45388) 2026-10-13 15:35:23 -07:00
images refactor: expose public hidden_params accessors (#44668) 2026-10-07 00:01:33 -07:00
integrations fix(anthropic): keep tool_search_tool_result so the search call replays with its result (#46440) 2026-10-14 18:52:32 -07:00
interactions refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
litellm_core_utils fix(anthropic): keep tool_search_tool_result so the search call replays with its result (#46440) 2026-10-14 18:52:32 -07:00
llms fix(anthropic): keep tool_search_tool_result so the search call replays with its result (#46440) 2026-10-14 18:52:32 -07:00
messages feat(anthropic): generate auto mode safeguard_results with a classifier model on the /v1/messages chat bridge (#45600) 2026-10-14 13:09:11 +00:00
models feat(access-groups): grant Claude Code skills through access groups (#46294) 2026-10-14 23:18:50 +00:00
ocr refactor(python-bridge): ship a signature base and read the resolved call (#45450) 2026-10-08 17:20:29 -07:00
passthrough refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
proxy fix(cost): price AgentCore web search at $7 per 1,000 queries (#46571) 2026-10-14 18:30:39 -07:00
proxy_auth
rag chore(typing): clear 670 basedpyright Any errors by validating provider payloads at the boundary (#45388) 2026-10-13 15:35:23 -07:00
realtime_api feat(realtime): proxy OpenAI Live sessions on /v1/live/sessions (#43621) 2026-10-13 13:59:27 -07:00
repositories feat(proxy): add deployment warning endpoints with instance-wide ignore and snooze (#46347) 2026-10-14 17:53:38 +00:00
rerank_api feat(lint): add LIT013 flagging *-ok suppressions that suppress nothing and remove the 240 stale ones (#42793) 2026-09-23 17:50:09 -07:00
responses fix(responses bridge): keep defer_loading on function tools sent to the Responses API (#46439) 2026-10-14 18:46:28 -07:00
router_strategy fix(databricks): call the ai_decide AI Function route for decisions and the auto-router (#45722) 2026-10-10 23:58:16 -07:00
router_utils fix(router): report fallbacks skipped for access or budget instead of calling them failed (#46291) 2026-10-14 15:08:47 -07:00
rust_bridge refactor(rust-bridge): return an unstarted Execution from native entrypoints and drive it in Python (#46299) 2026-10-14 17:50:44 -07:00
sandbox feat: add litellm.agent() to run claude code, codex, opencode and deep agents through the ai gateway (#43885) 2026-10-01 22:27:49 +00:00
search fix(cost): price AgentCore web search at $7 per 1,000 queries (#46571) 2026-10-14 18:30:39 -07:00
secret_managers chore(typing): clear 670 basedpyright Any errors by validating provider payloads at the boundary (#45388) 2026-10-13 15:35:23 -07:00
skills
systemone feat(decisions)!: send images to Cloudflare Clef through its images field (#45734) 2026-10-14 12:14:48 +00:00
telemetry feat(telemetry): add AggregatingSink, fixed-bucket histograms, Report and HttpExporter (#45487) 2026-10-13 18:33:01 -07:00
tracing docs(agents): ban semicolons and colons in human-facing text (#45684) 2026-10-09 16:36:32 -07:00
types fix(cost): price AgentCore web search at $7 per 1,000 queries (#46571) 2026-10-14 18:30:39 -07:00
vector_store_files
vector_stores refactor: expose core private helpers under public names (#44871) 2026-10-07 00:05:27 +00:00
videos feat(dashscope): add Wan 3.0, Wan 2.7 and HappyHorse video generation via /v1/videos (#43706) 2026-10-14 10:10:07 -07:00
__init__.py feat(decisions): add Laya and Bespoke providers to the Add Model form (#45260) 2026-10-14 08:11:11 -07:00
_internal_context.py fix(otel): nest cache spans under their operation and name service spans by purpose (#44150) 2026-10-03 09:20:27 -07:00
_lazy_imports.py refactor: expose core private helpers under public names (#44871) 2026-10-07 00:05:27 +00:00
_lazy_imports_registry.py feat(decisions): add Laya and Bespoke providers to the Add Model form (#45260) 2026-10-14 08:11:11 -07:00
_logging.py perf(proxy): keep stream end output and Redis cache debug strings off the event loop (#45252) 2026-10-09 14:56:16 -07:00
_redis.py fix(redis): default every Redis client to a 5s socket timeout when none is set (#46501) 2026-10-14 15:00:03 -07:00
_redis_credential_provider.py refactor: expose core private helpers under public names (#44871) 2026-10-07 00:05:27 +00:00
_service_logger.py fix(caching): report Redis circuit-breaker metrics through the Prometheus services logger (#46484) 2026-10-14 14:29:54 -07:00
_uuid.py
_version.py feat(sdk): build core from an independent packaging manifest (#44340) 2026-10-08 18:40:14 -07:00
anthropic_beta_headers_config.json fix(vertex_ai): forward the inline-tools-2026-09-15 beta to Vertex and Anthropic (#45297) 2026-10-08 12:27:52 -07:00
anthropic_beta_headers_manager.py refactor(types): move SpanAttributes, SpecialHeaders and AllowedModelRegion out of proxy._types (#44717) 2026-10-05 21:40:13 -07:00
blog_posts.json
budget_manager.py
constants.py fix(redis): default every Redis client to a 5s socket timeout when none is set (#46501) 2026-10-14 15:00:03 -07:00
cost.json
cost_calculator.py fix(cost): price AgentCore web search at $7 per 1,000 queries (#46571) 2026-10-14 18:30:39 -07:00
exceptions.py fix: support OpenAI SDK 3 while retaining SDK 2 compatibility (#44927) 2026-10-09 19:45:50 -07:00
main.py feat(decisions): accept decisions as a model mode alongside evaluation (#45474) 2026-10-10 19:18:53 -07:00
model_prices_and_context_window_backup.json fix(cost): price AgentCore web search at $7 per 1,000 queries (#46571) 2026-10-14 18:30:39 -07:00
policy_templates_backup.json fix(packaging): keep wheel paths under Windows MAX_PATH for Store Python (#43903) 2026-09-30 22:20:36 +00:00
provider_endpoints_support_backup.json feat(providers): add CoralBricks as a native provider (#44700) 2026-10-12 21:56:59 +00:00
py.typed
router.py fix(router): read the first stream chunk through __aiter__ so MCP auto-run streaming works again (#46578) 2026-10-15 01:51:07 +00:00
scheduler.py fix(scheduler): remove a request's queue entry once it stops waiting (#43061) 2026-10-07 17:34:38 -07:00
setup_wizard.py fix(model_prices): correct Claude Sonnet 5.5 capabilities and provider keys (#43587) 2026-09-28 19:12:31 +00:00
timeout.py
tool_loop.py fix(anthropic): keep tool_search_tool_result so the search call replays with its result (#46440) 2026-10-14 18:52:32 -07:00
utils.py feat(dashscope): add Wan 3.0, Wan 2.7 and HappyHorse video generation via /v1/videos (#43706) 2026-10-14 10:10:07 -07:00