Skip to content

fix(bedrock): stop naming typed tools on Bedrock invoke /v1/messages so toolset entries reach Claude - #51756

Merged
mateo-berri merged 7 commits into
BerriAI:mainfrom
norkelbyte:litellm_bedrock_messages_toolset_no_name
Nov 24, 2026
Merged

mateo-berri merged 7 commits into
BerriAI:mainfrom
norkelbyte:litellm_bedrock_messages_toolset_no_name

Conversation

@norkelbyte

@norkelbyte norkelbyte commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Handwritten 1-3 sentence description

Computer use and browser use with Claude on Bedrock Invoke failed on every request, because the gateway gave those tools a placeholder name that Bedrock refuses. Now only custom tools sent without a name get one, so the same request that works against Anthropic works against Bedrock Invoke too

Details

TLDR

Problem this solves:

  • Computer and browser toolsets on Bedrock /v1/messages answer 400
  • LiteLLM adds a placeholder name that Bedrock refuses on toolsets

How it solves it:

  • Only nameless custom tools get the placeholder name
  • Typed tools pass through untouched, toolsets included
  • The Rust copy that serves this route gets the same change

User Flow

Before: a developer running a computer-use agent on Claude through Bedrock gets a 400 on the first request

  1. They POST http://litellm-domain/v1/messages for a bedrock/invoke/ Claude model with "tools": [{"type": "computer_toolset_20260801"}] (or the browser toolset), streaming or not
  2. LiteLLM answers 400 name is not accepted on a toolset entry, and the agent never starts

After: the same request reaches Claude, and the agent loop runs

  1. They send the same POST http://litellm-domain/v1/messages
  2. They get 200 with a tool_use block named screenshot carrying toolset_name: computer (or browser)
  3. They send back the screenshot as a tool_result and get 200 with Claude's answer about the screen

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/unit/<your_test_file>.py -v. Leave the suites (make test-unit-*, make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync check, etc.)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • Every automated review on my PR's latest commit has finished, and I have addressed or replied to each of its findings before requesting a maintainer review

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

Screenshots / Proof of Fix

Last updated: 009fe7b. QA ran on 639b9a2, after main was merged in, since main now sends both Mantle routes through the Invoke Rust transform. Changes since QA: one Rust test attribute. Proof remains valid because no shipped code changed. Verification: the targeted cargo tests pass

Setup shared by both legs. Each leg is a proxy with 2 workers and no database, started with litellm --config config.yaml --port $PORT --num_workers 2, using AWS credentials for a Bedrock account in us-east-1 and LITELLM_MASTER_KEY. Before runs the merge base

config.yaml
model_list:
  - model_name: bedrock-claude-sonnet-5-5
    litellm_params:
      model: bedrock/invoke/us.anthropic.claude-sonnet-5-5
      aws_region_name: us-east-1
  - model_name: bedrock-route-sonnet-5-5
    litellm_params:
      model: bedrock/us.anthropic.claude-sonnet-5-5
      aws_region_name: us-east-1
  - model_name: mantle-opus
    litellm_params:
      model: bedrock/mantle/anthropic.claude-opus-5-5
      aws_region_name: us-east-1
  - model_name: bmantle-opus
    litellm_params:
      model: bedrock_mantle/anthropic.claude-opus-5-5
      aws_region_name: us-east-1

blue_screen.b64 holds a 64x40 solid blue PNG, which every case uses as the screenshot

iVBORw0KGgoAAAANSUhEUgAAAEAAAAAoCAIAAADBrGu+AAAASElEQVR4nO3PQQ0AIBDAsAP/nkEEj4ZkVbCtmTM/2zrgVQNaA1oDWgNaA1oDWgNaA1oDWgNaA1oDWgNaA1oDWgNaA1oDWgPaBd1BAU+De5MHAAAAAElFTkSuQmCC

The SDK loop case runs the computer toolset helper from @anthropic-ai/sdk 1.13.0, the latest release, on Node 24.19.0, with the tool runner's defaults. Its screenshot member returns the blue PNG. Install the SDK in an empty sdk directory, then save blue_screen.b64 and loop.mjs there

npm init -y && npm install @anthropic-ai/sdk@1.13.0
loop.mjs
import Anthropic from '@anthropic-ai/sdk';
import { BetaAbstractComputerToolset20260801 } from '@anthropic-ai/sdk/helpers/beta/toolsets/computer';
import { readFileSync } from 'node:fs';

const blueScreen = readFileSync(process.env.SCREENSHOT_B64, 'utf8').trim();

class BlueDesktop extends BetaAbstractComputerToolset20260801 {
  screenshot() {
    return { data: blueScreen };
  }
}

const loggingFetch = async (url, init) => {
  const sent = JSON.parse(init.body);
  const toolResultIds = sent.messages.flatMap((m) => [m.content].flat()).filter((b) => b.type === 'tool_result');
  const res = await fetch(url, init);
  console.log(`POST ${new URL(url).pathname} tool_result ids ${JSON.stringify(toolResultIds.map((b) => b.tool_use_id))} -> HTTP ${res.status}`);
  return res;
};

