Mercury CLI
Documentation

Providers

Models and effort

A session's model decides which provider serves its requests. Mercury computes a default model from the recorded sign-ins unless an explicit choice outranks it, and /effort tunes the session's effort.

Model controls

  • /model: Picks the session model and says which model is in use and why.
  • /effort: Tunes the session's effort.
  • /defaultprovider: Makes a provider the most recent sign-in in the sign-in ledger, which changes the computed default.
  • MERCURY_MODEL: Pins a model ahead of the computed default.
  • Session override: An explicit session choice outranks the computed default.

Default selection

A fresh, unpinned session starts on the provider of the most recent sign-in, on the newest model that credential can use. A gated row is never chosen, and a provider with no usable row falls through to the next most recent sign-in.

A token refresh never records a sign-in. Credentials that landed before the sign-in ledger existed, environment-pinned keys included, order after every recorded sign-in, with the configuration's older defaultProvider record first among them, so a home keeps its provider until its next sign-in.

With no sign-in anywhere there is no default. The Boot face and /model say so and point at /logins.

Model identifiers

A persisted model identifier stays provider-qualified, and the namespace detaches for the wire. Each provider declares its identifier space in one table: a reserved qualified namespace, bare prefixes and aliases, or both.

  • compat/<vendor-id>: The custom OpenAI-compatible endpoint.
  • openrouter/<vendor-slug>: OpenRouter, whose own identifiers are vendor/model slugs.
  • huggingface/<org>/<model>[:provider|:policy]: Hugging Face.
  • local/<model>: A local server, with the model as that server lists it.
  • Bare identifiers: Recognized by the prefixes and aliases each provider declares.

An identifier no provider declares is recognized as unrecognized. /model, /health and dispatch name it, and it is refused before any request, credentialed or not, unless one of your own settings carries it: an ANTHROPIC_* model pin naming it, or ANTHROPIC_BASE_URL pointed at a gateway that owns its identifiers.

Change the session model

To change the session model, follow these steps:

  1. Enter /model.
  2. Select the target model, or type its identifier.
  3. Read the transition preview.
  4. Confirm the switch.

Mercury switches the conversation to the target model, and later requests go to that model's provider.

The preview is a frozen plan of what switching this history to the target does, with a typed disposition per item: what replays, which thinking drops, and how images are handled. It also counts the conversation against the target's context window before the first request. The count is the larger of the last count the wire reported for the conversation and a character estimate. The window is the target's as Mercury resolves it: the live catalogue's figure for the account when it has been read, else the pinned figure.

When the conversation does not fit, the preview says so with both numbers and where the window figure came from. Confirming folds the conversation before the first request on the new model, and the fold's summary is written by the model the conversation was built on, whose window holds it. A conversation that fits switches without a fold.

Adjust the session's effort

To adjust the session's effort, follow these steps:

  1. Enter /effort.

Mercury tunes the session's effort within the effort vocabulary and ceiling of the selected model's provider.

Effort vocabulary and ceiling come from the one capability edge that answers every question Mercury asks of a model: identity, context window and output ceilings, thinking support, sampling, tools, media support and beta-header emission. That edge re-reads live state on every call, so no model is treated as one fixed capability set.

/effort saves the pick as the default for later sessions, as /model does. --effort <level> on the command line sets it for one launch, and a resumed session keeps the effort it ran on unless the command line says otherwise.

/defaultprovider makes a provider the most recent sign-in by your word, an entry in the same sign-in ledger the saved-choice rule reads.

A provider whose credential does not resolve refuses with the route to sign in or store a key. A tool-bearing request on a model that cannot take tools is refused before the request with a typed reason. Switching models never authorizes a silent fallback to another provider when a request fails.

Providers and sign-in, Permission modes, Sessions, Web search