10000 Update test_model_vllm.py · strands-agents/sdk-python@624e5cb · GitHub
[go: up one dir, main page]

Skip to content

Commit 624e5cb

Browse files
Update test_model_vllm.py
Fixed for new code
1 parent 086e6f5 commit 624e5cb

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

tests-integ/test_model_vllm.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
@pytest.fixture
88
def model():
99
return VLLMModel(
10-
model_id="meta-llama/Llama-3.2-3B", # or whatever your model ID is
11-
host="http://localhost:8000", # adjust as needed
10+
model_id="Qwen/Qwen3-4B",
11+
host="http://localhost:8000",
1212
max_tokens=128,
1313
)
1414

@@ -32,7 +32,14 @@ def agent(model, tools):
3232

3333

3434
def test_agent(agent):
35-
result = agent("What is the time and weather in Melboune Australia?")
36-
text = result.message["content"][0]["text"].lower()
35+
# Send prompt
36+
result = agent("What is the time and weather in Melbourne Australia?")
3737

38-
assert all(string in text for string in ["3:00", "cloudy"])
38+
# Extract plain text from the first content block
39+
text_blocks = result.message.get("content", [])
40+
# content is a list of dicts with 'text' keys
41+
text = " ".join(block.get("text", "") for block in text_blocks).lower()
42+
43+
# Assert that the tool outputs appear in the generated response text
44+
assert "12:00" in text
45+
assert "cloudy" in text

0 commit comments

Comments
 (0)
0