feat: multi-provider model support, SARIF output, and exploit-mode fixes (#402)

* feat(worker): record token, cache, and turn usage per agent

* feat: replace model tiers with a single SHANNON_AI_MODEL across five providers

* feat(cli): rebuild the setup wizard for provider and model selection

* docs: document single-model selection and supported providers

* feat(worker): use chat completions for OpenAI behind a custom base URL

* feat: add SHANNON_AI_OPENAI_FORMAT to pick the wire API for OpenAI gateways

* refactor(cli): drop endpoint path hints from the gateway format picker

* feat(worker): enable pi in-session provider retry with retry-after backoff

* refactor(worker): hand provider error classification to pi and drop the Anthropic ladders

* refactor: remove the subscription retry preset and pipeline config section

* fix(worker): validate Bedrock credentials with the same live probe as other providers

* feat(worker): render the report from structured findings instead of agent-written markdown

* fix(worker): dispose the credential probe session on every path

* fix(worker): refuse to replace the assembled report with an empty one

* refactor(worker): catch post-processing throws across the whole finalization block

* revert(worker): drop the report zero-findings guard

* docs(worker): correct the retry split and Bedrock credential claims

* docs: regenerate llms-full.txt from current sources

* feat(cli): build and run the npx flow from a clone

* refactor(cli): flatten the setup summary output

* feat(cli): reject runs with more than one provider configured

* fix(worker): say a rejected bash call never ran

* chore(cli): drop grok-4.3 and gpt-5.6-luna from the setup suggestions

* feat(worker): capture structured finding locations for SARIF output

* fix(worker): enumerate queue confidence so the report inherits it verbatim

* feat(worker): give the reporting phase a mode-specific output schema

* feat(worker): emit a SARIF 2.1.0 log for exploitative runs

* fix(worker): correct SARIF locations and defer fingerprinting to the upload action

* fix(worker): drop the confidence suffix from the analysis-mode summary list

* feat(worker): give exploit findings a dedicated code location field

* feat(worker): carry structured code locations from the vuln queue to the report

* fix(worker): join code locations from the vuln queue instead of re-asking agents

* fix(worker): spell out the finding_id to category mapping in the tool schema

* feat: drop Google/Gemini as a supported AI provider

* fix(worker): stop asking the report agent for code locations

* docs: correct the provider list and drop the removed rate-limit settings

* docs: add provider cyber safeguards and suggested models per provider

* docs: document the SARIF output and the report rating thresholds
This commit is contained in:
ezl-keygraph
2026-07-30 19:31:52 +05:30
committed by GitHub
parent 30a12114ae
commit 1ce250d6a5
69 changed files with 3225 additions and 1471 deletions
+35 -38
View File
@@ -1,46 +1,43 @@
# Shannon Environment Configuration
# Copy this file to .env and fill in your credentials
# Copy to .env and uncomment one provider block.
# SHANNON_AI_MODEL is <provider>:<model-id>, split on the first colon.
# Defaults to anthropic:claude-sonnet-4-6.
# Adaptive thinking is enabled automatically on Opus 4.6/4.7/4.8. Set to false to disable.
# CLAUDE_ADAPTIVE_THINKING=false
# Shannon forwards your machine's /etc/hosts entries into the worker container. Set to false to disable.
# SHANNON_FORWARD_HOSTS=false
# =============================================================================
# OPTION 1: Direct Anthropic
# =============================================================================
# --- Anthropic ---------------------------------------------------------------
ANTHROPIC_API_KEY=your-api-key-here
# OR use OAuth token instead
SHANNON_AI_MODEL=anthropic:claude-sonnet-4-6
# CLAUDE_CODE_OAUTH_TOKEN=your-oauth-token-here
# =============================================================================
# OPTION 2: Custom Base URL (compatible proxies, gateways, etc.)
# =============================================================================
# Point the agent at an alternative Anthropic-compatible endpoint.
# ANTHROPIC_BASE_URL=https://your-proxy.example.com
# ANTHROPIC_AUTH_TOKEN=your-auth-token # Auth token for the custom endpoint
# --- OpenAI ------------------------------------------------------------------
# OPENAI_API_KEY=your-api-key-here
# SHANNON_AI_MODEL=openai:gpt-5.6-sol
# =============================================================================
# Model Tier Overrides (Anthropic API / OAuth / Custom Base URL / Bedrock)
# =============================================================================
# Override which model is used for each tier. Defaults are used if not set.
# Optional for direct Anthropic and custom base URL modes. Required for Bedrock.
# ANTHROPIC_SMALL_MODEL=... # Small tier (default: claude-haiku-4-5-20251001)
# ANTHROPIC_MEDIUM_MODEL=... # Medium tier (default: claude-sonnet-4-6)
# ANTHROPIC_LARGE_MODEL=... # Large tier (default: claude-opus-4-8)
# --- xAI ---------------------------------------------------------------------
# XAI_API_KEY=your-api-key-here
# SHANNON_AI_MODEL=xai:grok-4.5
# =============================================================================
# OPTION 3: AWS Bedrock
# =============================================================================
# https://aws.amazon.com/blogs/machine-learning/accelerate-ai-development-with-amazon-bedrock-api-keys/
# Requires the model tier overrides above to be set with Bedrock-specific model IDs.
# Example Bedrock model IDs for us-east-1:
# ANTHROPIC_SMALL_MODEL=us.anthropic.claude-haiku-4-5-20251001-v1:0
# ANTHROPIC_MEDIUM_MODEL=us.anthropic.claude-sonnet-4-6
# ANTHROPIC_LARGE_MODEL=us.anthropic.claude-opus-4-8
# CLAUDE_CODE_USE_BEDROCK=1
# --- AWS Bedrock -------------------------------------------------------------
# Bearer token only; model must be enabled in your region.
# AWS_REGION=us-east-1
# AWS_BEARER_TOKEN_BEDROCK=your-bearer-token
# SHANNON_AI_MODEL=amazon-bedrock:us.anthropic.claude-opus-4-8
# --- Custom Base URL ---------------------------------------------------------
# Route through a proxy or gateway (LiteLLM, an internal endpoint).
# Pick the block matching the API dialect your gateway speaks, and uncomment all
# three lines. The provider prefix picks the dialect and which key is sent; the
# model id is whatever name your gateway serves it under.
# Anthropic compatible - Anthropic Messages:
# ANTHROPIC_API_KEY=your-gateway-key-here
# SHANNON_AI_BASE_URL=https://llm-gateway.example.com
# SHANNON_AI_MODEL=anthropic:claude-sonnet-4-6
# OpenAI compatible - Chat Completions (default) or Responses:
# OPENAI_API_KEY=your-gateway-key-here
# SHANNON_AI_BASE_URL=https://llm-gateway.example.com/v1
# SHANNON_AI_MODEL=openai:gpt-5.6-sol
# SHANNON_AI_OPENAI_FORMAT=responses
# --- Other -------------------------------------------------------------------
# Forward /etc/hosts entries into the worker container.
# SHANNON_FORWARD_HOSTS=false