vibe_cli() hands the chat to Mistral's vibe terminal program installed on
your machine. That program handles the connection to Mistral, not tidyllm,
and tidyllm reads its JSON output back. Vibe uses the API key stored by
vibe --setup, or your MISTRAL_API_KEY.
vibe_cli_chat(
.llm,
.model = NULL,
.system_prompt_mode = "prepend",
.cli_tools = FALSE,
.max_turns = NULL,
.max_budget_usd = NULL,
.stateful = FALSE,
.session_id = NULL,
.binary = "vibe",
.verbose = FALSE,
.timeout = 300,
.stream = FALSE,
.dry_run = FALSE
)A new LLMMessage object containing the original messages plus the
reply from Vibe.
An LLMMessage object.
Character; a Mistral model id such as "mistral-large-4". Default NULL uses the model Vibe is configured with.
One of "prepend" or "ignore". With "prepend" the message's system prompt is put before the conversation in the prompt text. With "ignore" it is dropped.
Logical; FALSE, the default, refuses every tool call. TRUE hands over to Vibe's own configuration, which may let it run commands and edit files.
Integer; the most assistant turns Vibe may take. Default NULL leaves it to Vibe.
Numeric; stop the run once it has cost this many US dollars.
Logical; if TRUE, Vibe keeps the conversation on its side. The first call sends the conversation and records the session id in the metadata; later calls resume that session and send only the newest user message instead of replaying the history. Default FALSE sends the whole conversation every time.
Character; resume this Vibe session explicitly. Normally
left NULL, because .stateful = TRUE picks the id up from the message
history on its own.
Character; the command to run, or a full path to it. Defaults
to "vibe", which is looked for on the PATH and then in the places the
installers use. If R does not find it, set
options(tidyllm_vibe_cli_path = "/path/to/vibe") in your .Rprofile, or
the TIDYLLM_VIBE_CLI environment variable.
Logical; if TRUE, prints rate limit information after the response.
Integer; seconds to wait for the whole run.
Logical; accepted so that send_chat() works, but the reply
always arrives in one piece, because Vibe does not stream it.
Logical; if TRUE, returns the command that would be run instead of running it.
Vibe is a coding agent, not a plain completion endpoint. By default tidyllm
runs it in Vibe's ask-first mode, in which every tool call needs an approval
that a non-interactive run cannot give, so Vibe can neither read nor change
files. If the model still tries a tool, the refusal costs a turn; .max_turns
caps how many it may spend. Set .cli_tools = TRUE to use Vibe's own
configuration instead.
Vibe has no system prompt option, so a message's system prompt is put in
front of the prompt text. Vibe does not report token counts, cost or the model
in its output, so those metadata fields are NA, except the model when you
set .model. Replies arrive in one piece; there is no streaming.
if (FALSE) {
llm_message("What is R's S7 class system?") |>
chat(vibe_cli())
llm_message("Explain vapply() in two sentences.") |>
chat(vibe_cli(.model = "mistral-large-4"))
}
Run the code above in your browser using DataLab