Overview
Beacon supports multiple AI providers for generating AGENTS.md files. Each provider offers different tradeoffs in terms of cost, quality, and speed. This guide helps you choose the right provider and manage API keys securely.Supported Providers
Gemini 2.5 Flash
Default provider
- Fast and cost-effective
- Native JSON output support
- Best for most use cases
Claude Sonnet 4.5
- Highest quality analysis
- Better at complex codebases
- More expensive per run
OpenAI GPT-4o
- Balanced quality and speed
- Structured JSON responses
- Wide model availability
Beacon Cloud
- No API key required
- Pay-per-run with USDC
- $0.09 per generation
Provider Configuration
Setting API Keys
Choose your provider
Decide which AI provider you want to use based on your needs:
- Gemini: Best default choice (free tier available)
- Claude: When you need the highest quality
- OpenAI: If you already have OpenAI credits
- Beacon Cloud: No API key management needed
Key Resolution Priority
Beacon resolves API keys in the following order (fromsrc/inferrer.rs:243):
- CLI flag:
--api-keyargument - Environment variable:
GEMINI_API_KEY,CLAUDE_API_KEY, orOPENAI_API_KEY - Error: If neither is found, Beacon will fail with a helpful message
Provider Comparison
Cost Analysis
| Provider | Model | Approx. Cost per Run | Free Tier |
|---|---|---|---|
| Gemini | 2.5 Flash | ~$0.002 | ✅ 1500/day |
| Claude | Sonnet 4.5 | ~$0.015 | ❌ |
| OpenAI | GPT-4o | ~$0.008 | ❌ |
| Beacon Cloud | Gemini via x402 | $0.09 USDC | N/A |
Quality & Speed
- Gemini
- Claude
- OpenAI
- Beacon Cloud
Best for: General use, rapid iteration✅ Pros:
- Native JSON response format (no parsing issues)
- Very fast (under 5 seconds typical)
- Generous free tier
- Good at identifying REST endpoints
- May miss nuanced capability descriptions
- Less sophisticated for complex architectures
Switching Between Providers
You can easily test different providers to find the best fit:Secure API Key Management
Local Development
Use a.env file (never commit this!):
.env
.env files via dotenvy (see src/main.rs:375).
CI/CD Environments
Store API keys as encrypted secrets:Production Deployment
For the Beacon API server, set keys as environment variables:Provider-Specific Configuration
Gemini Settings
Beacon uses these parameters for Gemini (src/inferrer.rs:64-72):
- Temperature: Low (0.2) for consistent, deterministic output
- Response format: Native JSON mode prevents parsing errors
Claude Settings
Claude configuration (src/inferrer.rs:91-102):
OpenAI Settings
OpenAI configuration (src/inferrer.rs:123-136):
Troubleshooting
”No API key” Error
“Unknown provider” Error
Rate Limiting
If you hit provider rate limits, try:- Wait a few minutes before retrying
- Switch to a different provider temporarily
- Upgrade your API plan
- Use Beacon Cloud (different rate limits)
Next Steps
Beacon Cloud
Use Beacon without managing API keys
Docker Deployment
Deploy Beacon as an API service