Repository Config

Place a .xgopilot.yml file in your repository to customize XGopilot's behavior for that specific repo. The file is optional — XGopilot works with sensible defaults without it.

File Location

The configuration file can be placed in any of the following locations (listed from highest to lowest priority):

your-repo/
├── .xgopilot.yml              ← highest priority
├── .github/
│   └── xgopilot.yml           ← GitHub-style
└── .codeagent/
    └── xgopilot.yml           ← dedicated directory

XGopilot checks these paths in order and uses the first one found.

Configurable Options

The repository-level config focuses on model settings. Sensitive information (API keys, base URLs, etc.) is managed through global configuration and environment variables — not in the repo config.

Set a Default AI Model

# .xgopilot.yml
default_ai_provider: claude

Supported values: claude, deepseek, gemini, minimax, kimi, zhipu, codex

Customize Model per Provider

You can override the model name for each provider:

# .xgopilot.yml
default_ai_provider: claude

claude:
  model: "claude-sonnet-4"

# deepseek:
#   model: "deepseek/deepseek-v3.2-251201"

# gemini:
#   model: "gemini-3.0-pro-preview"

Note: Only model names can be configured here. API keys, base URLs, and other sensitive settings are managed through global configuration.

How Configuration Takes Effect

Changes to .xgopilot.yml take effect immediately — no restart or redeployment needed. XGopilot reads the file from your default branch each time it processes a request.

Configuration priority: Command-line flags > Repository config > Global config

Need help or a custom plan?
Talk to us for deployment guidance, enterprise support, or a tailored model setup with Qiniu AIGC.
Email: bd@qiniu.com
Phone: 400-808-9176 ext. 1
Contact Us