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

Release files for beaker-sdk 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for beaker-sdk 0.4.2
File Size Uploaded
beaker_sdk-0.4.2.tar.gz 175.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for beaker-sdk 0.4.2
File Interpreter ABI Platform
beaker_sdk-0.4.2-py3-none-any.whl Python 3 none any Details

Total release size: 381.6 kB

Release files / beaker_sdk-0.4.2.tar.gz

Download URL beaker_sdk-0.4.2.tar.gz
Size 175.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4eb165936f2efe39ee8daab969bab6987ce7007a2bf7313ab76f9d603decc5e7
BLAKE2b-256 checksum
How to use checksums
5e0984921474078f2043d8d43e02fe1c4e894cfc51917628057b9ac245106206
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.4

Release files / beaker_sdk-0.4.2-py3-none-any.whl

Download URL beaker_sdk-0.4.2-py3-none-any.whl
Size 206.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9db9c4294853b94253554d14703d0032a8f33f5dd939625e9bcb85889cd75075
BLAKE2b-256 checksum
How to use checksums
8ce0cb55908a1f50e944ba8b34777859d3f1bbfdacc0729d1bacade15116362d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.4

Release history Release notifications | RSS feed

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

This release

0.4.2 This release

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.6

2 release files

0.3.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page