Skip to content

Threat detection is hardcoded to Copilot; cannot run on BYOK engines (OpenRouter/pi) #78414

Backlog

Description

@jansdhillon

Problem

The agent (inference) engine can be swapped to a BYOK provider — e.g. the pi engine against OpenRouter with a vendored model id — but the threat-detection job cannot follow. Two layers force it back to Copilot:

  1. getThreatDetectionEngineID (pkg/workflow/threat_detection_external.go) normalizes a non-Copilot detection engine back to Copilot. Setting threat-detection.engine: pi is silently overridden.
  2. The external threat-detect binary rejects non-Copilot engines, so even if the engine id were honored, the job fails.

Net effect: a workflow that runs its agent on OpenRouter (or any non-Copilot engine) still needs a Copilot token (COPILOT_GITHUB_TOKEN) solely to keep the threat-detection job alive. Teams that have moved inference off Copilot entirely cannot drop that dependency.

Request

Allow threat detection to run on a configurable BYOK engine the same way the agent engine can — accept threat-detection.engine: pi (and an OpenAI-compatible model-provider / base URL) and route the threat-detect step through it instead of forcing Copilot.

Context

  • gh-aw v1.3.0
  • Agent engine: engine: { id: pi, model: openrouter/<vendor>/<model>, model-provider: openai } with OPENAI_BASE_URL=https://openrouter.ai/api/v1 works for inference.
  • Detection pinned with threat-detection.engine: copilot as the only working option today.

Related: #75276 (threat detection cannot run on an imported engine definition) — adjacent, but that covers imported definitions, not BYOK provider routing.

Activity

  1. locked and limited conversation to collaborators on Nov 16, 2026
  2. unlocked this conversation on Nov 16, 2026
  3. added
    backlog:runners-tools
    on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions