Skip to content

Bring Your Own AI (BYOAI)

DevDiff's core philosophy: You control the AI, not us.

Provider Tiers

🏠 Local & Free (No API Keys)

ProviderSetupBest For
Ollamaollama pull [model]macOS, Linux, Windows WSL
llama.cppPoint to binary pathCustom builds, embedded systems
Transformers.jsZero configNode.js without native deps
WebLLMZero configBrowser-based, Chrome

☁️ Self-Hosted (Your Servers)

ProviderConfig Key
LocalAIlocalai://localhost:8080
vLLMvllm://localhost:8000
Text Generation Inferencetgi://localhost:3000
Ollama (remote)ollama://my-server:11434

🌐 Cloud (Your API Keys)

ProviderConfig Key
OpenAIopenai://gpt-4o-mini
Anthropicanthropic://claude-3-haiku
Google Geminigemini://gemini-1.5-flash
Groqgroq://llama3-70b
DeepSeekdeepseek://deepseek-coder
Together AItogether://meta-llama/Llama-3-70b
Fireworks AIfireworks://accounts/fireworks/models/llama-v3-70b

Smart Routing

js
// .devdiff.config.js
export default {
  ai: {
    providers: [
      {
        name: "local-small",
        url: "ollama://llama3.2:3b",
        maxTokens: 2000,
        priority: 1, // Try first
      },
      {
        name: "local-big",
        url: "ollama://llama3:70b",
        maxTokens: 8000,
        priority: 2, // Complex diffs
      },
      {
        name: "cloud-cheap",
        url: "openai://gpt-4o-mini",
        apiKey: process.env.OPENAI_API_KEY,
        maxTokens: 4000,
        priority: 3, // Fallback
        maxDailyCost: 0.5, // Budget cap!
      },
    ],

    routing: {
      strategy: "cost-aware", // 'priority' | 'cost-aware' | 'latency'
      complexityThreshold: 0.6,
      localOnly: false,
    },
  },
};

Privacy Guarantees

When using local providers:

  • ✅ Zero network requests for AI processing
  • ✅ All diffs processed on-device
  • ✅ No telemetry, no analytics, no tracking
  • ✅ Audit log shows every AI call

When using cloud providers:

  • ✅ Only structured diffs sent (not raw files)
  • ✅ Automatic secret redaction
  • ✅ Dry-run mode shows exactly what's sent
  • .devdiffignore excludes sensitive paths

Released under the MIT License. | Support