# What LLMs are Supported by the Hiring Agent: Ollama and Gemini Models

> Discover which LLMs the Hiring Agent supports including Ollama and Gemini. Learn how to integrate local and cloud models for your hiring process.

- Repository: [HackerRank/hiring-agent](https://github.com/interviewstreet/hiring-agent)
- Tags: getting-started
- Published: 2026-06-28

---

**The Hiring Agent supports two families of Large Language Models (LLMs): local models via Ollama and cloud models via Google Gemini, with specific model names mapped in [`prompt.py`](https://github.com/interviewstreet/hiring-agent/blob/main/prompt.py) and provider logic defined in [`models.py`](https://github.com/interviewstreet/hiring-agent/blob/main/models.py).**

The `interviewstreet/hiring-agent` repository provides a flexible pipeline that abstracts LLM interactions through a unified interface. When asking what LLMs are supported by the Hiring Agent, the answer centers on two distinct providers that offer different deployment models—local inference through Ollama and managed API access through Google Gemini. Both providers implement a common protocol, allowing you to swap between local and cloud models using environment variables.

## Supported LLM Providers

The Hiring Agent currently integrates with two official provider families. The selection determines where inference happens and which model names are valid.

### Ollama (Local) Models

The **Ollama** provider enables local inference using open-source models pulled to your machine. As defined in [`prompt.py`](https://github.com/interviewstreet/hiring-agent/blob/main/prompt.py), the following model names are supported when `LLM_PROVIDER` is set to `ollama`:

- `qwen3:1.7b`
- `gemma3:1b`
- `qwen3:4b`
- `gemma3:4b`
- `gemma3:12b`
- `mistral:7b`

The default configuration uses **Ollama** as the default provider with `gemma3:4b` as the default model. This is encoded in the `ModelProvider` enum and `DEFAULT_MODEL` logic found in [`models.py`](https://github.com/interviewstreet/hiring-agent/blob/main/models.py) and [`prompt.py`](https://github.com/interviewstreet/hiring-agent/blob/main/prompt.py).

### Google Gemini (Cloud) Models

The **Google Gemini** provider connects to Google's generative AI API for cloud-based inference. The supported model names listed in `MODEL_PROVIDER_MAPPING` include:

- `gemini-2.0-flash`
- `gemini-2.0-flash-lite`
- `gemini-2.5-pro`
- `gemini-2.5-flash`
- `gemini-2.5-flash-lite`
- `gemini-3.5-flash`
- `gemini-3.1-flash-lite`

To use Gemini, you must set the `GEMINI_API_KEY` environment variable alongside the provider selection.

## How Model Mapping Works in the Source Code

The mapping between human-readable model names and their respective providers lives in [`prompt.py`](https://github.com/interviewstreet/hiring-agent/blob/main/prompt.py) within the `MODEL_PROVIDER_MAPPING` dictionary. This table associates each model string with a `ModelProvider` enum value defined in [`models.py`](https://github.com/interviewstreet/hiring-agent/blob/main/models.py).

The `ModelProvider` enum declares two members:

- `ModelProvider.OLLAMA`
- `ModelProvider.GEMINI`

When the pipeline initializes, it reads the `LLM_PROVIDER` environment variable to determine which enum member to instantiate. The actual model name is resolved from the `DEFAULT_MODEL` environment variable (or a hardcoded fallback), then validated against the `MODEL_PROVIDER_MAPPING` keys.

## Configuring the LLM Provider

You configure the active LLM at runtime using environment variables. The Hiring Agent reads `LLM_PROVIDER` to determine which concrete implementation to load and `DEFAULT_MODEL` to specify which model weights to invoke.

### Switching to an Ollama Model

Set the following environment variables to use a local Ollama instance:

```bash
export LLM_PROVIDER=ollama
export DEFAULT_MODEL=gemma3:4b

```

Then initialize the provider in your Python code:

```python
from llm_utils import get_provider
import os

provider = get_provider()  # Returns OllamaProvider instance

response = provider.chat(
    model=os.getenv("DEFAULT_MODEL"),
    messages=[{"role": "user", "content": "Summarize this resume"}],
)

```

### Switching to a Gemini Model

For cloud inference via Google Gemini, configure:

```bash
export LLM_PROVIDER=gemini
export DEFAULT_MODEL=gemini-2.5-pro
export GEMINI_API_KEY=your_api_key_here

```

The initialization code remains identical:

```python
from llm_utils import get_provider
import os

provider = get_provider()  # Returns GeminiProvider instance

response = provider.chat(
    model=os.getenv("DEFAULT_MODEL"),
    messages=[{"role": "user", "content": "Extract work experience"}],
)

```

### Inspecting Available Models Programmatically

To query which models are available for each provider without consulting the documentation, import the mapping directly:

```python
from prompt import MODEL_PROVIDER_MAPPING, ModelProvider

def supported_models(provider: ModelProvider) -> list[str]:
    return [name for name, prov in MODEL_PROVIDER_MAPPING.items() if prov == provider]

print("Ollama models:", supported_models(ModelProvider.OLLAMA))
print("Gemini models:", supported_models(ModelProvider.GEMINI))

```

## Provider Architecture

Both providers implement the `LLMProvider` protocol defined in [`models.py`](https://github.com/interviewstreet/hiring-agent/blob/main/models.py). This protocol declares a `chat` method that accepts a model name and a list of message dictionaries, returning the generated response.

The concrete implementations are:

- **`OllamaProvider`** – Translates calls to the Ollama HTTP API, typically running on `localhost:11434`.
- **`GeminiProvider`** – Formats requests for the Google Gemini REST API, handling authentication via the `GEMINI_API_KEY` environment variable.

This abstraction allows the rest of the Hiring Agent codebase (such as `PDFHandler` in [`pdf.py`](https://github.com/interviewstreet/hiring-agent/blob/main/pdf.py)) to remain agnostic to the underlying LLM, switching between local and cloud inference without changing business logic.

## Summary

- The Hiring Agent supports **Ollama** (local) and **Google Gemini** (cloud) LLM providers.
- Model names are mapped to providers in [`prompt.py`](https://github.com/interviewstreet/hiring-agent/blob/main/prompt.py) via `MODEL_PROVIDER_MAPPING`.
- The default provider is **Ollama** with the default model set to `gemma3:4b`.
- Configure the active provider using the `LLM_PROVIDER` environment variable (`ollama` or `gemini`).
- Both providers implement the `LLMProvider` protocol defined in [`models.py`](https://github.com/interviewstreet/hiring-agent/blob/main/models.py), ensuring a consistent interface across local and cloud inference.

## Frequently Asked Questions

### How do I switch between Ollama and Gemini in Hiring Agent?

Set the `LLM_PROVIDER` environment variable to either `ollama` or `gemini`. For Gemini, you must also export `GEMINI_API_KEY`. The selection is read at runtime by `get_provider()` in `llm_utils`, which instantiates the appropriate provider class based on the `ModelProvider` enum defined in [`models.py`](https://github.com/interviewstreet/hiring-agent/blob/main/models.py).

### What is the default LLM model in Hiring Agent?

The default provider is **Ollama** (`ModelProvider.OLLAMA`) and the default model is **`gemma3:4b`**. These defaults are defined in the environment variable handling logic within [`prompt.py`](https://github.com/interviewstreet/hiring-agent/blob/main/prompt.py) and can be overridden by setting `LLM_PROVIDER` and `DEFAULT_MODEL` before running the application.

### Where are the supported LLM models defined in the codebase?

Supported models are declared in the `MODEL_PROVIDER_MAPPING` dictionary in [`prompt.py`](https://github.com/interviewstreet/hiring-agent/blob/main/prompt.py), which maps model name strings to `ModelProvider` enum values. The enum itself is defined in [`models.py`](https://github.com/interviewstreet/hiring-agent/blob/main/models.py) alongside the concrete provider implementations (`OllamaProvider` and `GeminiProvider`).

### Does Hiring Agent support custom or local models beyond Ollama?

The code is architected to support any model that conforms to the `LLMProvider` protocol in [`models.py`](https://github.com/interviewstreet/hiring-agent/blob/main/models.py). While the current implementation only includes Ollama and Gemini providers, you could extend support by creating a new provider class implementing the `chat` method and adding its models to `MODEL_PROVIDER_MAPPING` in [`prompt.py`](https://github.com/interviewstreet/hiring-agent/blob/main/prompt.py).