const client = new Anthropic({ baseURL: process.env.LITELLM_URL, apiKey: process.env.LITELLM_MASTER_KEY, fetch: loggingFetch });
const desktop = new BlueDesktop();
console.log(`tools[0] ${JSON.stringify(desktop.toJSON())}`);

const runner = client.beta.messages.toolRunner({
  model: 'bedrock-claude-sonnet-5-5',
  max_tokens: 1024,
  tools: [desktop],
  messages: [{ role: 'user', content: 'Take a screenshot, then tell me in one sentence what color the screen is.' }],
});

try {
  for await (const message of runner) {
    for (const block of message.content) {
      console.log(block.type === 'text' ? `text: ${block.text}` : `${block.type} ${block.name} id ${block.id}`);
    }
  }
} catch (err) {
  console.log(`error: ${err.status} ${err.message}`);
}
Case Before After
SDK computer toolset loop 400, 400 400, 200, 200, "solid, bright blue"
Computer toolset 400 200, screenshot
Computer toolset, streaming 400 200, screenshot
Browser toolset 400 200, screenshot
Browser toolset, streaming 400 200, screenshot
Second turn with screenshot 400 200, "solid blue"
bedrock/ route, computer toolset 400 200, screenshot
bedrock/mantle/ computer toolset 400 200, screenshot
bedrock_mantle/ computer toolset 400 200, screenshot
bedrock/mantle/ second turn 400 200, "solid bright blue"
Toolset, bash, unnamed custom tool 400 200, tool_use
Custom tool without a name 200 200
bedrock/mantle/ custom tool, no name 200 200
bash_20250124 without a name 400 400, Field required

second_turn.json holds the second turn request below, and second_turn_mantle.json is the same with "model": "mantle-opus"

second_turn.json
{"model": "bedrock-claude-sonnet-5-5", "max_tokens": 256, "tools": [{"type": "computer_toolset_20260801"}], "messages": [{"role": "user", "content": "Take a screenshot, then tell me in one sentence what color the screen is."}, {"role": "assistant", "content": [{"type": "tool_use", "id": "toolu_01QaSecondTurnShot0001", "name": "screenshot", "input": {}, "toolset_name": "computer"}]}, {"role": "user", "content": [{"type": "tool_result", "tool_use_id": "toolu_01QaSecondTurnShot0001", "toolset_name": "computer", "content": [{"type": "image", "source": {"type": "base64", "media_type": "image/png", "data": "iVBORw0KGgoAAAANSUhEUgAAAEAAAAAoCAIAAADBrGu+AAAASElEQVR4nO3PQQ0AIBDAsAP/nkEEj4ZkVbCtmTM/2zrgVQNaA1oDWgNaA1oDWgNaA1oDWgNaA1oDWgNaA1oDWgNaA1oDWgPaBd1BAU+De5MHAAAAAElFTkSuQmCC"}}]}]}]}

Sent straight to Bedrock, the same requests get the After answers, and the placeholder name alone causes the 400

