What LLMs are Supported by the Hiring Agent: Ollama and Gemini Models
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 and provider logic defined in 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, the following model names are supported when LLM_PROVIDER is set to ollama:
qwen3:1.7bgemma3:1bqwen3:4bgemma3:4bgemma3:12bmistral: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 and 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-flashgemini-2.0-flash-litegemini-2.5-progemini-2.5-flashgemini-2.5-flash-litegemini-3.5-flashgemini-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 within the MODEL_PROVIDER_MAPPING dictionary. This table associates each model string with a ModelProvider enum value defined in models.py.
The ModelProvider enum declares two members:
ModelProvider.OLLAMAModelProvider.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:
export LLM_PROVIDER=ollama
export DEFAULT_MODEL=gemma3:4b
Then initialize the provider in your Python code:
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:
export LLM_PROVIDER=gemini
export DEFAULT_MODEL=gemini-2.5-pro
export GEMINI_API_KEY=your_api_key_here
The initialization code remains identical:
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:
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. 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 onlocalhost:11434.GeminiProvider– Formats requests for the Google Gemini REST API, handling authentication via theGEMINI_API_KEYenvironment variable.
This abstraction allows the rest of the Hiring Agent codebase (such as PDFHandler in 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.pyviaMODEL_PROVIDER_MAPPING. - The default provider is Ollama with the default model set to
gemma3:4b. - Configure the active provider using the
LLM_PROVIDERenvironment variable (ollamaorgemini). - Both providers implement the
LLMProviderprotocol defined inmodels.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.
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 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, which maps model name strings to ModelProvider enum values. The enum itself is defined in 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. 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.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →