swissd API (0.7.0)

Deploy and manage LLM inference releases from a model catalog.

swissd composes a model catalog entry with the cluster's site profile into a plan, dry-runs it against the live release, and installs it with helm or as an LLMService that llm-operator reconciles.

Workflow

GET /api/catalog -> POST /api/plans -> POST /api/diff -> POST /api/install | /api/apply -> GET .../status
                                           ^                                    |
                                           +------- re-diff <-------------------+   (409: live revision moved)
StepEndpointWrites
browseGET /api/catalog, GET /api/catalog/{model}nothing
composePOST /api/plansthe plan, to swissd's database, keyed by hash
dry runPOST /api/diffnothing; returns the live revision to assert
installPOST /api/installthe release (helm or LLMService)
upgradePOST /api/apply with expectRevisionthe release
roll backPOST /api/releases/{ns}/{release}/rollbackthe release

Authentication

Every /api/ path except login, logout and session needs one of:

CredentialHow
session cookieswiss_session, set by POST /api/login (HttpOnly, SameSite=Strict)
bearer tokenAuthorization: Bearer <token>, the token from POST /api/login
front-proxy keyAuthorization: Bearer <proxyKey> plus X-Remote-User: <name> (the swiss chart's auth.proxyKey)

Sessions slide: a request in the second half of a token's life gets a fresh cookie. Changing the password invalidates every outstanding token. With auth.disabled nothing is checked.

Errors

Every error is JSON {"error": "<message>"} with the status below.

StatusMeaning
400the request is wrong: bad JSON, unknown catalog, invalid field
401not logged in
403read-only swissd (server.allowDeploy off), or swissd cannot write
404no such model, variant, plan, release or revision
409the cluster moved or refuses: release exists / is missing / is pending, expectRevision stale, install method mismatch
412the release has no reachable entrypoint (probe, chat)
502a dependency failed: the Kubernetes API, the catalog, the chart registry, the SLO server
503not available on this swissd: no database, SLO server not ready

Read-only mode

With server.allowDeploy off, POST /api/plans, /diff, /apply, /install, rollback, revision diff, uninstall, and PUT/DELETE on slo answer 403. Everything else works.

Install methods

A release is stored one of two ways, chosen at install and never changed:

applyWithStored asApplied by
helmthe plan in ConfigMap swiss-plan-<release> beside the helm releaseswissd running helmfile
llmsvcan LLMService (serving.modelsphere.dev)llm-operator

llmsvc needs the LLMService CRD and a plan composed from a schema v2 catalog. GET /api/cluster reports whether it is available.

Catalogs

Endpoints that read a catalog take ?catalog=<name>. Omitted, it is the only catalog, else the one the site profile marks default; with several and no default it is a 400. Catalog schema v1 is legacy and read-only; v2 pins each variant at its own version.

This document is checked against swissd's routes by internal/server/openapi_test.go.

Overview
License
Apache-2.0
Servers
the swissd serving this document
/