def test_process_llm_request_no_model_name(
    built_in_executor: BuiltInCodeExecutor,
):
  """Tests that a ValueError is raised if model name is not set."""
  llm_request = LlmRequest()  # Model name defaults to None
  with pytest.raises(ValueError) as excinfo:
    built_in_executor.process_llm_request(llm_request)
  assert "Gemini code execution tool is not supported for model None" in str(
      excinfo.value
  )
Tests that a ValueError is raised if model name is not set.
tests/unittests/code_executors/test_built_in_code_executor.py