Running ‘testthat.R’ [125s/177s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(ellmer)
  > 
  > test_check("ellmer")
  Starting 2 test processes
  [ FAIL 2 | WARN 0 | SKIP 197 | PASS 411 ]
  
  ══ Skipped tests (197) ═════════════════════════════════════════════════════════
  • ANTHROPIC_API_KEY env var is not configured (6):
    'test-provider-anthropic.R:11:3', 'test-provider-anthropic.R:25:3',
    'test-provider-anthropic.R:67:3', 'test-provider-anthropic.R:85:3',
    'test-provider-anthropic.R:90:3', 'test-batch-chat.R:35:3'
  • AZURE_OPENAI_API_KEY env var is not configured (5):
    'test-provider-azure.R:4:3', 'test-provider-azure.R:11:3',
    'test-provider-azure.R:26:3', 'test-provider-azure.R:32:3',
    'test-provider-azure.R:38:3'
  • CLOUDFLARE_ACCOUNT_ID env var is not configured (4):
    'test-provider-cloudflare.R:4:3', 'test-provider-cloudflare.R:11:3',
    'test-provider-cloudflare.R:19:3', 'test-provider-cloudflare.R:44:3'
  • DEEPSEEK_API_KEY env var is not configured (4):
    'test-provider-deepseek.R:4:3', 'test-provider-deepseek.R:11:3',
    'test-provider-deepseek.R:19:3', 'test-provider-deepseek.R:25:3'
  • Failed to locate AWS credentials (11): 'test-provider-aws.R:2:3',
    'test-provider-aws.R:9:3', 'test-provider-aws.R:15:3',
    'test-provider-aws.R:19:3', 'test-provider-aws.R:28:3',
    'test-provider-aws.R:41:3', 'test-provider-aws.R:47:3',
    'test-provider-aws.R:53:3', 'test-provider-aws.R:59:3',
    'test-provider-aws.R:66:3', 'test-provider-aws.R:72:3'
  • GROQ_API_KEY env var is not configured (2): 'test-provider-groq.R:4:3',
    'test-provider-groq.R:8:15'
  • HUGGINGFACE_API_KEY env var is not configured (7):
    'test-provider-huggingface.R:2:3', 'test-provider-huggingface.R:9:3',
    'test-provider-huggingface.R:17:3', 'test-provider-huggingface.R:22:5',
    'test-provider-huggingface.R:29:3', 'test-provider-huggingface.R:34:3',
    'test-provider-huggingface.R:39:5'
  • MISTRAL_API_KEY env var is not configured (7): 'test-provider-mistral.R:4:3',
    'test-provider-mistral.R:11:3', 'test-provider-mistral.R:17:3',
    'test-provider-mistral.R:24:3', 'test-provider-mistral.R:30:3',
    'test-provider-mistral.R:43:3', 'test-provider-mistral.R:47:15'
  • OPENAI_API_KEY env var is not configured (49): 'test-chat.R:4:3',
    'test-chat.R:28:3', 'test-chat.R:33:3', 'test-chat.R:39:3',
    'test-chat.R:50:3', 'test-chat.R:59:3', 'test-chat.R:64:3',
    'test-chat.R:74:3', 'test-chat.R:82:3', 'test-chat.R:87:3',
    'test-chat.R:95:3', 'test-chat.R:108:3', 'test-chat.R:128:3',
    'test-chat.R:152:3', 'test-chat.R:160:3', 'test-chat.R:169:3',
    'test-chat.R:182:3', 'test-chat.R:192:3', 'test-chat.R:201:3',
    'test-chat.R:215:3', 'test-chat.R:225:3', 'test-chat.R:244:3',
    'test-chat.R:252:3', 'test-provider-any.R:12:3', 'test-batch-chat.R:2:3',
    'test-batch-chat.R:47:3', 'test-batch-chat.R:93:3',
    'test-batch-chat.R:111:3', 'test-batch-chat.R:121:3',
    'test-provider-openai.R:4:3', 'test-provider-openai.R:11:3',
    'test-provider-openai.R:17:3', 'test-provider-openai.R:24:3',
    'test-provider-openai.R:30:3', 'test-provider-openai.R:43:3',
    'test-provider-openai.R:63:3', 'test-provider-openai.R:72:3',
    'test-provider-openai.R:83:3', 'test-provider-openai.R:121:3',
    'test-content.R:2:3', 'test-chat-tools.R:4:3', 'test-chat-tools.R:16:3',
    'test-chat-tools.R:22:3', 'test-chat-tools.R:180:3',
    'test-chat-tools.R:244:3', 'test-chat-tools.R:271:3',
    'test-chat-tools.R:296:3', 'test-chat-tools.R:325:3',
    'test-chat-tools.R:369:3'
  • OPENROUTER_API_KEY env var is not configured (6):
    'test-provider-openrouter.R:4:3', 'test-provider-openrouter.R:11:3',
    'test-provider-openrouter.R:17:3', 'test-provider-openrouter.R:29:3',
    'test-provider-openrouter.R:35:3', 'test-provider-openrouter.R:41:3'
  • On CRAN (54): 'test-provider-any.R:2:3', 'test-provider-azure.R:20:3',
    'test-provider-azure.R:72:3', 'test-provider-azure.R:107:5',
    'test-provider-databricks.R:127:5', 'test-provider-ollama.R:61:3',
    'test-provider-snowflake-cortex.R:25:3',
    'test-provider-snowflake-cortex.R:40:3',
    'test-provider-snowflake-cortex.R:124:3', 'test-provider-snowflake.R:26:3',
    'test-chat-structured.R:5:3', 'test-provider-openai.R:102:3',
    'test-content-image.R:14:3', 'test-content-image.R:44:3',
    'test-content-image.R:62:3', 'test-content-replay.R:80:3',
    'test-content-replay.R:91:3', 'test-content-replay.R:101:3',
    'test-content.R:36:3', 'test-content.R:62:3', 'test-content.R:82:3',
    'test-content.R:95:3', 'test-interpolate.R:2:3', 'test-interpolate.R:16:3',
    'test-interpolate.R:21:3', 'test-params.R:8:3', 'test-params.R:26:3',
    'test-tokens.R:4:3', 'test-tokens.R:23:3', 'test-tokens.R:46:3',
    'test-tools-def-auto.R:13:3', 'test-tools-def-auto.R:21:3',
    'test-tools-def-auto.R:25:3', 'test-tools-def-auto.R:35:3',
    'test-tools-def.R:18:3', 'test-tools-def.R:47:3', 'test-tools-def.R:66:3',
    'test-tools-def.R:79:3', 'test-tools-def.R:87:3', 'test-tools-def.R:101:3',
    'test-turns.R:26:3', 'test-turns.R:36:3', 'test-turns.R:50:3',
    'test-turns.R:69:3', 'test-utils-S7.R:9:3', 'test-utils-callbacks.R:4:3',
    'test-utils-cat.R:81:9', 'test-utils.R:11:3', 'test-utils.R:23:3',
    'test-chat-tools.R:123:3', 'test-chat-tools.R:229:3',
    'test-chat-tools.R:580:3', 'test-chat-tools.R:608:3',
    'test-chat-tools.R:768:3'
  • PORTKEY_API_KEY env var is not configured (6): 'test-provider-portkey.R:4:3',
    'test-provider-portkey.R:14:3', 'test-provider-portkey.R:25:3',
    'test-provider-portkey.R:30:5', 'test-provider-portkey.R:38:5',
    'test-provider-portkey.R:46:5'
  • Run manually; 24 hour rate limit (1): 'test-provider-azure.R:42:3'
  • SNOWFLAKE_ACCOUNT env var is not configured (5):
    'test-provider-snowflake-cortex.R:129:3', 'test-provider-snowflake.R:4:3',
    'test-provider-snowflake.R:11:3', 'test-provider-snowflake.R:30:3',
    'test-provider-snowflake.R:34:3'
  • VLLM_API_KEY env var is not configured (3): 'test-provider-vllm.R:4:3',
    'test-provider-vllm.R:11:3', 'test-provider-vllm.R:17:15'
  • empty test (2): 'test-provider-databricks.R:35:1',
    'test-provider-snowflake.R:37:1'
  • no Databricks credentials available (2): 'test-provider-databricks.R:24:3',
    'test-provider-databricks.R:90:3'
  • no Databricks workspace configured (4): 'test-provider-databricks.R:2:3',
    'test-provider-databricks.R:11:3', 'test-provider-databricks.R:28:3',
    'test-provider-databricks.R:32:3'
  • no Google credentials available (13): 'test-provider-google-upload.R:3:3',
    'test-provider-google.R:4:3', 'test-provider-google.R:11:3',
    'test-provider-google.R:17:3', 'test-provider-google.R:22:3',
    'test-provider-google.R:28:3', 'test-provider-google.R:34:3',
    'test-provider-google.R:41:3', 'test-provider-google.R:47:3',
    'test-provider-google.R:54:3', 'test-provider-google.R:61:3',
    'test-provider-google.R:65:3', 'test-provider-google.R:76:3'
  • ollama not found (6): 'test-provider-ollama.R:4:3',
    'test-provider-ollama.R:11:3', 'test-provider-ollama.R:17:3',
    'test-provider-ollama.R:22:3', 'test-provider-ollama.R:32:3',
    'test-provider-ollama.R:46:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-provider-anthropic.R:53:3'): can use images ────────────────────
  <vcr_unhandled/rlang_error/error/condition>
  Error in `RequestHandlerHttr2$new(req)$handle()`: Failed to find matching request in active cassette, "anthropic-images".
  i Use `local_vcr_configure_log()` to get more details.
  i Learn more in `vignette(vcr::debugging)`.
  Backtrace:
       ▆
    1. └─ellmer:::test_images_inline(chat_fun) at test-provider-anthropic.R:53:3
    2.   └─chat$chat(...) at tests/testthat/helper-provider.R:88:3
    3.     └─coro::collect(...)
    4.       └─coro:::reduce_steps(x, steps, along_builder(list()))
    5.         └─coro:::reduce(x, reducer, .init = identity)
    6.           └─coro:::reduce_impl(.x, .f, ..., .init = .init)
    7.             └─coro:::iter_reduce_impl(.x, .f, ..., .left = .left)
    8.               ├─coro::is_exhausted(new <- .x())
    9.               └─coro (local) .x()
   10.                 └─base::evalq(...)
   11.                   └─base::evalq(...)
   12.                     └─base::evalq(...)
   13.                       └─base::evalq(...)
   14.                         ├─coro::is_exhausted(elt <- iterator())
   15.                         └─coro (local) iterator()
   16.                           └─base::evalq(...)
   17.                             └─base::evalq(...)
   18.                               ├─base::evalq(...)
   19.                               │ └─base::evalq(...)
   20.                               │   └─coro (local) user(...)
   21.                               │     ├─.last_value <<- eval_bare(substitute(expr), user_env)
   22.                               │     │ └─rlang::env_poke(env, lhs, value, inherit = TRUE, create = FALSE)
   23.                               │     └─rlang::eval_bare(substitute(expr), user_env)
   24.                               └─ellmer:::chat_perform(...)
   25.                                 └─ellmer:::chat_perform_value(provider, req)
   26.                                   ├─httr2::resp_body_json(req_perform(req))
   27.                                   │ └─httr2:::check_response(resp)
   28.                                   │   └─httr2:::is_response(resp)
   29.                                   └─httr2::req_perform(req)
   30.                                     └─vcr (local) mock(req)
   31.                                       └─RequestHandlerHttr2$new(req)$handle()
   32.                                         └─cli::cli_abort(...)
   33.                                           └─rlang::abort(...)
  ── Error ('test-provider-openai.R:51:3'): can use images ───────────────────────
  <vcr_unhandled/rlang_error/error/condition>
  Error in `RequestHandlerHttr2$new(req)$handle()`: Failed to find matching request in active cassette, "openai-image".
  i Use `local_vcr_configure_log()` to get more details.
  i Learn more in `vignette(vcr::debugging)`.
  Backtrace:
       ▆
    1. └─ellmer:::test_images_inline(chat_fun) at test-provider-openai.R:51:3
    2.   └─chat$chat(...) at tests/testthat/helper-provider.R:88:3
    3.     └─coro::collect(...)
    4.       └─coro:::reduce_steps(x, steps, along_builder(list()))
    5.         └─coro:::reduce(x, reducer, .init = identity)
    6.           └─coro:::reduce_impl(.x, .f, ..., .init = .init)
    7.             └─coro:::iter_reduce_impl(.x, .f, ..., .left = .left)
    8.               ├─coro::is_exhausted(new <- .x())
    9.               └─coro (local) .x()
   10.                 └─base::evalq(...)
   11.                   └─base::evalq(...)
   12.                     └─base::evalq(...)
   13.                       └─base::evalq(...)
   14.                         ├─coro::is_exhausted(elt <- iterator())
   15.                         └─coro (local) iterator()
   16.                           └─base::evalq(...)
   17.                             └─base::evalq(...)
   18.                               ├─base::evalq(...)
   19.                               │ └─base::evalq(...)
   20.                               │   └─coro (local) user(...)
   21.                               │     ├─.last_value <<- eval_bare(substitute(expr), user_env)
   22.                               │     │ └─rlang::env_poke(env, lhs, value, inherit = TRUE, create = FALSE)
   23.                               │     └─rlang::eval_bare(substitute(expr), user_env)
   24.                               └─ellmer:::chat_perform(...)
   25.                                 └─ellmer:::chat_perform_value(provider, req)
   26.                                   ├─httr2::resp_body_json(req_perform(req))
   27.                                   │ └─httr2:::check_response(resp)
   28.                                   │   └─httr2:::is_response(resp)
   29.                                   └─httr2::req_perform(req)
   30.                                     └─vcr (local) mock(req)
   31.                                       └─RequestHandlerHttr2$new(req)$handle()
   32.                                         └─cli::cli_abort(...)
   33.                                           └─rlang::abort(...)
  
  [ FAIL 2 | WARN 0 | SKIP 197 | PASS 411 ]
  Error: Test failures
  Execution halted