Skip to content

docs(byok): use your own provider key in runs and automations - #180

Merged
sre-helmcode merged 2 commits into
mainfrom
docs/byok
Oct 13, 2026
Merged

sre-helmcode merged 2 commits into
mainfrom
docs/byok

Conversation

@sre-helmcode

Copy link
Copy Markdown
Contributor

What

Docs for BYOK (bring your own key), NaN community: cloud-api helmcode/nan-cloud-api#347 (0.8.260), spec devops AGENT-AUTOMATIONS-PHASE3-BYOK.md, CLI helmcode/nan-cli#52 (0.1.32).

  • /docs/runs (EN+ES): new Use your own provider key (BYOK) section: providers, saving a Provider key (form fields with the cloud-ui labels) and the base URL rules (https, public host, never a token in the URL, NaN never connects to it), choosing it per run (portal Inference > My own key, nan run --byok-secret NAME --model ID, API inference object), who can use it (no NaN plan needed with an active workspace; ad-hoc runs need a session, 403 session_required for sk- keys and nan_pat_ tokens), billing (your provider; NaN does not meter it, usage.source: byok), limits (8 BYOK runs at once, workspace caps still apply), security, an errors table, and the Hermes + Anthropic limitation. Before you start, portal form, concurrency, flags, exit codes, authentication and FAQ updated.
  • /docs/automations (EN+ES): the same section for automations (any credential may start a BYOK automation, the webhook/untrusted-input warning, 48 KiB budget, secret_in_use), the Inference setting, the secret Kind.
  • /docs/workspaces, /docs/webhooks, /docs/pr-gatekeeper, /docs/nan-cli (EN+ES): no longer say runs always need an inference plan.
  • OpenAPI (src/data/openapi.json): CreateRunInference (oneOf nan/byok, strict), RunInference (rendered source/provider/secret/model) on Run and Automation, usage.source: byok, BYOK errors on POST /v1/runs (400 inference/inference.secret/inference.model, 403 session_required, 404 inference.secret), the automation-run description, and the Run error object (cloud-api #344, missing until now) so cloud-api's goldens validate. Secrets stay out of the public API (portal-only writes); provider keys are described where the inference object references them.

Tests

  • src/lib/openapiByok.test.ts: schema shape, valid/invalid inference requests, every POST /runs example validates, cloud-api origin/main 4c69270 BYOK goldens (src/tests/fixtures/phase3, rendered by cloud-api's own handlers) validate against Run/RunList/Automation, docs sections exist in EN+ES with the anchor the API reference and the CLI link, no em-dashes.
  • Updated on purpose: openapiRuns.test.ts (CreateRunRequest and Run field lists), runsDocs/automationsDocs (BYOK is now documented; concurrency wording), modelCatalog (a "source": "byok" line names the member's provider model, the only exemption, with its own test).
  • npx vitest run: 82 files, 2106 tests green. npm run build green.

Deploy notes

None (static docs). Publish together with or after the BYOK rollout (BYOK_ENABLED) and CLI 0.1.32.

🤖 Generated with Claude Code

barckcode and others added 2 commits October 13, 2026 22:02
New "Use your own provider key (BYOK)" sections in /docs/runs and
/docs/automations (EN+ES): providers, saving a Provider key and the base
URL rules, choosing it per run (portal, nan run --byok-secret, API) and
per automation, who can use it (no NaN plan needed with an active
workspace; ad-hoc runs need a session), billing (your provider, not
metered by NaN), limits (8 BYOK runs at once), security notes, errors,
and the Hermes + Anthropic limitation. Workspaces, webhooks, PR
gatekeeper and NaN CLI pages no longer say runs always need an
inference plan.

OpenAPI: the inference object (request oneOf and rendered shape),
usage.source byok, BYOK errors on POST /v1/runs (400 inference*, 403
session_required, 404 inference.secret), automations run on your key,
and the run error object (cloud-api #344) so cloud-api's own goldens
validate. Tests validate cloud-api 4c69270 BYOK goldens against the
schema and check the guide.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g notes)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sre-helmcode
sre-helmcode merged commit d15789d into main Oct 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants