Skip to main content
Switch providers by changing one line — your agent definition stays the same.

Supported Providers

ProviderExampleEnv Var
Anthropicanthropic:claude-sonnet-4-6ANTHROPIC_API_KEY
OpenAIopenai:gpt-4oOPENAI_API_KEY
Googlegoogle:gemini-2.0-flash-001GOOGLE_API_KEY
Groqgroq:llama-3.3-70b-versatileGROQ_API_KEY
xAIxai:grok-2-1212XAI_API_KEY
Mistralmistral:mistral-large-latestMISTRAL_API_KEY
OpenRouteropenrouter:anthropic/claude-3.5-sonnetOPENROUTER_API_KEY
Cerebrascerebras:llama3.1-70bCEREBRAS_API_KEY
DeepSeekdeepseek:deepseek-chatDEEPSEEK_API_KEY
Amazon Bedrockamazon-bedrock:anthropic.claude-3-sonnetAWS credentials
Google Vertexgoogle-vertex:gemini-2.5-flashGCP ADC
Azure OpenAIazure-openai-responses:gpt-4oAZURE_OPENAI_API_KEY
For provider-specific credentials — Azure OpenAI, Amazon Bedrock, Google Vertex AI, and Cloudflare Workers AI all take extra environment variables beyond a single API key. See Environment Variables for the full list.

Model Resolution Order

When multiple model sources are configured, GitAgent resolves the active model in this priority order:
  1. Environment config model_override — from config/<env>.yaml
  2. CLI flag --model provider:model-id — passed at runtime
  3. agent.yaml model.preferred — defined in the agent repo

Custom / OpenAI-Compatible Endpoints

Any OpenAI-compatible endpoint works — point GitAgent at it inline, via an environment variable, or in agent.yaml.
# Inline URL
gitagent --model "ollama:llama3@http://localhost:11434/v1" --voice --dir ~/assistant

# Environment variable
export GITAGENT_MODEL_BASE_URL=http://localhost:11434/v1
gitagent --model "ollama:llama3" --voice --dir ~/assistant
# In agent.yaml
model:
  preferred: "custom:my-model@https://my-proxy.com/v1"
Compatible endpoints: Ollama (:11434), LM Studio (:1234), vLLM (:8000), LiteLLM (:4000), Lyzr AI Studio, and any other OpenAI-compatible proxy.

Lyzr AI Studio Integration

Connect to Lyzr’s managed agent infrastructure. Your agent runs on Lyzr’s servers with full observability.
  • Via installer (easiest) — Run the interactive installer and select Lyzr when prompted
  • Via CLI flaggitagent --model "lyzr:<AGENT_ID>@https://agent-prod.studio.lyzr.ai/v4" --dir ~/assistant
  • Via SDK — Use the query() function with a lyzr: model string (see example below)
// sdk-example.ts
import { query } from "@open-gitagent/gitagent";

const result = query({
  prompt: "Hello! What can you help me with?",
  dir: "/path/to/agent",
  model: `lyzr:${LYZR_AGENT_ID}@https://agent-prod.studio.lyzr.ai/v4`,
  constraints: { temperature: 0.7, maxTokens: 2000 },
});
for await (const msg of result) {
  if (msg.type === "assistant") console.log(msg.content);
}

Environment Variables

Full list of provider API keys and runtime config variables

Overview

See how model configuration fits into the wider GitAgent architecture

SDK Reference

Pass model strings and constraints to query()

Observability

Track token usage and cost per model via OpenTelemetry