Configure a Self Hosted AI Coding Provider
AI coding provider setup in this guide is for Self Hosted workers. Cloud Hosted uses Anthropic through MergeLoom today, with AI credits supplied through your plan.
For Self Hosted, AI coding provider setup happens on the worker side. That keeps provider readiness, credentials, and execution close to the environment where code is checked out and validated.
For the first real test, use the worker UI provider page.
This Is in the Local Worker UI
Install the worker first, then open http://127.0.0.1:8010/.
If the worker runs on a VPS, create an SSH tunnel to port
8010 before opening the worker UI.
Choose a First Provider Path
Section titled “Choose a First Provider Path”For the first setup test, use one provider card and confirm it is ready before running a ticket.
| Provider path | Best first use |
|---|---|
| Codex CLI | Fast browser/device login from the worker. |
| Claude Code CLI | Browser-based Claude login from the worker. |
| Codex API | OpenAI API credentials managed for the worker. |
| Claude API | Anthropic API credentials managed for the worker. |
| OpenAI-compatible | Private or third-party endpoint with real tool-calling support. |
Vertex AI, AWS Bedrock, and Azure Foundry are also Self Hosted provider paths where configured. Use Local Worker Provider Setup for production identity, Kubernetes Secret, and cloud-provider guidance.
Configure Codex CLI
Section titled “Configure Codex CLI”- Start the worker.
- Open
http://127.0.0.1:8010/providers. - Select the
codex-cliprovider card. - Click Authenticate in browser.
- Complete the device-auth flow.
- Click Check login status.
Shell fallback:
docker compose exec worker-gateway codex login --device-authConfigure Claude Code CLI
Section titled “Configure Claude Code CLI”- Start the worker.
- Open
http://127.0.0.1:8010/providers. - Select the
claude-code-cliprovider card. - Click Authenticate in browser.
- Complete the browser sign-in flow.
- Click Check login status.
Shell fallback:
docker compose exec worker-gateway claude auth loginConfigure an API Provider
Section titled “Configure an API Provider”Use an API provider when you want the worker to call a hosted model endpoint without browser-based CLI login.
Typical required fields:
| Field | Meaning |
|---|---|
| Provider | codex-api, claude-api, or openai-compatible. |
| Base URL | Required for OpenAI-compatible endpoints. |
| Model | Model or deployment name sent to the provider. |
| Auth | API key, bearer token, or another supported provider auth method. |
Store API keys in the worker UI only for local tests. For production, use Docker secrets, Kubernetes Secrets, workload identity, or IAM roles where the provider supports them.
OpenAI-Compatible Requirements
Section titled “OpenAI-Compatible Requirements”OpenAI-compatible endpoints must support the tool behavior MergeLoom needs: inspect files, edit files, run allowed commands, inspect diffs, and return a structured final result.
Run the provider self-test before using the endpoint on a real ticket.
Provider Selection
Section titled “Provider Selection”When a job runs, MergeLoom resolves provider and model selection from the most specific source first:
- ticket directive such as
provider=...inside a[JCA]...[/JCA]block - ticket directive such as
model=...inside a[JCA]...[/JCA]block - model label such as
model:sonnetwhere allowed - repository workflow provider/model defaults
- workspace default provider and optional model from the controller
- worker-stored provider default model/profile
Example ticket directive:
[JCA]provider=claude-apimodel=sonnet[/JCA]What to Verify
Section titled “What to Verify”Before running a real job:
- provider login or API key is valid
- provider readiness check passes
- selected model supports tool calling
- worker can reach the provider from inside its container or pod
- allowed commands and validation commands match the repository
Related page: Local Worker Provider Setup.