mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-15 09:12:18 +00:00
test(integration): wait for the sentinel key soft budget alert instead of taking its first alert
Some checks are pending
Cost map pins recheck / rerun-cost-map-guard (push) Waiting to run
LiteLLM Rust DB / db-queries (push) Waiting to run
LiteLLM Rust / rust-lint (push) Waiting to run
LiteLLM Rust / rust-test (push) Waiting to run
LiteLLM Rust / rust-wheel (push) Waiting to run
Terraform Modules / fmt, validate, test (aws) (push) Waiting to run
Terraform Modules / fmt, validate, test (gcp) (push) Waiting to run
Terraform Provider / gofmt, vet, build, test (push) Waiting to run
Terraform Provider / Provider endpoints vs proxy OpenAPI schema (push) Waiting to run
Some checks are pending
Cost map pins recheck / rerun-cost-map-guard (push) Waiting to run
LiteLLM Rust DB / db-queries (push) Waiting to run
LiteLLM Rust / rust-lint (push) Waiting to run
LiteLLM Rust / rust-test (push) Waiting to run
LiteLLM Rust / rust-wheel (push) Waiting to run
Terraform Modules / fmt, validate, test (aws) (push) Waiting to run
Terraform Modules / fmt, validate, test (gcp) (push) Waiting to run
Terraform Provider / gofmt, vet, build, test (push) Waiting to run
Terraform Provider / Provider endpoints vs proxy OpenAPI schema (push) Waiting to run
This commit is contained in:
parent
6d6e4b7167
commit
4d1e464bbb
1 changed files with 5 additions and 2 deletions
|
|
@ -235,8 +235,11 @@ def alerts_once_a_later_key_alert_lands(
|
|||
"""Alerts naming a watched id, read after a key soft budget alert sent later has reached the sink."""
|
||||
alias: Final = f"sentinel-{uuid.uuid4().hex}"
|
||||
gateway.chat(model, key=scenario.key(key_alias=alias, soft_budget=SOFT_BUDGET, spend=SPEND))
|
||||
(sentinel, *_) = alerts_naming(alerts, alias)
|
||||
assert "Soft Budget Crossed" in slack_text(sentinel), sentinel
|
||||
eventually(
|
||||
lambda: alerts.naming(alias),
|
||||
lambda found: any("Soft Budget Crossed" in slack_text(body) for body in found),
|
||||
seconds=ALERT_SECONDS,
|
||||
)
|
||||
return tuple(body for body in alerts.bodies() if any(marker in body for marker in watched))
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue