mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-15 23:31:29 +00:00
test(rust): add Bedrock messages streaming e2e
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
37dc8cfcb3
commit
0dc3f9dcd5
1 changed files with 18 additions and 0 deletions
|
|
@ -18,3 +18,21 @@ async def test_bedrock_messages_with_rust() -> None:
|
|||
|
||||
assert response["content"][0]["text"]
|
||||
assert response["_hidden_params"]["additional_headers"]["x-litellm-rust"] == "true"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bedrock_messages_streaming_with_rust() -> None:
|
||||
response = await litellm.anthropic.messages.acreate(
|
||||
model="bedrock/us.anthropic.claude-sonnet-4-5-20250929-v1:0",
|
||||
messages=[{"role": "user", "content": "Say hello"}],
|
||||
max_tokens=20,
|
||||
stream=True,
|
||||
api_key=os.getenv("AWS_BEARER_TOKEN_BEDROCK"),
|
||||
aws_region_name="us-west-2",
|
||||
rust=True,
|
||||
)
|
||||
|
||||
chunks = [chunk async for chunk in response]
|
||||
|
||||
assert chunks
|
||||
assert response._hidden_params["additional_headers"]["x-litellm-rust"] == "true"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue