Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions e2e/test_suite1_basic_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,18 +360,13 @@ def _judge_call_anthropic(model: str, system: str, user: str) -> str:
)

client = anthropic.Anthropic() # reads ANTHROPIC_API_KEY from env
try:
response = client.messages.create(
model=model,
max_tokens=1024,
system=system,
messages=[{"role": "user", "content": user}],
temperature=0,
)
except anthropic.BadRequestError as exc:
if "reached your specified api usage limits" in str(exc).lower():
pytest.skip("Anthropic API usage budget is exhausted")
raise
response = client.messages.create(
model=model,
max_tokens=1024,
system=system,
messages=[{"role": "user", "content": user}],
temperature=0,
)
return response.content[0].text.strip()


Expand Down
6 changes: 0 additions & 6 deletions e2e/test_suite25_media_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,6 @@ def test_without_media_token_is_absent(self, runtime, key_env, model_id):

result = runtime.run(agent, READ_PROMPT, timeout=TIMEOUT)

if (
result.error
and "reached your specified api usage limits" in result.error.lower()
):
pytest.skip("Anthropic API usage budget is exhausted")

assert result.status == "COMPLETED", (
f"no-media run did not complete: status={result.status} "
f"execution_id={result.execution_id}"
Expand Down
Loading