tests/testthat/_snaps/provider-google.md

can handle errors

Code
  chat$chat("Hi")
Condition
  Error in `req_perform()`:
  ! HTTP 404 Not Found.
  i models/doesnt-exist is not found for API version v1beta, or is not supported for generateContent. Call ModelService.ListModels to see the list of available models and their supported methods.

defaults are reported

Code
  . <- chat_google_gemini()
Message
  Using model = "gemini-3.5-flash".

can use images

Code
  . <- chat$chat("What's in this image?", image_remote)
Condition
  Error in `method(as_json, list(ellmer::ProviderGoogleGemini, ellmer::ContentImageRemote))`:
  ! Gemini doesn't support remote images


Try the ellmer package in your browser

Any scripts or data that you put into this service are public.

ellmer documentation built on July 14, 2026, 1:07 a.m.