-
-
Notifications
You must be signed in to change notification settings - Fork 4
Providers
Provider families, OAuth-backed providers, and where their YAML defaults live in the engine.
Refact loads provider templates from refact-agent/engine/src/yaml_configs/default_providers/ and combines them with any user overrides from ~/.config/refact/providers.d/.
The engine includes these provider families in src/providers/ and the default provider templates:
- Anthropic
- Claude Code
- OpenAI
- OpenAI Responses
- OpenAI Codex
- OpenRouter
- Groq
- DeepSeek
- Doubao
- xAI
- xAI Responses
- Google Gemini
- Qwen
- Kimi
- Zhipu
- MiniMax
- GitHub Copilot
- Ollama
- LM Studio
- vLLM
- custom OpenAI-compatible providers
The default template list is assembled in src/caps/providers.rs from the YAML files in yaml_configs/default_providers/.
Each provider contributes ProviderDefaults for three model roles:
chatcompletionembedding
Those defaults are used when the provider exposes or derives model records for a given role. The structure is defined in refact-core/src/provider_types.rs and re-exported through refact-agent/engine/crates/refact-providers/src/config.rs.
Two provider families are OAuth-backed:
- Claude Code — uses per-provider OAuth tokens and subscription login flow.
- OpenAI Codex — uses OAuth-backed ChatGPT/Codex account access.
Both keep their login state in the provider instance config and refresh tokens when needed.
Default provider templates live in:
refact-agent/engine/src/yaml_configs/default_providers/
User-configured provider overrides are read from:
~/.config/refact/providers.d/
The engine reads those YAML files, merges them with the matching built-in template when one exists, and exposes the resulting providers through the capabilities API.
For a new provider, create a YAML template, add it to the template list, and make sure the provider exposes the right chat/completion/embedding defaults and model metadata. See CONTRIBUTING for the code path and examples.
Refact on GitHub: https://github.com/JegernOUTT/refact
- Agent Modes
- Agent Tools
- Task Planner & Cards
- Worktrees
- Subagents
- Memory & Knowledge
- Hidden Roles & Plans
- Context Compression
- Scheduler & Cron
- Processes & PTY
- Buddy
- MCP
- Skills, Commands & Hooks
- Marketplace
- Chat System
- Providers
- Caps & Models
- Code Completion (FIM)
- AST
- VecDB
- Exec Runtime
- HTTP API
- Checkpoints & Git
- Voice