> ## Documentation Index
> Fetch the complete documentation index at: https://docs.harborframework.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Base URL management

> Base URL management for networking and configuration.

There are three ways Harbor handles provider routing, depending on the user, agent integration, and agent itself.

1. The agent handles provider routing (e.g. OpenCode, Mini-SWE-Agent)
2. The Harbor integration handles provider routing by setting the `base_url` based on the requested provider (e.g. Codex, Claude Code)
3. The user handles provider routing by setting `--base-url` or `model_base_url` in the job config.

We recommend deferring as much routing functionality as possible to the agent and falling back to the Harbor integration when possible, while always allowing the user to explicitly set routing.

# Auto-allowlisting base URLs

Harbor will attempt to automatically allowlist an agent's inference endpoint under the following conditions:

* No allowed hosts were explicitly set for the agent (`--allow-agent-host`)
* The agent-phase network mode of a task is `no-network` or `allowlist`
* The agent has not opted out of auto-allowlisting

Harbor picks the `base_url` to allowlist based on the following precedence:

1. The `base_url` explicitly set by the user ([case (3)](#provider-routing))
2. The `base_url` set by the Harbor integration ([case (2)](#provider-routing))
3. Harbor’s best guess of the agent’s `base_url` ([case (1)](#provider-routing))

> [!WARNING]
>
> In rare cases, (3) may result in Harbor allowlisting the wrong `base_url`, especially for providers whose inference endpoints have changed over time (e.g. together.xyz -> together.ai). In this case, the user will need to explicitly set `--base-url`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.