rlmesh.RemoteModel

classfrom rlmesh import RemoteModel[source]

Dependency-free client for a model already served on an endpoint.

RemoteModel(
    address: str | None = None,
    *,
    host: str | None = None,
    port: int | None = None,
    path: str | None = None,
    transport: Transport | None = None,
    connect_timeout_seconds: float | None = None,
    request_timeout_seconds: float | None = None,
) -> None

Bind it to an environment with rlmesh.run() or rlmesh.session().

address

property[source]
property address: str

Model endpoint address this handle dials.

session

function[source]
session(
    env: EnvTarget,
    *,
    instruction: str | None = None,
    close_env: bool = False,
    trust_entrypoints: bool | None = None,
    execution_horizon: int = 1,
    view: ViewArg = None,
    workflow_edition: str | None = None,
) -> Session[Any, Any]

Bind this served policy to env and return a rlmesh.Session.

env is an env client (e.g. RemoteEnv/SandboxEnv) exposing an env_contract; that contract – including the env’s adapter tags – is sent to the model server, which resolves its adapter for this env. instruction and trust_entrypoints apply to local models and are rejected here (the served model owns its adapter). view opts into the built-in live viewer over this client’s own env loop (see rlmesh.run()).

execution_horizon (> 1) opts a chunk-capable served model into action chunking: the model emits its native chunk, and this client replays a prefix of it one action per step open-loop (skipping the RPC), re-planning every execution_horizon steps. The model must define predict_chunk; otherwise it re-plans every step.

workflow_edition declares this runtime’s edition for the session, ahead of the process and project declarations. It also overrides the runtime declaration used to connect the env handle; the env server’s own declaration still constrains the session floor.