Skip to content

Add Claude/Gemini CLI and Anthropic Claude API as LLM backends #204

Description

@23f3001304

Problem

The pipeline currently supports two LLM backends: Ollama (local) and the Google Gemini API, so using a hosted model requires a Gemini API key. Many users already have the Claude Code CLI or the Gemini CLI installed and signed in through their subscription, or have an Anthropic API key, but there is no way to use any of those with the hiring agent today.

Proposed solution

Add three backends, selected with LLM_PROVIDER, reusing the existing provider abstraction in models.py:

  • claude: Anthropic Claude HTTP API (uses ANTHROPIC_API_KEY)
  • claude_cli: the Claude Code CLI (claude -p), using your existing CLI login, no API key needed
  • gemini_cli: the Gemini CLI, using your existing CLI login, no API key needed

Design constraints to keep it clean:

  • Additive only: Ollama and the Gemini API keep working unchanged.
  • Same chat() contract and output shape, so the pipeline stages do not change.
  • Provider-agnostic prompts: no template changes; provider-specific flags stay inside the provider classes.
  • Graceful fallback to Ollama when a prerequisite (API key or installed CLI) is missing.

Alternatives considered

  • Adding only the Anthropic API: still requires managing an API key and does not help users who rely on a CLI subscription.
  • A separate script/wrapper per provider: duplicates logic; the provider interface already supports this cleanly.

Environment

  • OS: Windows (implementation is cross-platform)
  • Python: 3.11+
  • hiring-agent: current main

I'd like to work on this; I have a branch ready.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions