hive's LLM providers as DeepSeek Harness model routes.
hive-mcp's config already names every OpenAI-compatible provider the swarm
uses (:llm-providers, each with :api-url, :secret-key,
:default-model, :available-models) and where its key lives
(:secrets, e.g. "pass:Venice/key"). dsh's llm-pi-ai plugin accepts
hand-declared routes of the same shape. This namespace is the projection
from one to the other, so a dsh session runs on the same providers and
models as the swarm without restating them.
Pure. It never reads a key: a route names the environment variable dsh
resolves per request, and credential-refs says where a launcher finds
each value. A secret that is not a pass: reference is never copied
anywhere; its route is reported as unresolved instead.
SPDX-License-Identifier: MIT
hive's LLM providers as DeepSeek Harness model routes. hive-mcp's config already names every OpenAI-compatible provider the swarm uses (`:llm-providers`, each with `:api-url`, `:secret-key`, `:default-model`, `:available-models`) and where its key lives (`:secrets`, e.g. "pass:Venice/key"). dsh's `llm-pi-ai` plugin accepts hand-declared routes of the same shape. This namespace is the projection from one to the other, so a dsh session runs on the same providers and models as the swarm without restating them. Pure. It never reads a key: a route names the environment variable dsh resolves per request, and `credential-refs` says where a launcher finds each value. A secret that is not a `pass:` reference is never copied anywhere; its route is reported as unresolved instead. SPDX-License-Identifier: MIT
(->yaml data)DATA as YAML text. JSON-style flow collections, which every YAML 1.2 reader accepts, one top-level entry per line for a readable patch file.
DATA as YAML text. JSON-style flow collections, which every YAML 1.2 reader accepts, one top-level entry per line for a readable patch file.
(base-url api-url)API root of API-URL: the URL without a trailing /chat/completions.
API root of API-URL: the URL without a trailing /chat/completions.
The path hive's provider URLs end in; dsh wants the API root.
The path hive's provider URLs end in; dsh wants the API root.
(credential-refs routes secrets)Where each keyed route's value comes from. Returns {:refs {"VENICE_API_KEY" "Venice/key"} pass entries to read :unresolved [{:provider "groq" :reason :no-secret}]} A secret that is absent, or present but not a pass reference, is :unresolved (:no-secret / :not-a-pass-ref); its value is never returned.
Where each keyed route's value comes from. Returns
{:refs {"VENICE_API_KEY" "Venice/key"} pass entries to read
:unresolved [{:provider "groq" :reason :no-secret}]}
A secret that is absent, or present but not a pass reference, is
:unresolved (:no-secret / :not-a-pass-ref); its value is never returned.(default-model routes default)[provider model] a DEFAULT string "provider/model" names among ROUTES, or nil. The model part may itself contain slashes (openrouter ids do).
[provider model] a DEFAULT string "provider/model" names among ROUTES, or nil. The model part may itself contain slashes (openrouter ids do).
(display-name provider)Human label of PROVIDER, e.g. :ollama-compat -> "Ollama Compat".
Human label of PROVIDER, e.g. :ollama-compat -> "Ollama Compat".
(env-var provider)Environment variable dsh reads the key of PROVIDER from, e.g. VENICE_API_KEY.
Environment variable dsh reads the key of PROVIDER from, e.g. VENICE_API_KEY.
(patch routes)(patch routes {:keys [default bridge-url]})dsh patch entries for ROUTES. Options: :default "provider/model" to make the agent default, when it is a route :bridge-url hive.deepseek bridge URL for the installed hive-vessel plugin
dsh patch entries for ROUTES. Options: :default "provider/model" to make the agent default, when it is a route :bridge-url hive.deepseek bridge URL for the installed hive-vessel plugin
(route provider {:keys [api-url secret-key default-model available-models]})The dsh route for hive provider PROVIDER with SPEC, or nil when SPEC has no OpenAI-compatible URL (an OAuth dispatch such as :anthropic) or no model.
The dsh route for hive provider PROVIDER with SPEC, or nil when SPEC has no OpenAI-compatible URL (an OAuth dispatch such as :anthropic) or no model.
(routes llm-providers)(routes llm-providers only)Routes for every usable provider in LLM-PROVIDERS, ordered by name. ONLY, when non-empty, keeps just those provider names.
Routes for every usable provider in LLM-PROVIDERS, ordered by name. ONLY, when non-empty, keeps just those provider names.
(usable routes env-names)ROUTES a launcher can serve once it holds the values for ENV-NAMES (a set of environment variable names): keyless routes, and keyed ones whose variable is in ENV-NAMES.
ROUTES a launcher can serve once it holds the values for ENV-NAMES (a set of environment variable names): keyless routes, and keyed ones whose variable is in ENV-NAMES.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |