Tidy Integration of Large Language Models
Overview
A tidy interface for integrating large language model (LLM) APIs such as 'Claude', 'OpenAI', 'Gemini', 'Mistral', and local models via 'Ollama' into R workflows. The package supports text, image, audio, video, and document interactions; a unified media interface for attaching inline files or uploading to provider file stores; batch request APIs for cost-efficient large-scale processing; and a pipeline-oriented interface for seamless integration into data workflows. Web services are available at https://www.anthropic.com, https://openai.com, https://aistudio.google.com/, https://mistral.ai/ and https://ollama.com.
This release prepares gemini() for Google's coming change to how
Gemini controls reasoning, and adds Mistral Large 4 and two more command-line
providers, codex_cli() and vibe_cli().
Gemini: .thinking_level replaces .thinking_budget
Google is changing how Gemini controls reasoning. Upcoming Gemini models will reject a
token budget for thinking with a 400 INVALID_ARGUMENT error, and accept only a named
level. gemini() and send_batch() with gemini() now take .thinking_level, one of
"minimal", "low", "medium" or "high":
```r
llm_message("What is 17 * 23?") |>
chat(gemini(.thinking_level = "high"))
```
Show all changes in 0.7.1Hide the rest of the changes in 0.7.1
Leave it unset to use the model's default. Supported levels vary by model;
gemini-3.8-flash accepts "low", "medium" and "high", and Gemini itself returns a
clear error for a level the model does not support.
.thinking_budget still works for the current models but now warns that it is
deprecated. Setting both arguments is an error, because Gemini rejects a request that
contains both.
.temperature, .top_p and .top_k stay in gemini(), but Gemini 3.6 Flash and later
ignore them. Google plans to reject them on upcoming models; their help text now says so.
Mistral Large 4
mistral() works with Mistral Large 4 (mistral-large-4, also mistral-large-4-0),
Mistral's new reasoning model with a 512K-token context, image input and tool calls.
It reasons by default; .reasoning_effort now also accepts "none", which turns
reasoning off. Large 4 supports only "high" and "none". Batches sent with
send_batch(mistral()) take .reasoning_effort too.
```r
llm_message("Summarise this contract clause.") |>
chat(mistral(.model = "mistral-large-4", .reasoning_effort = "none"))
```
The default Mistral model does not change, and mistral-large-latest still points to
the previous Large model.
codex_cli() and vibe_cli(): two more command-line providers
Like claude_cli(), these run a command line tool installed on your own machine and
read its output back. codex_cli() runs OpenAI's Codex CLI and vibe_cli() runs
Mistral's Vibe CLI:
```r
llm_message("Explain what a tibble is in one sentence.") |>
chat(codex_cli())
llm_message("Explain what a tibble is in one sentence.") |>
chat(vibe_cli(.model = "mistral-large-4"))
```
codex_cli() uses the login Codex already has. With .use_api_key = TRUE it uses
your OPENAI_API_KEY instead. It reports token counts, takes .reasoning_effort
and .json_schema, and streams, although Codex sends whole messages, not single
words. Codex adds about 12,000 tokens of its own instructions to every call.
vibe_cli() uses your MISTRAL_API_KEY. Vibe reports no token counts or cost and
sends its reply in one piece. Vibe has no system prompt setting of its own, so
vibe_cli() puts the system prompt in front of the prompt text; set
.system_prompt_mode = "ignore" to leave it out.
Both are agents that can run commands and change files. tidyllm turns that off
unless you set .cli_tools = TRUE. Both can keep a conversation on their side with
.stateful = TRUE, both work with send_chat(), and .dry_run = TRUE shows the
command they would run.
Bug fixes
claude_cli()with its tools off (the default) could still read files, because the Claude CLI kept its read-only tools when the allowed list was empty. It now removes every built-in tool and leaves out your MCP servers, so a plainchat()can no longer read files in the working directory..cli_tools = c("Read", "Glob")now makes exactly those built-in tools available.parallel_chat()withclaude_cli()now stops with a message that the provider does not support it. Before, it failed with an error from httr2. The same holds forcodex_cli()andvibe_cli(); usesend_chat()orchat()in a loop instead.- Printing the command from a
.dry_runof a command-line provider now quotes each argument, so it can be pasted into a shell. - An image attached with
img()is now an error for providers that cannot take images (claude_cli(),codex_cli(),vibe_cli()anddeepseek()), inchat(),send_chat()andparallel_chat(). Before, the command-line providers sent the text alone and dropped the image without a word, anddeepseek()sent the image to an API that does not take images.provider_capabilities(.what = "media")now also lists images forellmer(), which has always sent them. - A streamed request that the provider rejects now shows the provider's error message, for every provider that streams over HTTP. Before, it showed only the HTTP status, such as "HTTP 400 Bad Request.".
mistral()now shows Mistral's own error message, for example for an unsupported.reasoning_effortor an invalid API key, instead of "Received empty response from Mistral". The same holds for Mistral embeddings,list_models()and the batch functions; checking a batch id that does not exist is now an error instead of an empty table.- Deprecation warnings raised inside a chat request, such as for
.fileidingemini()and.file_idsinclaude(), no longer tell you to report a bug in tidyllm when you call them throughchat(),%>%,purrr::map()ortryCatch(). - The deprecated
.fileidargument ofgemini()no longer also warns aboutgemini_file_metadata(), a function you did not call.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-04
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- NOTE12 OK, 1 NOTE2026-06-07
Show 1 earlier changeHide 1 earlier change
- OK14 OK2026-03-10
Documentation
The repository also keeps web-only articles.
- Help pages
- 147 (2 internal)includes a package overview page
- Examples that run
- 16%4 run in a plain check · 21 never run
- Exported functions with examples
- 17%
- Documented parameters
- 100%
- Return-value docs
- 97%
- Help pages citing references
- 0%
- Get Started HTML
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 5
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
7 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/edubruell/tidyllm on 2026-10-18.
GitHub Pages site last deployed 2026-10-14 · The repository has a site deploy workflow
pkgdown site last built 2026-10-14
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-07-22Named in .Rbuildignore: .claude, CLAUDE.mdNamed in .gitignore: CLAUDE.mdCommits: at least 1 crediting it in the message
- Codexfirst seen on or before 2026-10-08Commits: some crediting it in the message, count not recorded
- Claude Sonnet 51 commit · Sep 2026
Dependencies
Installing tidyllm adds 32 packages (22 with compiled code, 23 MB of source tarballs). Heaviest: stringi 11 MB, Rcpp 1.8 MB, openssl 1.1 MB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 0.7.1Latest2026-10-14 · current release · diff ↗ ·
added 4 exports
codex_cli, codex_cli_chat, vibe_cli, vibe_cli_chat - 0.7.02026-10-05 · diff ↗ ·
added 5 exports
claude_cli, claude_cli_chat, provider_capabilities, websearch, websearch_tool - 0.6.02026-09-08 · diff ↗ ·
added 6 exports
cancel_job, get_partial, get_stream, parallel_chat, send_chat, tidyllm_example_app - 0.5.22026-07-30 · diff ↗
- 0.5.12026-07-23 · diff ↗
- 0.5.02026-04-30 · diff ↗ ·
added 14 exports
audio_file, chat_completions, chat_completions_chat, delete_file, file_info, list_files, openai_check_research, openai_code_interpreter, openai_deep_research, openai_fetch_research, openai_websearch, pdf_file, upload_file, video_file - RR 4.6.0 released · 2026-04-24
- 0.4.02025-08-22 · diff ↗ ·
added 28 exports
chat_ellmer, check_job, claude_websearch, deep_research, ellmer, ellmer_tool, fetch_job, gemini_list_models, list_hf_gguf_files, llamacpp, llamacpp_chat, llamacpp_delete_model, llamacpp_download_model, llamacpp_embedding, llamacpp_health, llamacpp_list_local_models, llamacpp_list_models, llamacpp_rerank, openrouter, openrouter_chat, openrouter_credits, openrouter_embedding, openrouter_generation, openrouter_list_models, perplexity_check_research, perplexity_deep_research, perplexity_fetch_research, voyage_rerank - 0.3.52025-08-22 · diff ↗ ·
added 8 exports
check_gemini_batch, claude_delete_file, claude_file_metadata, claude_list_files, claude_upload_file, fetch_gemini_batch, list_gemini_batches, send_gemini_batch - RR 4.5.0 released · 2025-04-11
- 0.3.42025-03-27 · diff ↗ ·
added 5 exports
check_groq_batch, fetch_groq_batch, field_object, list_groq_batches, send_groq_batch - 0.3.22025-03-08 · diff ↗ ·
added 6 exports
deepseek, deepseek_chat, img, tidyllm_tool, voyage, voyage_embedding - 0.3.12025-02-24 · diff ↗ ·
added 16 exports
check_azure_openai_batch, claude_list_models, fetch_azure_openai_batch, field_chr, field_dbl, field_fct, field_lgl, get_logprobs, groq_list_models, list_azure_openai_batches, list_models, mistral_list_models, ollama_delete_model, openai_list_models, send_azure_openai_batch, send_ollama_batch - 0.3.02024-12-08 · diff ↗ ·
removed 3 exports
.onAttach, initialize_api_env, update_rate_limitadded 30 exports
LLMMessage, azure_openai_chat, azure_openai_embedding, cancel_openai_batch, chat, check_batch, check_mistral_batch, claude_chat, embed, fetch_batch, fetch_mistral_batch, gemini, gemini_chat, gemini_delete_file, gemini_embedding, gemini_file_metadata, gemini_list_files, gemini_upload_file, get_metadata, groq_chat, last_metadata, list_batches, list_mistral_batches, mistral_chat, ollama_chat, openai_chat, perplexity, perplexity_chat, send_batch, send_mistral_batch - 0.2.02024-11-07 · diff ↗ ·
removed 1 export
wait_rate_limitadded 23 exports
azure_openai, check_claude_batch, check_openai_batch, fetch_claude_batch, fetch_openai_batch, get_reply, get_reply_data, get_user_message, groq_transcribe, last_reply_data, last_user_message, list_claude_batches, list_openai_batches, mistral, mistral_embedding, ollama_download_model, ollama_embedding, openai, openai_embedding, pdf_page_batch, send_claude_batch, send_openai_batch, tidyllm_schema - 0.1.02024-10-10
Show 1 earlier eventHide 1 earlier event
- RR 4.4.0 released · 2024-04-24
Package metadata
- First published
- 2024-10-10
- Total releases
- 14 / 2 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.2.0
- Download size
- 1.4 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("tidyllm")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.