Skip to main content

OSCAR - GitHub-Specialized AI Coding Assistant (multi-provider: Gemini, OpenAI, Claude, Groq, Ollama)

Project description

OSCAR — GitHub-Specialized AI Coding Assistant

A VS Code extension and CLI powered by the Asterix agentic framework. Specialized for GitHub workflows: branch comparison, PR review, diff analysis, and git automation. Bring your own LLM — Gemini, OpenAI GPT-5, Anthropic Claude 4, Groq, or local Ollama models, switchable with a single environment variable.

What's new in v0.6.0

  • Multi-provider LLM support. Switch between Gemini, OpenAI, Anthropic, Groq, and Ollama via OSCAR_LLM_PROVIDER / OSCAR_LLM_MODEL.
  • 21-model catalog including GPT-5 family, Claude 4 family (opus/sonnet/haiku), Gemini 2.5/2.0, and popular open-source models on Ollama.
  • New /providers API endpoint and oscar providers CLI command for discovering supported models.
  • VS Code status-bar item showing the active provider/model, with a quick-pick command (OSCAR: Select LLM provider and model) to switch.

Architecture

┌─────────────────────────────────────────────────────┐
│ VS Code Extension (TypeScript)                       │
│  ├── Sidebar WebviewViewProvider (chat UI)            │
│  ├── Status-bar provider/model indicator              │
│  ├── Quick-pick model switcher                        │
│  └── HTTP/SSE client → FastAPI backend                │
├─────────────────────────────────────────────────────┤
│ FastAPI Server (Python)                              │
│  ├── /chat, /branches, /compare, /review, /history    │
│  ├── /providers (multi-provider model catalog)        │
│  └── SSE streaming for real-time progress             │
├─────────────────────────────────────────────────────┤
│ OSCAR Agent Layer (Python)                           │
│  ├── Asterix Agent (ReAct loop, memory, state)        │
│  ├── asterix_patch.py — multi-provider LLM bridge     │
│  ├── Safety callbacks (on_before_tool_call)           │
│  └── Audit logging (on_after_tool_call)               │
├─────────────────────────────────────────────────────┤
│ Tools (registered via @agent.tool())                 │
│  ├── git_* (status, compare, review, log, diff, ...)  │
│  ├── shell (subprocess with safety checks)            │
│  ├── web_search (Tavily with dual-key fallback)       │
│  └── browser (Playwright: navigate, extract, search)  │
├─────────────────────────────────────────────────────┤
│ LLM providers (pick one)                             │
│  ├── Gemini · 2.5 Pro / Flash / Flash-Lite / 2.0 Flash │
│  ├── OpenAI · GPT-5 · GPT-5 mini · GPT-5 nano · o3 ··· │
│  ├── Anthropic · Claude Opus/Sonnet/Haiku 4.x          │
│  ├── Groq    · Llama 3.3 70B Versatile · 3.1 8B Instant│
│  └── Ollama  · Llama 3.3 / Qwen 2.5 Coder / DeepSeek …  │
└─────────────────────────────────────────────────────┘

Features

  • Git-specialized tools — status, branch compare, PR review, log, diff, checkout, commit, push
  • Multi-provider LLM — five providers, 21 catalogued models, configurable primary + fallback
  • Browser automation — navigate, search, extract content, download files (Playwright)
  • Web search — Tavily-based with dual API key fallback
  • Shell execution — cross-platform command runner with safe-command allowlist
  • Human-in-the-loop safety — auto-approve low risk, confirm medium/high, typed CONFIRM for dangerous ops
  • Persistent memory — session context, knowledge base, user preferences via Asterix memory blocks
  • Streaming progress — Server-Sent Events through FastAPI for real-time updates
  • VS Code sidebar — chat UI with branch comparison widget and status-bar model picker

Installation

Prerequisites

  • Python >= 3.10
  • (Optional) Google Cloud CLI — only needed for the Gemini/Vertex AI default
  • (Optional) Ollama — only needed if you want local models

Python Backend

git clone https://github.com/adityasarade/OSCAR.git
cd OSCAR
pip install -e .
playwright install chromium

Choose your LLM provider

OSCAR ships with five providers ready to use. Copy .env.example to .env and set the provider you want:

cp .env.example .env
Provider Set in .env Credentials
Gemini (default) OSCAR_LLM_PROVIDER=gemini gcloud auth application-default login (or GEMINI_API_KEY)
OpenAI OSCAR_LLM_PROVIDER=openai OPENAI_API_KEY
Anthropic Claude OSCAR_LLM_PROVIDER=anthropic ANTHROPIC_API_KEY
Groq OSCAR_LLM_PROVIDER=groq GROQ_API_KEY
Ollama (local) OSCAR_LLM_PROVIDER=ollama none — just have Ollama running locally

