Fireworks AI Integration
Learn how to connect Fireworks AI's blazing-fast inference platform to ScanDrix for deep AST code reviews.
Fireworks AI is an ultra-fast inference platform for open-weights generative AI, providing serverless and dedicated access to state-of-the-art models like Llama 3.3, DeepSeek V3/R1, Qwen 2.5, and Mixtral. Built with custom compiler optimizations and high-throughput serving, Fireworks AI paired with ScanDrix delivers instant code reviews and taint-tracking analysis.
Recommended models
We recommend high-context coding and reasoning models with strong instruction-following capabilities:
| Model | Context Window | Speed | Best For |
|---|---|---|---|
accounts/fireworks/models/llama-v3p3-70b-instruct recommended | 131k tokens | 140+ tps | Standard PR reviews, syntax analysis & AST linting |
accounts/fireworks/models/deepseek-v3 | 128k tokens | 120+ tps | Deep semantic security analysis & taint propagation |
accounts/fireworks/models/deepseek-r1 | 128k tokens | 80+ tps | Mathematical proofs, cryptography & complex concurrency |
accounts/fireworks/models/qwen2p5-coder-32b-instruct | 131k tokens | 180+ tps | Specialized multi-language coding & patch generation |
For the most up-to-date model identifiers and context limits, consult the Fireworks AI Models Catalog.
Creating an API Key
A verified Fireworks AI account is required to generate API credentials.
- Navigate to the Fireworks AI Console.
- Sign in or create an account.
- Select API Keys in your account settings.
- Click Create API Key, label it
scandrix-code-review, and copy the secret key (fw_...).
New Fireworks AI accounts receive $1 in free credits upon registration.
Configuration options
You can configure Fireworks AI either via the ScanDrix dashboard, in your repository's .scandrix.yaml, or in self-hosted backend environment variables.
Option 1: Via the ScanDrix Dashboard (Recommended for SaaS)
- Open the ScanDrix dashboard and navigate to Settings → AI Providers.
- Click Add Provider and select Fireworks AI (or Generic OpenAI-Compatible).
- Set Base URL to
https://api.fireworks.ai/inference/v1. - Paste your Fireworks API Key (
fw_...). - Select
accounts/fireworks/models/llama-v3p3-70b-instructas your default review model. - Click Test Connection to send a synthetic health verification ping.
Option 2: Via Repository Config (.scandrix.yaml)
To enforce Fireworks AI as the review engine for a specific repository:
# .scandrix.yaml
version: 1
ai:
provider: fireworks
endpoint: "https://api.fireworks.ai/inference/v1"
model: "accounts/fireworks/models/llama-v3p3-70b-instruct"
api_key: "env:FIREWORKS_API_KEY"
temperature: 0.1
max_tokens: 4096
review:
severity_threshold: warning
patch_suggestions: true
Option 3: Via Self-Hosted Backend (.env)
If deploying the self-hosted ScanDrix Go backend, configure your environment file:
# ScanDrix Core Service Configuration
PORT=8080
SCANDRIX_API_URL=https://api.scandrix.yourdomain.com
SCANDRIX_WEB_URL=https://scandrix.yourdomain.com
# Database Connection (PostgreSQL 16+)
DATABASE_URL=postgres://scandrix:yourpassword@postgres:5432/scandrix?sslmode=require
# Fireworks AI LLM Configuration
SCANDRIX_LLM_PROVIDER=fireworks
OPENAI_BASE_URL=https://api.fireworks.ai/inference/v1
OPENAI_API_KEY=fw_your_fireworks_api_key_here
SCANDRIX_DEFAULT_MODEL=accounts/fireworks/models/llama-v3p3-70b-instruct
# Webhook Secret for HMAC verification
GITHUB_WEBHOOK_SECRET=your_github_webhook_secret
Production Reverse Proxy Setup
For self-hosted instances with external Git webhooks, configure Nginx to forward requests to the Next.js frontend (port 3000) and the Go backend API (port 8080):
# ScanDrix Web Dashboard (port 3000)
server {
listen 443 ssl http2;
server_name scandrix.yourdomain.com;
ssl_certificate /etc/letsencrypt/live/scandrix.yourdomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/scandrix.yourdomain.com/privkey.pem;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
# ScanDrix Go API & Webhooks (port 8080)
server {
listen 443 ssl http2;
server_name api.scandrix.yourdomain.com;
ssl_certificate /etc/letsencrypt/live/api.scandrix.yourdomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/api.scandrix.yourdomain.com/privkey.pem;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Verifying Fireworks AI integration
Verify that Fireworks AI is processing review jobs:
# Test local review via CLI
scandrix review --staged
# Or inspect worker container logs
docker logs scandrix-worker | grep -i "fireworks"
Expected log output:
[INFO] provider=fireworks model=accounts/fireworks/models/llama-v3p3-70b-instruct latency=910ms tokens=1840 status=200