Skip to content

Commit aa7a7d5

Browse files
Merge pull request #13 from devarshishimpi/feature/support-openai-compatible-apis
Add dashboard-managed LLM provider system with OpenAI-compatible API support
2 parents cc479e3 + b49a816 commit aa7a7d5

40 files changed

Lines changed: 3923 additions & 1062 deletions

.dev.vars.example

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# --- Integration tests ---
66
TEST_DATABASE_URL="postgresql://user:password@localhost:5432/codra"
77

8-
# --- AI provider ---
9-
GEMINI_API_KEY="REPLACE_WITH_YOUR_GEMINI_API_KEY"
8+
# --- LLM provider config encryption ---
9+
LLM_CONFIG_ENCRYPTION_KEY="REPLACE_WITH_A_LONG_RANDOM_ENCRYPTION_KEY"
1010

1111
# --- GitHub App and OAuth ---
1212
GITHUB_APP_WEBHOOK_SECRET="REPLACE_WITH_YOUR_WEBHOOK_SECRET"
@@ -16,6 +16,8 @@ GITHUB_CLIENT_SECRET="REPLACE_WITH_YOUR_CLIENT_SECRET"
1616
APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nREPLACE_WITH_YOUR_GITHUB_APP_PRIVATE_KEY_CONTENT\n-----END RSA PRIVATE KEY-----"
1717

1818
# --- Cloudflare API ---
19+
# Required permissions: Queues Edit for DLQ actions, Workers AI Read for
20+
# Cloudflare model catalog discovery.
1921
CF_ACCOUNT_ID="REPLACE_WITH_YOUR_CLOUDFLARE_ACCOUNT_ID"
2022
CF_API_TOKEN="REPLACE_WITH_CLOUDFLARE_API_TOKEN"
2123

.env.test.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ DASHBOARD_ALLOWED_USERS="devarshishimpi"
1212

1313
APP_URL="https://codra.test"
1414
BOT_USERNAME="codra-test-app"
15+
LLM_CONFIG_ENCRYPTION_KEY="fake-local-llm-config-encryption-key"
1516

1617
# Required. Must point at a disposable Postgres database because tests reset and
1718
# write data while running.

.github/workflows/ci.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,12 @@ name: Code Quality
33
on:
44
workflow_dispatch:
55
push:
6-
branches:
7-
- main
86
pull_request:
97
types:
108
- opened
119
- synchronize
1210
- reopened
1311
- ready_for_review
14-
branches:
15-
- main
1612

1713
concurrency:
1814
group: ${{ github.workflow }}-${{ github.ref }}

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ cp .dev.vars.example .dev.vars
3636
You will need to set up:
3737
- A GitHub App (for webhooks/checks).
3838
- A GitHub OAuth App (for dashboard authentication).
39-
- A Gemini API Key.
39+
- `LLM_CONFIG_ENCRYPTION_KEY` for encrypting dashboard-managed provider API keys.
40+
- LLM providers and model credentials from the Settings dashboard.
4041
- A Hyperdrive local connection string for `wrangler dev`.
4142
- A direct `DATABASE_URL` for migrations.
4243

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Codra listens to GitHub pull request events, runs AI-powered review jobs, posts
4747
- Dead letter queue inspection, replay, and purge workflows
4848
- GitHub OAuth dashboard authentication
4949
- External PostgreSQL storage through Cloudflare Hyperdrive
50-
- Google Gemini and Cloudflare Workers AI model providers
50+
- Dashboard-managed LLM providers for OpenAI, OpenRouter, Anthropic, Google, and Cloudflare models
5151
- Repository settings for labels, skipped globs, custom rules, and model routing
5252

5353
## How It Works
@@ -65,7 +65,7 @@ Codra listens to GitHub pull request events, runs AI-powered review jobs, posts
6565
- **Dashboard**: React, Vite, Tailwind CSS, Radix UI, Recharts
6666
- **Data**: PostgreSQL, Cloudflare Hyperdrive, Cloudflare KV
6767
- **Queues**: Cloudflare Queues with DLQ workflows
68-
- **Models**: Google Gemini and Cloudflare Workers AI
68+
- **Models**: OpenAI, OpenRouter, Anthropic, Google, and Cloudflare providers
6969
- **GitHub**: GitHub App webhooks, checks, reviews, and OAuth
7070
- **Quality**: TypeScript, Zod, Vitest, Playwright browser tests
7171

0 commit comments

Comments
 (0)