The full model catalog, with recommendations:

Provider Models
Gemini gemini-2.5-flash ★ · gemini-2.5-pro · gemini-2.5-flash-lite · gemini-2.0-flash
OpenAI gpt-5-mini ★ · gpt-5 · gpt-5-nano · o3 · o4-mini · gpt-4.1 · gpt-4o
Anthropic claude-sonnet-4-6 ★ · claude-opus-4-7 · claude-haiku-4-5-20251001
Groq llama-3.3-70b-versatile ★ · llama-3.1-8b-instant
Ollama llama3.3 ★ · llama3.1 · qwen2.5-coder · deepseek-coder-v2 · mistral-nemo

(★ = recommended default for the provider)

Run oscar providers for the live, color-coded version of this table with API-key status indicators.

VS Code Extension

cd vscode-oscar
npm install
npm run compile
# Press F5 in VS Code to launch the Extension Development Host

The extension shows the active LLM in the status bar. Click it (or run OSCAR: Select LLM provider and model from the Command Palette) to pick a different one — the chosen env vars are copied to your clipboard, ready to paste into .env.

Usage

CLI

oscar                  # Start interactive session
oscar --debug          # Debug mode
oscar --dry-run        # Dry run (no destructive ops)
oscar --config-check   # Verify configuration

Inside the prompt:

OSCAR> providers           # List all supported providers and models
OSCAR> config              # Show current provider/model + tool count
OSCAR> test                # Round-trip the current LLM
OSCAR> git status
OSCAR> compare main and feature-branch
OSCAR> review feature-branch against main
OSCAR> search for Python async best practices
OSCAR> navigate to https://docs.python.org

API

oscar-server                                          # Start FastAPI on port 8420
curl http://127.0.0.1:8420/providers | jq            # Inspect the live model catalog
curl -X POST http://127.0.0.1:8420/chat \
     -H 'Content-Type: application/json' \
     -d '{"message":"show me git status"}'

Project Structure

src/oscar/
├── api/server.py               # FastAPI endpoints incl. /providers
├── cli/main.py                 # CLI with `providers`, `config`, `test`
├── config/
│   ├── providers.py            # 5-provider / 21-model catalog (single source of truth)
│   ├── prompts.py              # System prompt
│   └── settings.py             # Env-driven settings, API-key resolution
├── core/
│   ├── agent.py                # Asterix agent orchestrator
│   ├── asterix_patch.py        # Multi-provider LLM bridge (Gemini/OpenAI/Claude/Groq/Ollama)
│   ├── safety.py               # Human-in-the-loop safety callbacks
│   └── repo_context.py         # Active-repo handling
└── tools/
    ├── git_tool.py             # Git operations (9 functions)
    ├── shell.py                # Shell command execution
    ├── web_search.py           # Tavily web search
    └── browser.py              # Playwright browser automation

Built With

  • Asterix — Agentic framework (ReAct loop, memory, tool management)
  • Gemini · OpenAI · Anthropic · Groq · Ollama — pluggable LLM providers
  • google-genai · openai · anthropic · ollama — official Python SDKs
  • FastAPI — HTTP backend with SSE streaming
  • Playwright — Headless browser automation
  • Tavily — Web search API
  • Rich — Terminal UI and formatting
  • Click — CLI framework
  • TypeScript — VS Code extension

License

MIT

Author

Built by Aditya Sarade — Final year AI & Data Science, AISSMS IOIT, Pune.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oscar_agent-0.6.0.tar.gz (42.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oscar_agent-0.6.0-py3-none-any.whl (48.7 kB view details)

Uploaded Python 3

File details

Details for the file oscar_agent-0.6.0.tar.gz.

File metadata

  • Download URL: oscar_agent-0.6.0.tar.gz
  • Upload date:
  • Size: 42.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for oscar_agent-0.6.0.tar.gz
Algorithm Hash digest
SHA256 76ff3f3438640751c499e2ea403e3004d186e767f5a11cc1a880e9ef4323c847
MD5 3ffacd0da932061a95842cea61622494
BLAKE2b-256 2b1976c1a859a56288980e14f51f97203250483edd7d6d7e62def43f7a8e6bef

See more details on using hashes here.

File details

Details for the file oscar_agent-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: oscar_agent-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 48.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for oscar_agent-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e2cdfb2c3029dab9d24563f31e271063a4042ed4c89b9a12c9caa7302476464e
MD5 c4ef4c80d3d6cf45ccb9f09c90703cf8
BLAKE2b-256 c2e45c895e2af9c1f5b220c5d259b3c9244967d43d1cfd50e1a87c52d8d148bb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page