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

The CLI is intentionally noninteractive: choose the remote GitHub branch, dataset, run type, and models before invoking it. --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.0.tar.gz (130.8 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.0-py3-none-any.whl (157.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for beaker_sdk-0.4.0.tar.gz
Algorithm Hash digest
SHA256 3883c29bdf74b0de5e3a7715329cdb87336beb9782cd84210d0c1f515fd31c06
MD5 e0b06a14871014156ed12404d5de0805
BLAKE2b-256 55564f586e50ac776f2505215e2203e3d836d7ea3e1699685417d645889a1f59

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for beaker_sdk-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a741f67a013ae2f88021f177aa1bf67a900c5a0f950be326b5aac247f050c806
MD5 42a6c93f47f5d0d41408d110a7151422
BLAKE2b-256 c45ede86c9cd43a64b21960ad596addfef3d70c3518a5060147ea4f7c41a0a0e

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