Providers and accounts
Configure → Providers is where Harbor Pilot learns what it can send requests to.
- A provider is one upstream service: the Anthropic API, OpenAI, Gemini, an OpenAI-compatible server, a local Ollama, or a Claude Code or Codex CLI bridge. It holds the address, timeouts and the list of models with their prices.
- An account is one credential for that provider: an API key, or one subscription seat's sign-in. A provider can have several accounts (Team key 1, Team key 2), and fallback groups fail over between them.


The line under the title counts what you have, for example "3 providers · 4 accounts · 4 working · 1 subscription". Each provider shows its API type and base URL, + Add account, and a ⋯ menu to edit or delete it. Each account row shows its billing, status, tightest quota window, and requests and cost over the last 24 hours.
Connect a provider
+ Connect a provider asks What are you connecting?


| Choice | Use it for |
|---|---|
| Anthropic API | Claude models with an API key |
| OpenAI API | GPT models with an API key |
| Gemini API | Gemini models with an API key |
| OpenAI-compatible API | OpenRouter, DeepSeek, vLLM and other servers that speak the OpenAI API (needs a base URL) |
| Ollama (local) | A model server on your network (default http://127.0.0.1:11434) |
| Claude Code CLI bridge | A Claude subscription through its CLI, see Subscriptions |
| Codex CLI bridge | A ChatGPT subscription through its CLI, see Subscriptions |
Then:
- Give it a Display name and a Short name (used in IDs, Terraform and the request list).
- For an OpenAI-compatible server, enter its Base URL, such as
https://llm.example.com/v1. - Choose how to give the API key:
- Paste it: stored encrypted and never shown again. It becomes this provider's first account.
- From the server environment: a secret reference such as
env:HP_SECRET_OPENAI_KEY. - Add later: create the provider now and add accounts afterwards.
- Click Connect and test (or Connect provider without a key).
Connection
The collapsed Connection section holds:
- Base URL: leave empty for the provider's standard address.
- Allow a local network address: needed for local model servers and plain
http. Cloud metadata addresses stay blocked either way. - Request timeout (default 600 s) and Idle stream timeout (default 300 s).
- Shown as: how the provider is classified (Cloud, Partial compatibility, Unofficial, Local). Routing plans can restrict by this.
- Static headers: non-secret headers sent upstream, one
Name=valueper line. Authentication headers are refused.
Models and prices
With no models listed, fallback groups can use any model id the provider accepts, but Harbor Pilot can't estimate cost. Add a model to set:
- Model id, exactly as the provider names it, and a Display name.
- Context window and Max output.
- Capabilities: streaming, tool calls, parallel tool calls, streamed tool calls, images, reasoning, structured output, prompt caching. Routing uses these to skip an account that can't serve a request (for example one with images).
- Prices (for cost estimates): Input, Output, Cache read and Cache write per million tokens, a Currency and a Price list label.
These prices are what Spend calls estimated cost.
Upstream request fields
Some routers let the caller choose which provider serves a model, and some clients (Claude Code, for one) have no setting for it. Rather than putting that in every client's configuration, set it once on the model under Upstream request fields:
Pin the upstream provider (
openai_compatibleproviders only; other provider types never receive it). Name a particular provider in Prefer in order, Only these or Never these; choose a Rank by order, restrict Providers that store prompts, require zero data retention or all parameters, list Quantizations, and Cap the price per million tokens, per request or per image. A field left at its default is omitted from the request rather than sent, so the router's own default applies.Other fields (JSON object) takes fields from a short allowlist per provider type:
Provider type Allowed fields OpenAI-compatible transforms,provider(instead of the pin),temperature,top_p,top_k,min_p,top_a,frequency_penalty,presence_penalty,repetition_penalty,seed,stop,logit_bias,user,metadataOpenAI temperature,top_p,user,metadataOllama temperature,top_p,seed,stop,frequency_penalty,presence_penaltyAnthropic metadata,temperature,top_p,top_k,stop_sequencesGemini safetySettings;generationConfigwith onlytemperature,topP,topK,stopSequencesSpelling doesn't matter (
top_pandtopPare the same field). Anything else is refused when you save, and the message lists what is allowed. Output limits, extra candidates, model lists, tools, plugins, stored state, prompt caching, streaming and the request's structure are never configurable: they would bypass budgets or change what the client asked for. Gemini'sgenerationConfigis merged key by key, so the client's other settings in it stay. Only thegenerationConfigspelling is merged: ageneration_configin the same request is dropped and shows as a loss.When the client already sends one of these decides the conflict: Send mine and replace theirs (the default), Keep theirs, only fill missing ones, or Refuse requests that set them. Only what the client sent counts; values the gateway fills in itself are never a conflict. A refusal answers the client with 400 before the request is sent to any candidate (an intent classifier may already have run to choose the route), and if several models could serve a request and any of them refuses, the request is refused. An override or a kept client value appears on the request page as a translation loss, so it is never silent.
Models that keep this section empty are forwarded exactly as before. A model with any of it set shows an Upstream fields badge in the model list. Saving a provider replaces its whole spec, so a tool that updates providers through the API must send these fields back (see Terraform).
Reasoning
Clients ask for reasoning in their own protocol's terms. Claude Code, for example, sends adaptive thinking with an effort level (thinking: {type: "adaptive"} and output_config: {effort: "high"}), while routers and other providers each take their own parameter. A model's reasoning option tells Harbor Pilot how to write these settings for that model. Without it, an explicit level is translated as before, and adaptive thinking reaches only Anthropic models.
In the model dialog, open Reasoning and choose a Reasoning translation: Built in (the default), Follow the client, Always the same level or Turn reasoning off. Then pick the Upstream parameter the provider understands, a Default level (or a thinking budget), the Accepted levels and the Largest thinking budget. For OpenAI-compatible and local providers, Send earlier reasoning back names the assistant message field for earlier reasoning. A model with the option set shows a Reasoning badge in the model list. In the API and in Terraform the option is the model's reasoning object:
{"id": "deepseek/deepseek-chat", "reasoning": {"mode": "client", "style": "openrouter_reasoning", "effort": "medium", "efforts": ["low", "medium", "high"]}}Mode.
clientfollows what the client asks for, usingeffort(orbudget_tokens) when the client names no level.fixedalways asks for that level.offalways turns reasoning off.auto, the default, keeps the built-in translation.Style is the parameter the upstream understands:
Style For Sends openrouter_reasoningOpenAI-compatible routers reasoning: {effort},{max_tokens}or{enabled: true}; off is{effort: "none"}deepseek_thinkingDeepSeek's own API thinking: {type: "enabled"}plusreasoning_effort; off is{type: "disabled"}openai_reasoning_effortOpenAI, OpenAI-compatible, local reasoning_effortopenai_responses_reasoningOpenAI reasoning.effortanthropic_thinkingAnthropic Adaptive thinking unchanged; a level as a thinking budget gemini_thinking_configGemini A thinking budget noneall Nothing Leave it empty to use the upstream protocol's default.
Efforts lists the levels the model accepts. A higher level is lowered to the nearest one in the list, and a thinking budget above max_budget_tokens is reduced. Each change shows on the request page as a translation loss.
History. Some Chat APIs want earlier reasoning sent back on assistant messages.
history: "field"sends it inhistory_field(the style's default:reasoning_contentfor DeepSeek,reasoningfor routers).
Claude Code's context_management (Anthropic's server-side context editing) has no equivalent elsewhere and is always dropped. Passthrough requests and the CLI bridges ignore the option. Saving a provider replaces its whole spec, so tools that update providers must send reasoning back (see Terraform). The full reference is in the configuration contract.
Routing is unchanged: a request that names a level or a thinking budget (Claude Code sends a budget for older Claude model names) goes only to models with the reasoning capability, whatever the mode. Adaptive thinking alone needs no capability.
Recipe: Claude Code to DeepSeek
Claude Code can't send back reasoning from other providers (see limitations), and DeepSeek's own API answers 400 when a request with tools lacks the earlier reasoning.
- DeepSeek's own API: use
{"mode": "off", "style": "deepseek_thinking"}, and declare the reasoning capability so that requests carrying a thinking budget still reach the model. - Through an OpenAI-compatible router: the router's documentation describes sending reasoning back for tool calls but doesn't say whether a request without it fails. Start with
{"mode": "off", "style": "openrouter_reasoning"}, or a low fixed effort ({"mode": "fixed", "style": "openrouter_reasoning", "effort": "low"}), and move to{"mode": "client", "style": "openrouter_reasoning"}(Claude Code's effort,highby default, then reaches the router asreasoning: {effort: "high"}) once a multi-turn tool session works.
Add an account
+ Add account on a provider opens the account dialog:
| Field | Notes |
|---|---|
| Name | Shown in fallback groups and on request pages |
| Credential | Paste it (stored encrypted), From the server environment (a secret reference) or None. Editing an account that has a saved credential shows its fingerprint; leave the field empty to keep it, or tick Remove the saved credential |
| How it is paid | Pay per use (an API key billed for each request), Subscription (a flat-fee plan, such as Claude Max or ChatGPT Pro), Local model (runs on your own hardware) or Free. Routing uses this to decide when falling back to a paid account is allowed |
| Account on | Off accounts are never routed to |
| Limits, models and labels | Requests at once and Requests per minute for this account, Models this account may use (default: all of the provider's models) and Labels |
Test the connection
Click an account to open its drawer, then Test connection. Harbor Pilot lists the provider's models with the account's credential. That proves the address and the credential work without sending a request to a model, so it spends no tokens. The result is stored and shown on the account:
- Connection works, with how long the provider took to answer.
- Connection failed, with the provider's reason (credential rejected, unreachable, …).
- Ready to use, for CLI bridge accounts: Harbor Pilot reports whether the CLI can run on the server. A bridge account is only confirmed by its first real request.
- No usable credential, when nothing is saved or a reference can't be read.


A passing test does not prove that the account can use a given model, has quota left, or that its billing is set up.
The same check is POST /api/v1/provider-accounts/{id}/test; stored results for all accounts are at GET /api/v1/account-checks. Each test is recorded in the audit log.
The drawer also shows the account's Quota (its windows, or Add quota tracking), and for subscription accounts its Subscription.
Account status
Each account shows the first status that applies, in this order:
| Status | Meaning |
|---|---|
| Off | The account is switched off |
| No credential | Nothing to authenticate with |
| Credential rejected | The provider refused the credential |
| Unreachable | The provider couldn't be reached |
| Limit reached | A quota window is used up. Routing skips it until reset |
| Mostly failing | More than half of its recent requests failed |
| Working | It is serving requests |
| Connection OK | No traffic yet, but the connection test passed |
| Not used yet | A CLI bridge account with no traffic yet |
| Not tested | No traffic and no connection test |
API keys and secret references
Harbor Pilot can hold a credential in two ways:
- Stored: you paste it once; it is encrypted with the server's master key and never shown again. Backups contain it encrypted.
- Referenced: Harbor Pilot reads it from the server when it needs it, so it never enters the database:
env:HP_SECRET_OPENAI_KEYreads an environment variable. Only variables starting withHP_SECRET_(or another prefix set insecurity.secret_env_prefixes) are allowed, so a reference can't read the master key or other server settings.file:/run/secrets/openaireads a file. Files must be under one of the directories insecurity.secret_roots, which may not contain the data directory or the master key.file:/path#keyreads one field from a JSON file.
Use references when keys already live in a secret manager, Docker or Kubernetes secrets, or systemd credentials. See Secrets and the master key for the details and how to rotate.
Delete
Deleting an account stops routing to it and removes its saved credential. Deleting a provider stops routing to it. In both cases, fallback groups that list it must be changed first, and a provider's accounts must be deleted before the provider.
Related
- Subscriptions and CLI bridges
- Routing plans: put accounts into fallback groups.
- Limits: quota tracking per account.
- Terraform: manage providers and accounts as code.