Auto routing (default)

Default mode. Every SQL call routes through the control plane's /nodes/recommend endpoint. The control plane picks the best worker based on load, capabilities, workspace affinity, and reservation state, identical to the GUI.

Category: compute-routing

Description

## Overview Auto is the default compute routing mode for the CLI. Rather than talking to a fixed worker, the CLI asks the control plane which compute node should run each statement. This mirrors how the GUI and VS Code extension dispatch queries, so results, failover behaviour, and node selection are consistent across every DeltaForge surface. ## Behavior - On every SQL call, the CLI issues a `GET /nodes/recommend` against the configured control plane and uses the top-ranked node's URL for that statement. - The ranking factors in current node load, declared capabilities, workspace affinity, and any active reservations, so the chosen worker can change between consecutive queries. - Auto is on whenever `compute_url_explicit` is false and no `/use-node <name>` selection is active. Starting the CLI with no `--compute-url` flag or `DF_COMPUTE_URL` value leaves it in Auto. - Inside the REPL, `/use-node auto` clears any pinned selection and returns the session to Auto routing. - A `--node <name>` passed to `query` or `run` resolves a node via `/list-compute-nodes` and pins only that single invocation. It does not switch the persistent session state away from Auto. ## Compatibility - Auto routing requires a reachable control plane. If the control plane is down, SQL execution cannot proceed because no recommendation can be obtained. - Auto is independent of output format, profile, and authentication mode; it applies equally to `query`, `run`, piped stdin, and the interactive REPL.

Examples

delta-forge-cli  # Auto is on
/use-node auto  # re-enable Auto after pinning

Pitfalls

See Also

Open in interactive docs →   DeltaForge home →