Bedrock called directly, results, commands and output
Request sent straight to Bedrock Status
Invoke, computer toolset as sent 200
Invoke, toolset with the placeholder name 400
Invoke, custom tool without a name 400, Field required
Invoke, bash_20250124 without a name 400, Field required
Mantle, computer toolset as sent 200
# direct invoke, computer toolset as sent
$ curl -sS -w '\nHTTP %{http_code}\n' https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-sonnet-5-5/invoke --aws-sigv4 aws:amz:us-east-1:bedrock --user "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" -H "x-amz-security-token: $AWS_SESSION_TOKEN" -H "Content-Type: application/json" -d '{"anthropic_version": "bedrock-2023-05-31", "max_tokens": 1024, "tools": [{"type": "computer_toolset_20260801"}], "messages": [{"role": "user", "content": "Take a screenshot, then tell me in one sentence what color the screen is."}]}'
{"model":"claude-sonnet-5-5","id":"msg_bdrk_omkvzddu43fu2ljcfgci2bao6w4sysxospxbl7qdpux4jn6gg7vq","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_bdrk_014GoehUbz9q8xWsfo3MfiwR","name":"screenshot","input":{},"toolset_name":"computer"}],"container":null,"stop_reason":"tool_use","stop_sequence":null,"stop_details":null,"usage":{"input_tokens":4554,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":59,"output_tokens_details":{"thinking_tokens":0},"service_tier":"standard"}}
HTTP 200

# direct invoke, computer toolset with the placeholder name
$ curl -sS -w '\nHTTP %{http_code}\n' https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-sonnet-5-5/invoke --aws-sigv4 aws:amz:us-east-1:bedrock --user "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" -H "x-amz-security-token: $AWS_SESSION_TOKEN" -H "Content-Type: application/json" -d '{"anthropic_version": "bedrock-2023-05-31", "max_tokens": 1024, "tools": [{"type": "computer_toolset_20260801", "name": "litellm_unnamed_tool_0"}], "messages": [{"role": "user", "content": "Take a screenshot, then tell me in one sentence what color the screen is."}]}'
{"message":"tools.0.computer_toolset_20260801: name is not accepted on a toolset entry: the member names are fixed by the dated type, and the served tool keeps the family's bare name"}
HTTP 400

# direct invoke, custom tool without a name
$ curl -sS -w '\nHTTP %{http_code}\n' https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-sonnet-5-5/invoke --aws-sigv4 aws:amz:us-east-1:bedrock --user "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" -H "x-amz-security-token: $AWS_SESSION_TOKEN" -H "Content-Type: application/json" -d '{"anthropic_version": "bedrock-2023-05-31", "max_tokens": 256, "tools": [{"description": "Get the weather for a city", "input_schema": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}}], "messages": [{"role": "user", "content": "Use the tool to get the weather in Paris."}]}'
{"message":"tools.0.custom.name: Field required"}
HTTP 400

# direct invoke, bash_20250124 without a name
$ curl -sS -w '\nHTTP %{http_code}\n' https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-sonnet-5-5/invoke --aws-sigv4 aws:amz:us-east-1:bedrock --user "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" -H "x-amz-security-token: $AWS_SESSION_TOKEN" -H "Content-Type: application/json" -d '{"anthropic_version": "bedrock-2023-05-31", "max_tokens": 256, "tools": [{"type": "bash_20250124"}], "messages": [{"role": "user", "content": "Run ls."}]}'
{"message":"tools.0.bash_20250124.name: Field required"}
HTTP 400

# direct mantle, computer toolset as sent
$ curl -sS -w '\nHTTP %{http_code}\n' https://bedrock-mantle.us-east-1.api.aws/anthropic/v1/messages --aws-sigv4 aws:amz:us-east-1:bedrock --user "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" -H "x-amz-security-token: $AWS_SESSION_TOKEN" -H "Content-Type: application/json" -H 'anthropic-version: 2023-06-01' -d '{"model": "anthropic.claude-opus-5-5", "max_tokens": 256, "tools": [{"type": "computer_toolset_20260801"}], "messages": [{"role": "user", "content": "Take a screenshot, then tell me in one sentence what color the screen is."}]}'
{"model":"claude-opus-5-5","id":"msg_bdrk_muc2llolkx4l4jmonbpxlvqvgb3gt3i7wagbhrgsduhddirpe6zq","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_bdrk_01EmG7fY3pb6EQwKvMYdzdyq","name":"screenshot","input":{},"toolset_name":"computer"}],"container":null,"stop_reason":"tool_use","stop_sequence":null,"stop_details":null,"usage":{"input_tokens":4554,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":59,"output_tokens_details":{"thinking_tokens":0},"service_tier":"standard"}}
HTTP 200

Before (b4419fc)

Anthropic SDK computer toolset loop

  1. Run the program from the sdk directory
$ cd sdk && LITELLM_URL=http://127.0.0.1:24363 SCREENSHOT_B64=blue_screen.b64 node loop.mjs; cd ..
  1. Output
tools[0] {"type":"computer_toolset_20260801","configs":{"key":{"enabled":false},"hold_key":{"enabled":false},"type":{"enabled":false},"cursor_position":{"enabled":false},"mouse_move":{"enabled":false},"left_mouse_down":{"enabled":false},"left_mouse_up":{"enabled":false},"left_click":{"enabled":false},"left_click_drag":{"enabled":false},"right_click":{"enabled":false},"middle_click":{"enabled":false},"double_click":{"enabled":false},"triple_click":{"enabled":false},"scroll":{"enabled":false},"wait":{"enabled":false},"zoom":{"enabled":false}}}
POST /v1/messages tool_result ids [] -> HTTP 400
POST /v1/messages tool_result ids [] -> HTTP 400
error: 400 400 {"type":"error","error":{"type":"invalid_request_error","message":"litellm.BadRequestError: BedrockException - {\"message\":\"tools.0.computer_toolset_20260801: name is not accepted on a toolset entry: the member names are fixed by the dated type, and the served tool keeps the family's bare name\"}\n\nLiteLLM: model group 'bedrock-claude-sonnet-5-5' failed with the error above. No fallback was attempted."}}

Computer and browser toolsets

Commands and output
  1. Computer toolset
$ curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:24363/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock-claude-sonnet-5-5", "max_tokens": 1024, "tools": [{"type": "computer_toolset_20260801"}], "messages": [{"role": "user", "content": "Take a screenshot, then tell me in one sentence what color the screen is."}]}'
{"type":"error","error":{"type":"invalid_request_error","message":"litellm.BadRequestError: BedrockException - {\"message\":\"tools.0.computer_toolset_20260801: name is not accepted on a toolset entry: the member names are fixed by the dated type, and the served tool keeps the family's bare name\"}\n\nLiteLLM: model group 'bedrock-claude-sonnet-5-5' failed with the error above. No fallback was attempted."}}
HTTP 400
  1. Computer toolset, streaming
$ curl -sS -N -w '\nHTTP %{http_code}\n' http://127.0.0.1:24363/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock-claude-sonnet-5-5", "max_tokens": 1024, "stream": true, "tools": [{"type": "computer_toolset_20260801"}], "messages": [{"role": "user", "content": "Take a screenshot, then tell me in one sentence what color the screen is."}]}' | grep -E '^data: .*(content_block_start|message_delta|error)|^HTTP|"error"'
{"type":"error","error":{"type":"invalid_request_error","message":"litellm.BadRequestError: BedrockException - {\"message\":\"tools.0.computer_toolset_20260801: name is not accepted on a toolset entry: the member names are fixed by the dated type, and the served tool keeps the family's bare name\"}\n\nLiteLLM: model group 'bedrock-claude-sonnet-5-5' failed with the error above. No fallback was attempted."}}
HTTP 400
  1. Browser toolset
$ curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:24363/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock-claude-sonnet-5-5", "max_tokens": 1024, "tools": [{"type": "browser_toolset_20260801"}], "messages": [{"role": "user", "content": "Take a screenshot, then tell me in one sentence what color the screen is."}]}'
{"type":"error","error":{"type":"invalid_request_error","message":"litellm.BadRequestError: BedrockException - {\"message\":\"tools.0.browser_toolset_20260801: name is not accepted on a toolset entry: the member names are fixed by the dated type, and the served tool keeps the family's bare name\"}\n\nLiteLLM: model group 'bedrock-claude-sonnet-5-5' failed with the error above. No fallback was attempted."}}
HTTP 400
  1. Browser toolset, streaming
$ curl -sS -N -w '\nHTTP %{http_code}\n' http://127.0.0.1:24363/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock-claude-sonnet-5-5", "max_tokens": 1024, "stream": true, "tools": [{"type": "browser_toolset_20260801"}], "messages": [{"role": "user", "content": "Take a screenshot, then tell me in one sentence what color the screen is."}]}' | grep -E '^data: .*(content_block_start|message_delta|error)|^HTTP|"error"'
{"type":"error","error":{"type":"invalid_request_error","message":"litellm.BadRequestError: BedrockException - {\"message\":\"tools.0.browser_toolset_20260801: name is not accepted on a toolset entry: the member names are fixed by the dated type, and the served tool keeps the family's bare name\"}\n\nLiteLLM: model group 'bedrock-claude-sonnet-5-5' failed with the error above. No fallback was attempted."}}
HTTP 400

Second turn with the screenshot

Commands and output
  1. Computer toolset, second turn with the screenshot
$ curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:24363/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d @second_turn.json
{"type":"error","error":{"type":"invalid_request_error","message":"litellm.BadRequestError: BedrockException - {\"message\":\"tools.0.computer_toolset_20260801: name is not accepted on a toolset entry: the member names are fixed by the dated type, and the served tool keeps the family's bare name\"}\n\nLiteLLM: model group 'bedrock-claude-sonnet-5-5' failed with the error above. No fallback was attempted."}}
HTTP 400

Other Bedrock routes

Commands and output
  1. bedrock/ route, computer toolset
$ curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:24363/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock-route-sonnet-5-5", "max_tokens": 1024, "tools": [{"type": "computer_toolset_20260801"}], "messages": [{"role": "user", "content": "Take a screenshot, then tell me in one sentence what color the screen is."}]}'
{"type":"error","error":{"type":"invalid_request_error","message":"litellm.BadRequestError: BedrockException - {\"message\":\"tools.0.computer_toolset_20260801: name is not accepted on a toolset entry: the member names are fixed by the dated type, and the served tool keeps the family's bare name\"}\n\nLiteLLM: model group 'bedrock-route-sonnet-5-5' failed with the error above. No fallback was attempted."}}
HTTP 400
  1. bedrock/mantle/ computer toolset
$ curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:24363/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "mantle-opus", "max_tokens": 256, "tools": [{"type": "computer_toolset_20260801"}], "messages": [{"role": "user", "content": "Take a screenshot, then tell me in one sentence what color the screen is."}]}'
{"type":"error","error":{"type":"invalid_request_error","message":"litellm.BadRequestError: BedrockException - {\"type\":\"error\",\"request_id\":\"req_hlye3pbfretqpf3un4mknldnme2myfnop3jt473v6ioqkbmn2orq\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"tools.0.computer_toolset_20260801: name is not accepted on a toolset entry: the member names are fixed by the dated type, and the served tool keeps the family's bare name\"}}\n\nLiteLLM: model group 'mantle-opus' failed with the error above. No fallback was attempted."}}
HTTP 400
  1. bedrock_mantle/ computer toolset
$ curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:24363/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bmantle-opus", "max_tokens": 256, "tools": [{"type": "computer_toolset_20260801"}], "messages": [{"role": "user", "content": "Take a screenshot, then tell me in one sentence what color the screen is."}]}'
{"type":"error","error":{"type":"invalid_request_error","message":"litellm.BadRequestError: BedrockException - {\"type\":\"error\",\"request_id\":\"req_4uqmgv442avh7tu2u4dc4pm7bfstttltoslhncna7p6znly54kma\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"tools.0.computer_toolset_20260801: name is not accepted on a toolset entry: the member names are fixed by the dated type, and the served tool keeps the family's bare name\"}}\n\nLiteLLM: model group 'bmantle-opus' failed with the error above. No fallback was attempted."}}
HTTP 400
  1. bedrock/mantle/ second turn
$ curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:24363/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d @second_turn_mantle.json
{"type":"error","error":{"type":"invalid_request_error","message":"litellm.BadRequestError: BedrockException - {\"type\":\"error\",\"request_id\":\"req_hct3syl4fzixjnmljmhwh6tia4g25jxlzstjq2fqj3rsr3r6bp2q\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"tools.0.computer_toolset_20260801: name is not accepted on a toolset entry: the member names are fixed by the dated type, and the served tool keeps the family's bare name\"}}\n\nLiteLLM: model group 'mantle-opus' failed with the error above. No fallback was attempted."}}
HTTP 400

Tools that need or keep a name

Commands and output
  1. Toolset, bash named bash, and a custom tool without a name
$ curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:24363/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock-claude-sonnet-5-5", "max_tokens": 256, "tools": [{"type": "computer_toolset_20260801"}, {"type": "bash_20250124", "name": "bash"}, {"description": "Get the weather for a city", "input_schema": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}}], "messages": [{"role": "user", "content": "Use the weather tool to get the weather in Paris."}]}'
{"type":"error","error":{"type":"invalid_request_error","message":"litellm.BadRequestError: BedrockException - {\"message\":\"tools.0.computer_toolset_20260801: name is not accepted on a toolset entry: the member names are fixed by the dated type, and the served tool keeps the family's bare name\"}\n\nLiteLLM: model group 'bedrock-claude-sonnet-5-5' failed with the error above. No fallback was attempted."}}
HTTP 400
  1. Custom tool sent without a name
$ curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:24363/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock-claude-sonnet-5-5", "max_tokens": 256, "tools": [{"description": "Get the weather for a city", "input_schema": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}}], "messages": [{"role": "user", "content": "Use the tool to get the weather in Paris."}]}'
{"id":"msg_bdrk_7vszowqmx3k4v4zlfcbvky2izgosejthzhfqhfapenzi7lyjz2lq","type":"message","role":"assistant","model":"bedrock-claude-sonnet-5-5","content":[{"type":"tool_use","id":"toolu_bdrk_01UKCpuA7Yhh85EFfELNWdgt","name":"litellm_unnamed_tool_0","input":{"city":"Paris"}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":388,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":59,"output_tokens_details":{"thinking_tokens":0},"service_tier":"standard"},"container":null,"stop_details":null}
HTTP 200
  1. bedrock/mantle/ custom tool sent without a name
$ curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:24363/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "mantle-opus", "max_tokens": 256, "tools": [{"description": "Get the weather for a city", "input_schema": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}}], "messages": [{"role": "user", "content": "Use the tool to get the weather in Paris."}]}'
{"id":"msg_bdrk_hvzn7miag6xpbsm6g2rdm7wlgm7x4kucbdr6yimijtodou2vrrla","type":"message","role":"assistant","model":"mantle-opus","content":[{"type":"tool_use","id":"toolu_bdrk_01WygwdYPVs7w2QR1PGMcC7w","name":"litellm_unnamed_tool_0","input":{"city":"Paris"}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":388,"output_tokens":59,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens_details":{"thinking_tokens":0},"service_tier":"standard"},"container":null,"stop_details":null}
HTTP 200
  1. bash_20250124 sent without a name
$ curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:24363/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock-claude-sonnet-5-5", "max_tokens": 256, "tools": [{"type": "bash_20250124"}], "messages": [{"role": "user", "content": "Run ls."}]}'
{"type":"error","error":{"type":"invalid_request_error","message":"litellm.BadRequestError: BedrockException - {\"message\":\"tools.0.bash_20250124.name: Input should be 'bash'\"}\n\nLiteLLM: model group 'bedrock-claude-sonnet-5-5' failed with the error above. No fallback was attempted."}}
HTTP 400

After (639b9a2)

Anthropic SDK computer toolset loop

  1. Run the program from the sdk directory
$ cd sdk && LITELLM_URL=http://127.0.0.1:23958 SCREENSHOT_B64=blue_screen.b64 node loop.mjs; cd ..
  1. Output
tools[0] {"type":"computer_toolset_20260801","configs":{"key":{"enabled":false},"hold_key":{"enabled":false},"type":{"enabled":false},"cursor_position":{"enabled":false},"mouse_move":{"enabled":false},"left_mouse_down":{"enabled":false},"left_mouse_up":{"enabled":false},"left_click":{"enabled":false},"left_click_drag":{"enabled":false},"right_click":{"enabled":false},"middle_click":{"enabled":false},"double_click":{"enabled":false},"triple_click":{"enabled":false},"scroll":{"enabled":false},"wait":{"enabled":false},"zoom":{"enabled":false}}}
POST /v1/messages tool_result ids [] -> HTTP 400
POST /v1/messages tool_result ids [] -> HTTP 200
tool_use screenshot id toolu_bdrk_01UEnDs6y4wXSqcN6vfnjio6
POST /v1/messages tool_result ids ["toolu_bdrk_01UEnDs6y4wXSqcN6vfnjio6"] -> HTTP 200
text: The screen is a solid, bright blue.

Computer and browser toolsets

Commands and output
  1. Computer toolset
$ curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:23958/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock-claude-sonnet-5-5", "max_tokens": 1024, "tools": [{"type": "computer_toolset_20260801"}], "messages": [{"role": "user", "content": "Take a screenshot, then tell me in one sentence what color the screen is."}]}'
{"id":"msg_bdrk_g65bl5f4icrws4zfxj3sgsju2tixj5227a4mrgosdxbuecqqythq","type":"message","role":"assistant","model":"bedrock-claude-sonnet-5-5","content":[{"type":"tool_use","id":"toolu_bdrk_01XJ5zadDu1X7D4CcRjbRaN1","name":"screenshot","input":{},"toolset_name":"computer"}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":4554,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":59,"output_tokens_details":{"thinking_tokens":0},"service_tier":"standard"},"container":null,"stop_details":null}
HTTP 200
  1. Computer toolset, streaming
$ curl -sS -N -w '\nHTTP %{http_code}\n' http://127.0.0.1:23958/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock-claude-sonnet-5-5", "max_tokens": 1024, "stream": true, "tools": [{"type": "computer_toolset_20260801"}], "messages": [{"role": "user", "content": "Take a screenshot, then tell me in one sentence what color the screen is."}]}' | grep -E '^data: .*(content_block_start|message_delta|error)|^HTTP|"error"'
data: {"type": "content_block_start", "index": 0, "content_block": {"type": "tool_use", "id": "toolu_bdrk_01Kxeqy5SnGEe2BFKXg7uhoK", "name": "screenshot", "input": {}, "toolset_name": "computer"}}
data: {"type": "message_delta", "delta": {"stop_reason": "tool_use", "stop_sequence": null, "stop_details": null, "container": null}, "usage": {"input_tokens": 4554, "cache_creation_input_tokens": 0, "cache_read_input_tokens": 0, "output_tokens": 59, "output_tokens_details": {"thinking_tokens": 0}, "cache_creation": {"ephemeral_5m_input_tokens": 0, "ephemeral_1h_input_tokens": 0}}}
HTTP 200
  1. Browser toolset
$ curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:23958/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock-claude-sonnet-5-5", "max_tokens": 1024, "tools": [{"type": "browser_toolset_20260801"}], "messages": [{"role": "user", "content": "Take a screenshot, then tell me in one sentence what color the screen is."}]}'
{"id":"msg_bdrk_owe43i4e57w6sgf5tbupwrel6igbqojttrpu52t4hegiwc7rq3bq","type":"message","role":"assistant","model":"bedrock-claude-sonnet-5-5","content":[{"type":"tool_use","id":"toolu_bdrk_01JkeMTKAwtvwG4K6k7JyoJZ","name":"screenshot","input":{},"toolset_name":"browser"}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":6635,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":59,"output_tokens_details":{"thinking_tokens":0},"service_tier":"standard"},"container":null,"stop_details":null}
HTTP 200
  1. Browser toolset, streaming
$ curl -sS -N -w '\nHTTP %{http_code}\n' http://127.0.0.1:23958/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock-claude-sonnet-5-5", "max_tokens": 1024, "stream": true, "tools": [{"type": "browser_toolset_20260801"}], "messages": [{"role": "user", "content": "Take a screenshot, then tell me in one sentence what color the screen is."}]}' | grep -E '^data: .*(content_block_start|message_delta|error)|^HTTP|"error"'
data: {"type": "content_block_start", "index": 0, "content_block": {"type": "tool_use", "id": "toolu_bdrk_011wnbALm42pqy7FMh3kke3W", "name": "screenshot", "input": {}, "toolset_name": "browser"}}
data: {"type": "message_delta", "delta": {"stop_reason": "tool_use", "stop_sequence": null, "stop_details": null, "container": null}, "usage": {"input_tokens": 6635, "cache_creation_input_tokens": 0, "cache_read_input_tokens": 0, "output_tokens": 59, "output_tokens_details": {"thinking_tokens": 0}, "cache_creation": {"ephemeral_5m_input_tokens": 0, "ephemeral_1h_input_tokens": 0}}}
HTTP 200

Second turn with the screenshot

Commands and output
  1. Computer toolset, second turn with the screenshot
$ curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:23958/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d @second_turn.json
{"id":"msg_bdrk_xoqy2llo7fsdvurwgquejja2iscjg4apr5jc3injntougi4csyra","type":"message","role":"assistant","model":"bedrock-claude-sonnet-5-5","content":[{"type":"text","text":"The screen is solid blue."}],"stop_reason":"end_turn","stop_sequence":null,"usage":{"input_tokens":4658,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":11,"output_tokens_details":{"thinking_tokens":0},"service_tier":"standard"},"container":null,"stop_details":null}
HTTP 200

Other Bedrock routes

Commands and output
  1. bedrock/ route, computer toolset
$ curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:23958/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock-route-sonnet-5-5", "max_tokens": 1024, "tools": [{"type": "computer_toolset_20260801"}], "messages": [{"role": "user", "content": "Take a screenshot, then tell me in one sentence what color the screen is."}]}'
{"id":"msg_bdrk_rfzohkn5vj255zdudcuted42alkrfdcc4nl5l6462oaey5s6m57a","type":"message","role":"assistant","model":"bedrock-route-sonnet-5-5","content":[{"type":"tool_use","id":"toolu_bdrk_016jxkLRXcqe1Zc2bkwvFdTP","name":"screenshot","input":{},"toolset_name":"computer"}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":4554,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":59,"output_tokens_details":{"thinking_tokens":0},"service_tier":"standard"},"container":null,"stop_details":null}
HTTP 200
  1. bedrock/mantle/ computer toolset
$ curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:23958/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "mantle-opus", "max_tokens": 256, "tools": [{"type": "computer_toolset_20260801"}], "messages": [{"role": "user", "content": "Take a screenshot, then tell me in one sentence what color the screen is."}]}'
{"id":"msg_bdrk_tqsya6lnmfiqcpo4jamcvapi4wr4llhtedezbdzutjjzhzlfobba","type":"message","role":"assistant","model":"mantle-opus","content":[{"type":"tool_use","id":"toolu_bdrk_01CpjdY8oVVnjNJvSUj4hgwt","name":"screenshot","input":{},"toolset_name":"computer"}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":4554,"output_tokens":59,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens_details":{"thinking_tokens":0},"service_tier":"standard"},"container":null,"stop_details":null}
HTTP 200
  1. bedrock_mantle/ computer toolset
$ curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:23958/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bmantle-opus", "max_tokens": 256, "tools": [{"type": "computer_toolset_20260801"}], "messages": [{"role": "user", "content": "Take a screenshot, then tell me in one sentence what color the screen is."}]}'
{"id":"msg_bdrk_x3sp7umqtzi7rcj6uutj2lymofp36265utwk3pz2r5yuuvlxo6jq","type":"message","role":"assistant","model":"bmantle-opus","content":[{"type":"tool_use","id":"toolu_bdrk_01UoPvmSb6EAyqm2JiUbtY7b","name":"screenshot","input":{},"toolset_name":"computer"}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":4554,"output_tokens":59,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens_details":{"thinking_tokens":0},"service_tier":"standard"},"container":null,"stop_details":null}
HTTP 200
  1. bedrock/mantle/ second turn
$ curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:23958/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d @second_turn_mantle.json
{"id":"msg_bdrk_bqlpzwebq56osg2cpdaf5gtsjpmiz5ivojxxmyck5xkzzjftrv6a","type":"message","role":"assistant","model":"mantle-opus","content":[{"type":"text","text":"The screen is solid bright blue."}],"stop_reason":"end_turn","stop_sequence":null,"usage":{"input_tokens":4658,"output_tokens":13,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens_details":{"thinking_tokens":0},"service_tier":"standard"},"container":null,"stop_details":null}
HTTP 200

Tools that need or keep a name

Commands and output
  1. Toolset, bash named bash, and a custom tool without a name
$ curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:23958/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock-claude-sonnet-5-5", "max_tokens": 256, "tools": [{"type": "computer_toolset_20260801"}, {"type": "bash_20250124", "name": "bash"}, {"description": "Get the weather for a city", "input_schema": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}}], "messages": [{"role": "user", "content": "Use the weather tool to get the weather in Paris."}]}'
{"id":"msg_bdrk_rbap4atdajjra3qc67s6bjluxbhtxu7ods4f43xobvxexi3pbcpa","type":"message","role":"assistant","model":"bedrock-claude-sonnet-5-5","content":[{"type":"tool_use","id":"toolu_bdrk_01NXFaD4K2spUnHvysGtGp66","name":"litellm_unnamed_tool_2","input":{"city":"Paris"}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":4951,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":59,"output_tokens_details":{"thinking_tokens":0},"service_tier":"standard"},"container":null,"stop_details":null}
HTTP 200
  1. Custom tool sent without a name
$ curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:23958/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock-claude-sonnet-5-5", "max_tokens": 256, "tools": [{"description": "Get the weather for a city", "input_schema": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}}], "messages": [{"role": "user", "content": "Use the tool to get the weather in Paris."}]}'
{"id":"msg_bdrk_pmoptvims4ulkztlhtwnjq3u57dezxuc4mgxyfexocjb752gzfma","type":"message","role":"assistant","model":"bedrock-claude-sonnet-5-5","content":[{"type":"tool_use","id":"toolu_bdrk_01R1vmND9jqoziLiLp5gfcUp","name":"litellm_unnamed_tool_0","input":{"city":"Paris"}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":388,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":59,"output_tokens_details":{"thinking_tokens":0},"service_tier":"standard"},"container":null,"stop_details":null}
HTTP 200
  1. bedrock/mantle/ custom tool sent without a name
$ curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:23958/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "mantle-opus", "max_tokens": 256, "tools": [{"description": "Get the weather for a city", "input_schema": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}}], "messages": [{"role": "user", "content": "Use the tool to get the weather in Paris."}]}'
{"id":"msg_bdrk_j5kkflnf2tdxs7df5nxtqqg5uafj7e3d3o6flsfdur2fzgj5qlba","type":"message","role":"assistant","model":"mantle-opus","content":[{"type":"tool_use","id":"toolu_bdrk_01HiztorEU9fwez8DMHWBDuc","name":"litellm_unnamed_tool_0","input":{"city":"Paris"}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":388,"output_tokens":59,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens_details":{"thinking_tokens":0},"service_tier":"standard"},"container":null,"stop_details":null}
HTTP 200
  1. bash_20250124 sent without a name
$ curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:23958/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock-claude-sonnet-5-5", "max_tokens": 256, "tools": [{"type": "bash_20250124"}], "messages": [{"role": "user", "content": "Run ls."}]}'
{"type":"error","error":{"type":"invalid_request_error","message":"litellm.BadRequestError: BedrockException - {\"message\":\"tools.0.bash_20250124.name: Field required\"}\n\nLiteLLM: model group 'bedrock-claude-sonnet-5-5' failed with the error above. No fallback was attempted."}}
HTTP 400

Notes from the QA run

  • The SDK's first call requests a thread and gets 400
    • Main refuses Bedrock threads, and this PR leaves that alone
  • A nameless bash_20250124 still answers 400
    • This PR changes it to Bedrock's own Field required

Type

🐛 Bug Fix

Caveats (if any)

High

Low

  • /chat/completions still can't take a toolset for Claude on Bedrock Invoke
    • It fails loudly on main too, and that route is tracked as its own follow-up

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR
Decisions
  1. Which tools get the placeholder name. I chose only custom tools (no type, or type: "custom"). The alternatives were skipping only *_toolset_* types, which would still put a wrong name on a dated tool like bash_20250124 (Bedrock wants exactly bash there), or filling each dated tool's fixed name, which needs a type-to-name map that drifts and is a feature nobody asked for. A typed tool without a name now reaches Bedrock as sent, so Bedrock's own error names the missing field, the same as Anthropic
  2. No base PR. No open PR fixes this, and the chat completions toolset work is a separate route
  3. Where the fix lives. Main serves Bedrock Invoke /v1/messages from the Rust transform, and the Python bridge runs the Python helper on the tools first. So both copies change, since either one alone still names the toolset and the route still answers 400. Both Mantle routes share that Rust transform, so the same change fixes them
Bugbot summary

[!NOTE]
Medium Risk
Changes in-request tool normalization on every Bedrock Invoke/Mantle messages call; scope is narrow and covered by tests, but wrong custom/typed classification could break tool-heavy agents.

Overview
Fixes Bedrock Invoke /v1/messages (and the matching Rust transform used by Invoke and Mantle) so litellm_unnamed_tool_{index} is added only to custom tools—entries with no type or type: "custom" and a missing/blank name.

Typed tools are no longer auto-named, which unblocks computer/browser toolsets and other dated Anthropic tool types that Bedrock rejects when given an extra name (e.g. name is not accepted on a toolset entry). Nameless custom tools still get a placeholder so Bedrock’s tools.*.custom.name: Field required check is satisfied; tools like bash_20250124 without the required fixed name are left unchanged so Bedrock returns its own validation error.

Python (ensure_bedrock_anthropic_messages_tool_names in common_utils.py) and Rust (is_custom_tool + the same helper) stay in sync; unit tests cover mixed tool lists on both sides.

Reviewed by Cursor Bugbot for commit 009fe7b. Bugbot is set up for automated code reviews on this repo. Configure here.

…so toolset entries reach Claude

A computer_toolset or browser_toolset entry carries no name, and Bedrock
refuses any name on one, so the placeholder name LiteLLM added for nameless
tools turned every toolset request into a 400. Only custom tools get the
placeholder now. Typed tools pass through as the caller sent them.
@veria-ai

veria-ai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

PR overview

No security issues were found in this pull request.

Reviews

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@greptile-apps

greptile-apps Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with both previous findings addressed and no new actionable issues.

Summary

The PR limits placeholder names to unnamed custom tools in both Python and Rust. Typed tools keep their original names, or remain nameless, on Bedrock Invoke and Mantle requests.

Both numbered findings are addressed. The only change since the previous review switches the Rust test to #[rstest]. No new actionable issues were found.

  • Bedrock Claude requests name only unnamed custom tools.

Reviews (5) · Last reviewed commit: "test(bedrock): use rstest for the custom..." · Reviewed by Greptile

@codspeed

codspeed Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

1 warning

⚠️ 2 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 44 untouched benchmarks


Comparing norkelbyte:litellm_bedrock_messages_toolset_no_name (dce672a) with main (8ef451a)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (5849906) during the generation of this report, so 8ef451a was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@codecov

codecov Bot commented Nov 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@norkelbyte norkelbyte closed this Nov 14, 2026
@norkelbyte

Copy link
Copy Markdown
Contributor Author

Closed to free an open-PR slot. Branch kept, and it reopens for final CI and bot reviews once ready

…essages transform

Main now serves Bedrock invoke /v1/messages from Rust, whose port of
ensure_bedrock_anthropic_messages_tool_names still named every unnamed tool,
so toolset entries kept getting litellm_unnamed_tool_N and Bedrock answered 400
@norkelbyte norkelbyte reopened this Nov 24, 2026
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 009fe7b. Configure here.

@mateo-berri mateo-berri left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mateo-berri
mateo-berri merged commit d8f6963 into BerriAI:main Nov 24, 2026
74 checks passed
mateo-berri added a commit to izzybn/litellm that referenced this pull request Nov 24, 2026
Hand-ported from 310c961 (BerriAI#48893), which is not on
lts/1.108.x. Only the _TOOL_ITEMS_ADAPTER and _is_str_keyed_dict helpers and the
TypeIs import come over, since the backport of BerriAI#51756 calls them. No behavior
changes on its own.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants