mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-16 06:23:09 +00:00
fix(bedrock_httpx.py): fix error code for not found provider/model combo to be 404
This commit is contained in:
@@ -1055,8 +1055,8 @@ class BedrockLLM(BaseLLM):
|
||||
},
|
||||
)
|
||||
raise BedrockError(
|
||||
status_code=400,
|
||||
message="Bedrock HTTPX: Unsupported provider={}, model={}".format(
|
||||
status_code=404,
|
||||
message="Bedrock HTTPX: Unknown provider={}, model={}".format(
|
||||
provider, model
|
||||
),
|
||||
)
|
||||
|
||||
@@ -1159,8 +1159,8 @@ def test_bedrock_tools_pt_invalid_names():
|
||||
assert result[1]["toolSpec"]["name"] == "another_invalid_name"
|
||||
|
||||
|
||||
def test_bad_request_error():
|
||||
with pytest.raises(litellm.BadRequestError):
|
||||
def test_not_found_error():
|
||||
with pytest.raises(litellm.NotFoundError):
|
||||
completion(
|
||||
model="bedrock/bad_model",
|
||||
messages=[
|
||||
|
||||
Reference in New Issue
Block a user