From 85a01f064d289aa24025602e654703d8b6572bcd Mon Sep 17 00:00:00 2001 From: Kevin Backhouse Date: Tue, 10 Feb 2026 21:10:10 +0000 Subject: [PATCH] Add GITHUB_TOKEN as another fallback option. --- src/seclab_taskflow_agent/capi.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/seclab_taskflow_agent/capi.py b/src/seclab_taskflow_agent/capi.py index 7f29b63..ececb9f 100644 --- a/src/seclab_taskflow_agent/capi.py +++ b/src/seclab_taskflow_agent/capi.py @@ -46,13 +46,16 @@ def get_AI_endpoint(): def get_AI_token(): """ Get the token for the AI API from the environment. - The environment variable can be named either AI_API_TOKEN - or COPILOT_TOKEN. + The environment variable can be named either AI_API_TOKEN, + COPILOT_TOKEN, or GITHUB_TOKEN. """ token = os.getenv("AI_API_TOKEN") if token: return token token = os.getenv("COPILOT_TOKEN") + if token: + return token + token = os.getenv("GITHUB_TOKEN") if token: return token raise RuntimeError("AI_API_TOKEN environment variable is not set.")