Skip to content

Providers

trialdesignbench.providers

Model providers: the APIs that agents and rubric judges call.

A provider is identified by one short kebab-case name, which is the <provider>/ prefix of every model string in TrialDesignBench: tdb run --model, tdb build --judge-model, and TDB_JUDGE_MODEL. The name fixes the API key variable and the exact API host, so the credential check and the egress allowlist follow from the model string alone. trialdesignbench.agents records which providers each agent may call; trialdesignbench.judge names its judges after them (see the naming rule there).

Provider dataclass

A model API used with an API key.

harbor_credential = True class-attribute instance-attribute

True when Harbor's model connection for the provider passes key_env to the agent itself. False when Harbor has no mapping for it: tdb run then adds key_env = "${key_env}" to agents[].env, which Harbor resolves from the host environment at launch, so the value is still never written to job.yaml.

host instance-attribute

Hostname the API is reached at (exact, no wildcards, for allowlists).

key_env instance-attribute

Host variable holding the API key.

name instance-attribute

Identifier: the <provider>/ prefix of model strings (kebab-case).

title instance-attribute

Display name.

split_model(model)

(provider, model_id) of a <provider>/<model> string.

Purely syntactic: the first / separates the provider, so model ids may contain slashes. ValueError when either part is empty. Callers check the provider against the set they accept.