def test_process_llm_request_non_gemini_2_model(
    built_in_executor: BuiltInCodeExecutor,
):
  """Tests that a ValueError is raised for non-Gemini 2 models."""
  llm_request = LlmRequest(model="gemini-1.5-flash")
  with pytest.raises(ValueError) as excinfo:
    built_in_executor.process_llm_request(llm_request)
  assert (
      "Gemini code execution tool is not supported for model gemini-1.5-flash"
      in str(excinfo.value)
  )
Tests that a ValueError is raised for non-Gemini 2 models.
tests/unittests/code_executors/test_built_in_code_executor.py