3ce5614254
Test / pytest (ubuntu-latest, 3.11) (pull_request) Has been cancelled
Build / build (pull_request) Has been cancelled
Docker / build (pull_request) Has been cancelled
Lint / ruff (pull_request) Has been cancelled
Test / pytest (ubuntu-latest, 3.12) (pull_request) Has been cancelled
Test / pytest (windows-latest, 3.11) (pull_request) Has been cancelled
Test / pytest (windows-latest, 3.12) (pull_request) Has been cancelled
14 lines
445 B
Python
14 lines
445 B
Python
from EvoScientist.llm.errors import AgentControlError
|
|
from EvoScientist.middleware.model_fallback import _is_non_fallbackable
|
|
|
|
|
|
def test_agent_control_error_is_non_fallbackable():
|
|
error = AgentControlError(
|
|
"INSUFFICIENT_BALANCE",
|
|
"balance unavailable",
|
|
status_code=403,
|
|
)
|
|
|
|
assert "platform control error" in (_is_non_fallbackable(error) or "")
|
|
assert error.model_dump()["code"] == "INSUFFICIENT_BALANCE"
|