The existing actor-selection logic in several E2E suite setups checked only
whether OPENAI_API_KEY was present (non-empty). A valid key that has hit its
quota limit passes that check but fails at runtime with HTTP 429, causing the
test to fail even though Anthropic credits are available.
Changes:
- Add robot/e2e/check_openai_key.py: stdlib-only (urllib.request) script that
sends a minimal chat-completion request ('Hi', max_tokens=1, gpt-4o-mini) to
the OpenAI API. Exits 0 on HTTP 200; exits 1 for quota (429), auth (401),
network errors, or any other failure.
- Add 'Resolve LLM Actor' keyword to robot/e2e/common_e2e.resource: runs the
probe script via ${PYTHON} and returns the openai_model argument (default
openai/gpt-4o) on success, or the anthropic_model argument (default
anthropic/claude-sonnet-4-20250514) on failure. Skips the probe entirely when
OPENAI_API_KEY is not set.
- Update m6_acceptance.robot, wf04_multi_project.robot, wf05_db_migration.robot,
wf07_cicd.robot, and wf16_devcontainer.robot to use 'Resolve LLM Actor'
instead of the inline has_openai boolean check.
No production source code (src/) is modified. The decision to fall back to
Anthropic is made once per suite setup, before any test runs.
Closes#10198