AI Providers

Configure AI-powered bucket name generation with OpenAI, Ollama, Anthropic, or Gemini.

Overview

s3finder uses LLMs to generate intelligent bucket name variations. The AI analyzes CT log data to discover organizational naming patterns and generates bucket names following those conventions.

AI generation is optional. The permutation engine alone generates 780+ variations per seed.

Context-Aware Generation

When using CT log discovery (-d), the AI receives discovered infrastructure words as context. It analyzes these patterns to generate bucket names that match the organization's naming conventions.

Default Models

Each provider has a default model optimized for bucket name generation:

ProviderDefault ModelEnvironment Variable
OpenAIgpt-4o-miniOPENAI_API_KEY
Anthropicclaude-3-5-haiku-20241022ANTHROPIC_API_KEY
Geminigemini-3-flash-previewGEMINI_API_KEY
Ollamallama3.2N/A (local)

Supported Providers

OpenAI

Cloud-based, best quality. Requires API key with per-request costs.

Recommended

Ollama

Local, free, and private. Requires local GPU/resources.

Free

Anthropic

Cloud-based Claude models. High quality alternative.

Alternative

Gemini

Google's Gemini models. Fast and cost-effective.

New

OpenAI Configuration

Setup

bash
# Set API key via environment variable
export OPENAI_API_KEY=sk-xxxxx

# Or pass directly (not recommended)
s3finder -s target --ai --ai-key sk-xxxxx

Usage

bash
# Use default model
s3finder -s acme-corp --ai

# Use a specific model
s3finder -s acme-corp --ai --ai-model <model-name>

# Generate more names
s3finder -s acme-corp --ai --ai-count 100

Model Selection

Choose a model based on your needs:

TypeSpeedQualityCost
Mini/Small modelsFastGoodLow
Standard modelsMediumExcellentMedium
Large/Turbo modelsSlowExcellentHigh

Check OpenAI's documentation for the latest available models.

Ollama Configuration

Prerequisites

bash
# Install Ollama (macOS)
brew install ollama

# Start Ollama server
ollama serve

# Download a model
ollama pull <model-name>

Usage

bash
# Use local Ollama
s3finder -s acme-corp --ai --ai-provider ollama

# Custom model
s3finder -s acme-corp --ai --ai-provider ollama --ai-model <model-name>

# Custom Ollama URL
s3finder -s acme-corp --ai --ai-provider ollama --ai-url http://192.168.1.100:11434

Model Selection

Choose a model based on your hardware:

SizeQualityRAM Required
7-8B parametersGood8GB
13-14B parametersBetter16GB
70B+ parametersExcellent48GB+

Check Ollama's model library for available models.

Anthropic Configuration

Setup

bash
# Set API key via environment variable
export ANTHROPIC_API_KEY=sk-ant-xxxxx

# Use Anthropic
s3finder -s acme-corp --ai --ai-provider anthropic

# Use a specific model
s3finder -s acme-corp --ai --ai-provider anthropic --ai-model <model-name>

Model Selection

Choose a model based on your needs:

TypeSpeedQualityCost
Haiku (fast)FastGoodLow
Sonnet (balanced)MediumExcellentMedium
Opus (powerful)SlowBestHigh

Check Anthropic's documentation for the latest available models.

Gemini Configuration

Setup

bash
# Set API key via environment variable
export GEMINI_API_KEY=xxxxx

# Use Gemini
s3finder -s acme-corp --ai --ai-provider gemini

# Use a specific model
s3finder -s acme-corp --ai --ai-provider gemini --ai-model <model-name>

Model Selection

Choose a model based on your needs:

TypeSpeedQualityCost
Flash (fast)FastGoodLow
Pro (balanced)MediumExcellentMedium

Check Google's documentation for the latest available models.

Custom Base URL (Proxy Support)

All providers support custom base URLs for proxies or self-hosted endpoints:

bash
# OpenAI with proxy
s3finder -s acme-corp --ai --ai-provider openai --ai-url https://your-proxy.com/v1

# Anthropic with custom endpoint
s3finder -s acme-corp --ai --ai-provider anthropic --ai-url https://your-proxy.com

# Gemini with proxy
s3finder -s acme-corp --ai --ai-provider gemini --ai-url https://your-proxy.com

# Ollama on remote server
s3finder -s acme-corp --ai --ai-provider ollama --ai-url http://192.168.1.100:11434
Use --ai-url when you need to route requests through a corporate proxy, use a self-hosted LLM endpoint, or connect to a remote Ollama instance.

How AI Generation Works

The AI generates bucket names like a "lazy sysadmin" would create them:

  • Predictable patterns (backup, logs, assets)
  • Year suffixes (2023, 2024, 2025)
  • Environment prefixes (dev, prod, staging)
  • Region suffixes (us-east-1, eu-west-1)
  • Abbreviations and shortcuts

Example AI Output

For seed "acme-corp", the AI might generate:

text
acme-corp-backup-2024
acme-corp-internal-assets
dev-acme-corp-logs
acme-corp-db-exports
acme-corp-config-backup
staging-acme-corp-uploads
acme-corp-customer-data
acme-corp-analytics-reports

Best Practices

Recommendations:
  • Start with the permutation engine alone
  • Add AI if you need more coverage
  • Use Ollama for privacy-sensitive targets
  • Small/mini models offer the best cost/quality ratio