Skip to main content

Overview

RepoMaster supports multiple AI provider APIs with automatic fallback capabilities. Configure your preferred providers in the .env file to enable the multi-agent system.
At least one API provider must be configured for RepoMaster to function. The system automatically falls back to available providers based on priority.

Provider Priority

When DEFAULT_API_PROVIDER is not set or the configured provider is unavailable, RepoMaster uses this fallback order:
  1. OpenAI (gpt-4o, gpt-5)
  2. Claude (Anthropic)
  3. DeepSeek (deepseek-v3)
  4. Basic (OpenAI-compatible)
  5. Azure OpenAI

Setting Default Provider

Configure your preferred default provider in configs/.env:
# Set the default API provider (openai, claude, deepseek, azure_openai)
# If not set, will use the first available provider in priority order
DEFAULT_API_PROVIDER=openai

Supported Providers

OpenAI

Configuration

Add these variables to your configs/.env file:
OPENAI_API_KEY=your_openai_api_key_here
OPENAI_MODEL=gpt-5
OPENAI_BASE_URL=https://api.openai.com/v1

Default Values

  • Model: gpt-4o (if OPENAI_MODEL not set)
  • Base URL: Uses OpenAI’s standard endpoint

Getting API Key

Get your OpenAI API key at platform.openai.com

Supported Models

  • gpt-4o - Recommended for most tasks
  • gpt-5 - Latest model (requires temperature=1.0)
  • gpt-4-turbo - Fast and capable
  • Any OpenAI-compatible model

Special Notes

GPT-5 only supports temperature=1.0 and does not support the top_p parameter. RepoMaster automatically adjusts these settings.

Configuration

Add these variables to your configs/.env file:
ANTHROPIC_API_KEY=your_anthropic_api_key_here
ANTHROPIC_MODEL=claude-4-sonnet
ANTHROPIC_BASE_URL=https://api.anthropic.com  # Optional

Default Values

  • Model: claude-3-5-sonnet-20241022 (if ANTHROPIC_MODEL not set)
  • Base URL: Optional, uses Anthropic’s default endpoint

Getting API Key

Get your Anthropic API key at console.anthropic.com

Supported Models

  • claude-4-sonnet - Latest Sonnet model
  • claude-3-5-sonnet-20241022 - Previous stable version
  • claude-sonnet-4-20250514 - Available via basic_claude4 mode

Usage Example

# Use Claude as default provider
DEFAULT_API_PROVIDER=claude

# Or specify via CLI
python launcher.py --mode backend --backend-mode unified --api-type claude

Configuration

Add these variables to your configs/.env file:
DEEPSEEK_API_KEY=your_deepseek_api_key_here
DEEPSEEK_MODEL=deepseek-v3
DEEPSEEK_BASE_URL=https://api.deepseek.com/v1

Default Values

  • Model: deepseek-v3 (default)
  • Base URL: https://api.deepseek.com/v1

Getting API Key

Get your DeepSeek API key at platform.deepseek.com

Supported Models

  • deepseek-v3 - Latest version
  • deepseek-r1-0528 - Available via basic_deepseek_r1 mode

Usage Example

# Use DeepSeek as default provider
DEFAULT_API_PROVIDER=deepseek

# Or use DeepSeek R1 model specifically
python launcher.py --api-type basic_deepseek_r1

Configuration

Add these variables to your configs/.env file:
GEMINI_API_KEY=your_gemini_api_key_here
GEMINI_MODEL=gemini-2.5-pro

Default Values

  • Model: gemini-2.5-pro (as specified in env.example)

Getting API Key

Get your Gemini API key at makersuite.google.com/app/apikey

Supported Models

  • gemini-2.5-pro - Latest Pro model
  • gemini-1.5-pro - Previous stable version
  • gemini-1.5-flash - Faster, lightweight option

Configuration

Azure OpenAI requires additional configuration parameters:
AZURE_OPENAI_API_KEY=your_azure_api_key_here
AZURE_OPENAI_MODEL=gpt-4o
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/
AZURE_OPENAI_API_VERSION=2024-02-15-preview

Default Values

  • Model: gpt-4o (if AZURE_OPENAI_MODEL not set)
  • API Type: azure
  • API Version: Uses value from AZURE_OPENAI_API_VERSION

Getting Started

Azure OpenAI requires an Azure subscription. Set up your resource at portal.azure.com

Configuration Steps

  1. Create an Azure OpenAI resource in Azure Portal
  2. Deploy a model (e.g., gpt-4o)
  3. Copy the endpoint URL and API key
  4. Set the appropriate API version

Usage Example

# Use Azure OpenAI as default provider
DEFAULT_API_PROVIDER=azure_openai

# Or specify via CLI
python launcher.py --api-type azure_openai

Advanced Provider Configurations

Basic Mode

The basic mode uses OpenAI configuration by default and is suitable for OpenAI-compatible endpoints:
# Uses OPENAI_API_KEY, OPENAI_MODEL, OPENAI_BASE_URL
python launcher.py --api-type basic

Service-Specific Configurations

Some internal services use specific configurations defined in oai_config.py:68:
  • summary: Uses basic configuration
  • deepsearch: Uses basic configuration
  • code_explore: Uses basic configuration

Configuration Validation

RepoMaster automatically validates API configurations on startup:
# From configs/oai_config.py
def validate_and_get_fallback_config(api_type: str = None):
    """
    Validates API key and provides fallback configuration if needed.
    Returns: (config_name, api_config)
    """

Validation Behavior

  1. No API Type Specified: Uses provider priority order
  2. Invalid/Empty API Key: Falls back to next available provider
  3. No Valid Keys Found: Raises error with helpful message

Skip Configuration Check

Skipping configuration validation is not recommended for production use.
python launcher.py --skip-config-check

Additional Required APIs

Search and Document Processing

These APIs are required for deep search functionality:
# Serper API - Google search results
SERPER_API_KEY=your_serper_key
# Get API key at: https://serper.dev/login

# Jina AI - Document processing
JINA_API_KEY=your_jina_key  
# Get API key at: https://jina.ai/
SERPER_API_KEY and JINA_API_KEY are required for the Deep Search Agent functionality.

Troubleshooting

No Valid API Provider Found

Error: "No valid API provider found. Please configure at least one API key." Solution: Ensure at least one provider is properly configured in configs/.env:
# Check your .env file has at least one of these:
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
DEEPSEEK_API_KEY=sk-...

Provider Fallback Warning

Warning: "⚠️ API key for 'openai' is None or empty. Using provider priority fallback..." This is normal behavior when a requested provider isn’t configured. RepoMaster automatically uses the next available provider.

Configuration File Not Found

Error: Configuration file issues on startup Solution: Copy the example configuration:
cp configs/env.example configs/.env
# Then edit configs/.env with your API keys

Next Steps

Environment Setup

Complete environment variable configuration

Advanced Options

CLI flags and advanced configuration

Build docs developers (and LLMs) love