Repository navigation
docs(byok): use your own provider key in runs and automations - #180
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, APIinferenceobject), who can use it (no NaN plan needed with an active workspace; ad-hoc runs need a session,403 session_requiredforsk-keys andnan_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.src/data/openapi.json):CreateRunInference(oneOf nan/byok, strict),RunInference(renderedsource/provider/secret/model) on Run and Automation,usage.source: byok, BYOK errors onPOST /v1/runs(400inference/inference.secret/inference.model, 403session_required, 404inference.secret), the automation-run description, and the Runerrorobject (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.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 buildgreen.Deploy notes
None (static docs). Publish together with or after the BYOK rollout (
BYOK_ENABLED) and CLI 0.1.32.🤖 Generated with Claude Code