secrets dictionary containing API keys and other sensitive values your environment or sandbox needs at runtime:
__init__ method receives these via the secrets parameter:
How It Works
- The client passes secrets when creating a session
- OpenReward stores the real values and replaces them with opaque placeholders
- Your environment receives only the placeholders
- When an outbound request leaves your environment or sandbox, OpenReward injects the real value - but only if the destination host is allowed
Allowed Outbound Hosts
Each secret has a list of allowed hosts that it can be sent to. For common API keys, OpenReward provides sensible defaults:
For secrets without defaults, or to override the defaults, pass a
(value, [hosts]) tuple instead of a plain string:
Secrets with default allowed hosts can be passed as plain strings. Secrets without defaults must use the
(value, [hosts]) format — otherwise the request will be rejected.
