Skip to main content
The job below needs only the langwatch CLI, curl and jq, and it exercises the management API, the data plane and one provider in a single run. Run it on a schedule so a broken credential or an expired secret shows up before a caller finds it.
Runtime: typically 3 to 8 seconds wall-clock. One gateway request + two REST round-trips.

What it checks

  • The management API at /api/gateway/v1/* answers with your CI token.
  • A virtual key is created at the scope you name and its secret is returned once.
  • The gateway resolves that secret and dispatches to a provider.
  • The response carries X-LangWatch-Gateway-Request-Id, so the request is traceable.
  • The key is revoked when the job ends, whether it passed or failed.

Prerequisites

  • An API key for the calling project, in CI_LANGWATCH_TOKEN. It needs the virtualKeys:create and virtualKeys:delete permissions.
  • The scope the CI key lives at, in CI_SCOPE, written as type:id. The types are org, team and project, for example org:acme.
  • At least one model provider credential visible from that scope, configured under Settings → Model Providers.
  • jq on the runner.

The script

Set SMOKE_MODEL to a model your own providers serve. Write it as provider/model, for example anthropic/claude-sonnet-4-5 or azure/<your deployment name>. See Model naming.

GitHub Actions

Wall-clock time is one provider completion plus three short API calls, so it is dominated by the model you pick. Give the job a timeout rather than an expected duration.

Reading a failure

Against a self-hosted install

The two hostnames can be the same if your load balancer routes /api/* to the control plane and /v1/* to the gateway.

Alerting

Fire your own alert from the job’s failure step:
Run this more often than you read /readyz. The probe reports process state only, while this exercises authentication, dispatch, the provider and the spend record.

See also

Last modified on September 6, 2026