Skip to content

feat: add LLM provider detectors for other CLIs (Gemini, Codex, …) #46

Description

@AhmadHammad21

Context

We added a pluggable LLM backend detector registry in src/agent/llm/detectors/. The first provider, Claude Code, reuses the local CLI's subscription OAuth login as the LLM backend (no API key) via LiteLLM. Adding another provider is intentionally cheap: implement the LlmDetector protocol in a new module and append it to ALL_DETECTORS — no other code changes.

Feature

Add detectors for other locally-installed AI CLIs whose login maps to an LLM endpoint LiteLLM understands.

Candidates (priority order):

  • Gemini CLI — strongest next target. OAuth creds in ~/.gemini/oauth_creds.json, free tier, LiteLLM gemini/*. Same pattern as Claude Code.
  • OpenAI Codex — ChatGPT OAuth in ~/.codex/auth.json, LiteLLM openai/*. Feasible but subscription-OAuth-as-API is grayer than Anthropic's.
  • Others (Copilot, Cursor, Goose, Qwen, Kimi, CodeBuddy): mostly agent CLIs, not raw LLM endpoints — low value for our architecture (we have our own agent loop).

Acceptance criteria

For each provider:

  • Implements the LlmDetector protocol (name, label, provider, enabled, is_installed, resolve, status)
  • Registered in ALL_DETECTORS
  • Surfaced in the Settings → Environment and init-wizard backend cards
  • Verified end-to-end with the real CLI installed: install → detect → live LLM call → confirm

Note

Do not build these blind. Each detector depends on the exact credential-file path, model-slot names, and OAuth token format of the target CLI — only verifiable with the CLI installed and logged in. Build each one only when its CLI is available to test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions