Skip to main content

beaker

Beaker SDK and CLI package.

beaker gives developers the tools to define optimization specs, validate them locally, upload datasets, configure hosted run environments, launch optimization runs, and inspect results from code or the CLI.

Customer specs import contract types directly from beaker:

from beaker import Case, CaseDataLoader, CaseResult, CaseScore, Spec, spec

Hosted model-selection rollouts also expose a generic OpenAI-compatible target:

from beaker import RolloutContext, inference_target


def build_eval_client(runtime: RolloutContext):
    target = inference_target(runtime)
    return YourFrameworkClient(
        base_url=target.base_url,
        api_key=target.api_key,
        model=target.model,
    )

Call inference_target only in the evaluation path when runtime.model is set. Production application calls should retain the application's existing model and client defaults. The structural beaker run smoke check does not invoke this path.

CLI run lifecycle

Every command, the endpoint it calls, and who can run it are documented in docs/cli-reference.md.

The CLI is intentionally noninteractive: choose the remote GitHub branch, dataset, run type, and models before invoking it. Runs use the repository's GitHub default branch when --ref is omitted. --ref resolves a remote GitHub ref, so unpushed local changes are not included.

# Discover launch inputs.
beaker github branches --repo owner/repository
beaker model list --available-only

# Ordinary prompt optimization.
beaker run trigger --ref feature/prompts --dataset invoices@production

# Optimize the production system without an initial benchmark.
beaker run trigger --ref feature/prompts --dataset invoices \
  --execution-mode optimize_only

# Benchmark and optimize selected models.
beaker run trigger --ref feature/prompts --dataset invoices \
  --optimization-model openai:gpt-4o \
  --optimization-model anthropic:claude-sonnet-4-5 \
  --execution-mode benchmark_and_optimize --benchmark-split TEST

# Discover, inspect, and cancel runs.
beaker run list
beaker run status RUN_ID
beaker run status RUN_ID --watch
beaker run cancel RUN_ID

Lifecycle commands support stable JSON for automation:

beaker model list --json
beaker github branches --repo owner/repository --json
beaker run trigger --ref feature/prompts --dataset invoices --json
beaker run list --json
beaker run status RUN_ID --json
beaker run cancel RUN_ID --json

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

beaker_sdk-0.4.1.tar.gz (165.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

beaker_sdk-0.4.1-py3-none-any.whl (196.8 kB view details)

Uploaded Python 3

File details

Details for the file beaker_sdk-0.4.1.tar.gz.

File metadata

  • Download URL: beaker_sdk-0.4.1.tar.gz
  • Upload date:
  • Size: 165.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.4

File hashes

Hashes for beaker_sdk-0.4.1.tar.gz
Algorithm Hash digest
SHA256 b3b46f68c2e56feb10ac68731726589a472883e4a8ffa28776baf3afe68afdfd
MD5 8881f4e193d87a95ad47c74b67207980
BLAKE2b-256 6089a5b3f0a89c7f8329e64c0537fb23fa8eb5a9281559f58354f83e6f24670f

See more details on using hashes here.

File details

Details for the file beaker_sdk-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: beaker_sdk-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 196.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.4

File hashes

Hashes for beaker_sdk-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d0ec95f5acc9959112c8aceedffeaeca1975b5e434ba18b98a27c23fab38f32b
MD5 0d4dc57ff5bb75a33ab99bccb164d386
BLAKE2b-256 fcb94d1f8b4827c171f61fbe1d1a5bf830bf73dc753d1733fe61fcc3e8e9d26e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page