What LLM Providers Are Supported by Hiring Agent? A Complete Guide to Ollama and Gemini Integration

The Hiring Agent supports two LLM providers: Ollama for local inference and Google Gemini for cloud-based inference, configurable via environment variables.

The interviewstreet/hiring-agent repository provides a flexible pipeline that abstracts large language model interactions through a unified provider interface. Understanding which LLM providers are supported by Hiring Agent is essential for configuring self-hosted privacy or leveraging cloud-based performance. The architecture clearly separates provider-specific implementations from the core business logic, allowing seamless runtime switching between local and hosted models.

Supported LLM Providers in Hiring Agent

The codebase currently implements two distinct provider families, each exposing specific model names that the hiring pipeline can invoke.

Ollama (Local Models)

Ollama enables local inference without external API dependencies, making it ideal for sensitive recruitment data. The supported Ollama models as defined in MODEL_PROVIDER_MAPPING within prompt.py include:

  • qwen3:1.7b
  • gemma3:1b
  • qwen3:4b
  • gemma3:4b
  • gemma3:12b
  • mistral:7b

The provider implementation OllamaProvider in models.py translates generic chat requests into Ollama-specific API calls.

Google Gemini (Cloud Models)

Google Gemini provides access to frontier models with higher throughput and advanced reasoning capabilities. Available Gemini models 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

The GeminiProvider class in models.py handles authentication and request formatting for the Gemini API.

How Provider Selection Works in the Codebase

Provider configuration relies on a centralized mapping system and environment-based runtime selection.

The Model-to-Provider Mapping

In prompt.py, the dictionary MODEL_PROVIDER_MAPPING associates each model string with its corresponding ModelProvider enum value. This mapping ensures that when you specify a model name like gemma3:4b, the system automatically routes to Ollama, whereas gemini-2.5-pro routes to Google Gemini.

The ModelProvider enum defined in models.py contains two members:

  • ModelProvider.OLLAMA
  • ModelProvider.GEMINI

Runtime Configuration via Environment Variables

The system selects providers through the LLM_PROVIDER environment variable (accepting values ollama or gemini). The specific model name is read from DEFAULT_MODEL (or the DEFAULT_MODEL environment variable).

Default behavior: If no environment variables are set, the Hiring Agent defaults to ModelProvider.OLLAMA with the gemma3:4b model.

Both concrete providers implement the LLMProvider protocol defined in models.py, which mandates a chat method signature ensuring interchangeable usage throughout the pipeline.

Configuring Your Preferred LLM Provider

Switching between providers requires minimal configuration changes.

Switching to Ollama

Set your environment variables to enable local inference:


# .env file or export in shell

LLM_PROVIDER=ollama
DEFAULT_MODEL=gemma3:4b

Then invoke the provider in your Python code:

from llm_utils import get_provider

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

Switching to Gemini

Cloud-based inference requires an API key:


# .env file

LLM_PROVIDER=gemini
DEFAULT_MODEL=gemini-2.5-pro
GEMINI_API_KEY=YOUR_API_KEY

The implementation call remains identical due to the shared protocol:

from llm_utils import get_provider

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

Programmatic Access to Model Metadata

You can inspect available models dynamically without hardcoding values:

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))

This queries the canonical source of truth in prompt.py, ensuring your code remains synchronized with the repository's supported model list.

Summary

  • Two providers supported: Ollama (local) and Google Gemini (cloud), as implemented in models.py.
  • Configuration method: Set LLM_PROVIDER to ollama or gemini, and DEFAULT_MODEL to a valid model name from MODEL_PROVIDER_MAPPING in prompt.py.
  • Default setup: Ollama provider with gemma3:4b model when no environment variables are specified.
  • Protocol-based architecture: Both providers implement the LLMProvider interface with a standardized chat method, enabling provider-agnostic code.
  • Authentication: Gemini requires GEMINI_API_KEY; Ollama requires no API key but needs a local server running.

Frequently Asked Questions

What is the default LLM provider in Hiring Agent?

The default provider is Ollama (ModelProvider.OLLAMA), and the default model is gemma3:4b. This configuration activates when the LLM_PROVIDER and DEFAULT_MODEL environment variables are unset, providing immediate functionality for users with local inference infrastructure.

How do I switch from Ollama to Google Gemini?

Set the environment variable LLM_PROVIDER=gemini and DEFAULT_MODEL to your preferred Gemini model name (such as gemini-2.5-pro). You must also provide GEMINI_API_KEY for authentication. The get_provider() utility function in llm_utils automatically instantiates the GeminiProvider class when these variables are detected.

Where is the provider mapping defined in the source code?

The mapping between model names and providers lives in prompt.py within the MODEL_PROVIDER_MAPPING dictionary. The provider type definitions (enum and protocol) reside in models.py, which also contains the concrete OllamaProvider and GeminiProvider classes that handle provider-specific API translation.

Do I need an API key for both providers?

No. Ollama requires no API key and runs entirely on your local infrastructure. Google Gemini requires the GEMINI_API_KEY environment variable for cloud authentication. The GeminiProvider implementation in models.py uses this key to authenticate requests to Google's API endpoints.

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:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →