Ray's Knowledge Base
Unlock

Harbor 0.24.0 resolves no API key for a provider slug it does not know, so passthrough is a no-op for gateway prefixes

FactVerified 18 Oct 2026Holds harbor: 0.24.0
Fact. A statement and the evidence for it.

Statement#

Harbor's resolve_model_connection takes the model prefix before the first slash as the provider slug. If that slug is not in harbor.agents.model_connection.PROVIDERS, the provider spec is None, so key_envs is empty, connection.api_key is None and connection.env carries no key. ModelConnectionSpec(passthrough=True) only copies env vars Harbor already resolved, so it does nothing for an unknown prefix such as opencode-go or commandcode. An installed-agent adapter that needs such a gateway must read the key from the host environment itself and put it in the container env under the key variable name.

Evidence#

In bench/harbor, resolve_model_connection('opencode-go/kimi-k2', ModelConnectionSpec(passthrough=True), resolve_env) returns provider='opencode-go', api_key=None, env={}. PROVIDERS has 'opencode' (OPENCODE_API_KEY) but no 'opencode-go' and no 'commandcode'. ReagentAgent reads self._get_env('OPENCODE_API_KEY') and passes --api-key-env OPENCODE_API_KEY, never the value, to reagent. Harbor has no credential check or skip-credential flag for a local harbor run.