This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is the Open Data Hub OGX Distribution — a containerized distribution of OGX (the opendatahub-io fork of Llama Stack) for AI/ML workflows. The project generates and maintains multi-arch (amd64/arm64) container images with pre-configured providers for inference, vector storage, file processing, and other ML APIs.
The container image is published to quay.io/opendatahub/odh-ogx-core.
# Regenerate all auto-generated files + run linting
pre-commit run --all-files
# Build container image locally
podman build -t ogx-core .
# Run container (requires PostgreSQL and at least one inference endpoint)
podman run -p 8321:8321 -e VLLM_URL=http://host:8000/v1 ogx-core
# Run smoke tests (requires running container, vLLM, and PostgreSQL)
./tests/smoke.sh
# Run integration tests (clones upstream OGX repo, runs pytest against live server)
./tests/run_integration_tests.shLinting is handled entirely via pre-commit: Ruff (Python), Shellcheck (shell), Actionlint (GitHub Actions workflows).
pre-commit run --all-files triggers two local hooks that regenerate distribution artifacts:
-
build/build.py(hook:pkg-gen, always runs) — creates a temp venv, installs OGX, runsogx stack list-depsagainstbuild/build.yamlto discover Python dependencies, then generates:distribution/config.yaml— stripped runtime config (dependency-only providers likeinline::sentence-transformers,inline::milvus,inline::faissare removed)distribution/requirements.txt— full pip requirements including OpenTelemetry instrumentation packagesContainerfile— generated fromContainerfile.in, embedsconfig.yamlas base64-encoded OCI labels
-
build/gen_distro_docs.py(hook:doc-gen, runs whenbuild/build.yaml,build/build.env, ordistribution/config.yamlchange) — generatesdistribution/README.mdwith an API/provider table.
Containerfile— generated fromContainerfile.inbybuild/build.pydistribution/config.yaml— generated frombuild/build.yamlbybuild/build.pydistribution/requirements.txt— generated bybuild/build.pydistribution/README.md— generated bybuild/gen_distro_docs.py
build/build.yaml— the source of truth for all providers. Contains provider definitions with${env.VAR:=default}/${env.VAR:+value}templating for runtime env-var configuration. When adding or removing a provider, edit this file and runpre-commit run --all-files.build/build.env— setsOGX_VERSIONandOGX_INSTALL_FROM_SOURCE. TheOGX_VERSIONenv var can also be overridden at build time.Containerfile.in— the container build template (hand-edited, at repo root). Contains a{config_labels}placeholder thatbuild/build.pysubstitutes with OCI labels embedding the config.yaml as base64.distribution/entrypoint.sh— container entrypoint; runsogx run <config>with optional OpenTelemetry instrumentation whenOTEL_SERVICE_NAMEis set.distribution/constraints.txt— pip constraints for known-broken dependency versions.
Providers in build/build.yaml use conditional provider_id syntax: ${env.SOME_VAR:+provider-name}. When the env var is unset, the provider is skipped at OGX server startup. This means the same config.yaml works for all deployment scenarios — providers activate based on which env vars are present.
The OGX version is set in build/build.env (OGX_VERSION). The build script (build/build.py) reads this and constructs the appropriate pip specifier (source install from git or published package, controlled by OGX_INSTALL_FROM_SOURCE).
redhat-distro-container.yml— main workflow: builds multi-arch images, runs smoke + integration tests against vLLM (local CPU or MaaS) and PostgreSQL, publishes to Quay.io on push tomain/rhoai-v*/release-*. Nightly scheduled builds test against OGXmain.responses-weekly.yml— weekly Responses API test suite across OpenAI, Vertex AI, and vLLM MaaS providers; publishes results to GitHub Pages.- Tekton (
.tekton/) — Konflux/RHOAI downstream build pipelines. create-or-update-release-branch.yml— creates/updatesrelease-*release branches.
PR titles must use Conventional Commits format (<type>(<optional scope>): <description>), enforced by semantic-pr.yml.
Allowed types: build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test.
- Python version: 3.12
- Package manager:
uv - Uses the
opendatahub-io/ogxfork, not upstreamllamastack/llama-stack - The
vllm/directory contains a separate vLLM CPU container image used for CI testing