Skip to content

Feature Request: OpenAI-compatible base_url support (Cerebras, Groq, Ollama, LMStudio) #80

Description

@tailorgunjan93

Feature Request: OpenAI-compatible base_url config

Problem

Currently git-lrc only supports 5 hardcoded AI providers (Gemini, OpenAI, Claude, DeepSeek, OpenRouter).
Many popular providers — Cerebras, Groq, Ollama, LMStudio, Together AI — all expose an
OpenAI-compatible API but cannot be used today.

Proposed Solution

Add an openai_compat connector type with a configurable base_url and model field:

# ~/.lrc.toml
[[connector]]
type     = "openai_compat"
base_url = "https://api.cerebras.ai/v1"
api_key  = "your-key"
model    = "llama-3.3-70b"

Since the existing OpenAI connector already handles auth + chat completions,
this would reuse that code with just the base URL swapped out.

Why This Matters

  • Cerebras — free tier, ultra-fast inference
  • Groq — free tier, very fast
  • Ollama / LMStudio — 100% local, no data leaves the machine
  • One change unlocks dozens of providers for free-tier users

Implementation Hint

In the OpenAI connector, replace the hardcoded base URL:

// Before
baseURL := "https://api.openai.com/v1"

// After
baseURL := cfg.GetString("connector.base_url", "https://api.openai.com/v1")

This is a low-effort, high-impact change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions