diff --git a/.github/workflows/agent-e2e.yml b/.github/workflows/agent-e2e.yml index 068d03af..b24e0fd2 100644 --- a/.github/workflows/agent-e2e.yml +++ b/.github/workflows/agent-e2e.yml @@ -33,8 +33,41 @@ jobs: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} CONDUCTOR_SERVER_URL: http://localhost:8080/api - CONDUCTOR_AGENT_LLM_MODEL: openai/gpt-4o-mini + # Default model for every suite. The Orkes-Developers OpenAI project only + # allows the gpt-5.6 / gpt-6 families; gpt-6-luna is OpenAI's replacement + # for gpt-4o-mini, which shuts down on 2027-01-14. + CONDUCTOR_AGENT_LLM_MODEL: openai/gpt-6-luna + SKIP_IMAGE_GEN: 'true' # gpt-image-* models are not enabled in the Orkes-Developers OpenAI project steps: + # A dead key, exhausted quota, retired model or provider outage makes + # every agent test wait out its timeout — the job then hits timeout-minutes + # before the runner reports a single failure. Call the model the suites use + # directly, before any setup: the HTTP status and body name the cause in + # seconds. No suite calls Anthropic through the server, so only OpenAI is + # checked. + - name: LLM provider check + timeout-minutes: 1 + run: | + fail=0 + probe() { # label, url, curl args... + local label=$1 url=$2; shift 2 + local code + code=$(curl -sS -m 15 -o "$RUNNER_TEMP/probe.json" -w '%{http_code}' "$url" "$@" \ + -H 'content-type: application/json') || true + echo "$label: HTTP $code" + if [ "$code" != 200 ]; then + echo "::error::$label check failed (HTTP $code; 000 = no response in 15s)" + cat "$RUNNER_TEMP/probe.json" 2>/dev/null || true; echo + fail=1 + fi + } + # Responses API, as the server uses; 16 is its minimum max_output_tokens. + openai_model=${CONDUCTOR_AGENT_LLM_MODEL#openai/} + probe "OpenAI $openai_model" https://api.openai.com/v1/responses \ + -H "authorization: Bearer $OPENAI_API_KEY" \ + -d "{\"model\":\"$openai_model\",\"input\":\"ping\",\"max_output_tokens\":16,\"reasoning\":{\"effort\":\"none\"}}" + exit $fail + - uses: actions/checkout@v4 - uses: actions/setup-dotnet@v4 @@ -90,6 +123,16 @@ jobs: --logger "trx;LogFileName=agent-e2e.trx" \ --results-directory results + # The uploaded server.log is lost when the run is re-run, and a run + # killed at timeout-minutes never reports its test failures — keep the + # server's own errors in the job log, which survives both. + - name: Show server errors + if: failure() || cancelled() + run: | + [ -f server.log ] || exit 0 + grep -nE ' (ERROR|WARN) |Exception|[Qq]uota|rate.?limit|\b(401|403|404|429)\b' server.log \ + | grep -vE 'cannot init (Cohere|Mistral)' | tail -150 || true + # A dead/unhealthy server makes every [SkippableFact] skip silently — that # must never read as green. Fail on 0 executed or server-unreachable skips. # Shared verbatim with the released bundle (package-e2e-bundle.sh copies diff --git a/Conductor.AI.E2eTests/Suite15_MediaTools.cs b/Conductor.AI.E2eTests/Suite15_MediaTools.cs index 18892007..bc17e1e5 100644 --- a/Conductor.AI.E2eTests/Suite15_MediaTools.cs +++ b/Conductor.AI.E2eTests/Suite15_MediaTools.cs @@ -164,6 +164,10 @@ public async Task ImageGeneration_OpenAI_TaskCompletes() _fixture.RequireServer(); Skip.If(string.IsNullOrEmpty(Environment.GetEnvironmentVariable("OPENAI_API_KEY")), "OPENAI_API_KEY not set — skipping live image generation test."); + Skip.If(string.Equals(Environment.GetEnvironmentVariable("SKIP_IMAGE_GEN"), "true", + StringComparison.OrdinalIgnoreCase), + "gpt-image-1 is not enabled in the Orkes-Developers OpenAI project " + + "(gpt-image-* models are not on its allowlist)"); var agent = new Agent("s15_image_openai_rt") {