Skip to Content

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.

MergeLoom local worker UI provider setup page with provider cards and readiness state.
Local worker UI: configure provider cards and check readiness from the worker gateway, not from the customer controller.

For the first setup test, use one provider card and confirm it is ready before running a ticket.

Provider pathBest first use
Codex CLIFast browser/device login from the worker.
Claude Code CLIBrowser-based Claude login from the worker.
Codex APIOpenAI API credentials managed for the worker.
Claude APIAnthropic API credentials managed for the worker.
OpenAI-compatiblePrivate 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.

  1. Start the worker.
  2. Open http://127.0.0.1:8010/providers.
  3. Select the codex-cli provider card.
  4. Click Authenticate in browser.
  5. Complete the device-auth flow.
  6. Click Check login status.

Shell fallback:

Terminal window
docker compose exec worker-gateway codex login --device-auth
  1. Start the worker.
  2. Open http://127.0.0.1:8010/providers.
  3. Select the claude-code-cli provider card.
  4. Click Authenticate in browser.
  5. Complete the browser sign-in flow.
  6. Click Check login status.

Shell fallback:

Terminal window
docker compose exec worker-gateway claude auth login

Use an API provider when you want the worker to call a hosted model endpoint without browser-based CLI login.

Typical required fields:

FieldMeaning
Providercodex-api, claude-api, or openai-compatible.
Base URLRequired for OpenAI-compatible endpoints.
ModelModel or deployment name sent to the provider.
AuthAPI 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 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.

When a job runs, MergeLoom resolves provider and model selection from the most specific source first:

  1. ticket directive such as provider=... inside a [JCA]...[/JCA] block
  2. ticket directive such as model=... inside a [JCA]...[/JCA] block
  3. model label such as model:sonnet where allowed
  4. repository workflow provider/model defaults
  5. workspace default provider and optional model from the controller
  6. worker-stored provider default model/profile

Example ticket directive:

[JCA]
provider=claude-api
model=sonnet
[/JCA]

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.