Skip to content

Add dashboard-managed LLM provider system with OpenAI-compatible API support#13

Open
devarshishimpi wants to merge 6 commits into
devfrom
feature/support-openai-compatible-apis
Open

Add dashboard-managed LLM provider system with OpenAI-compatible API support#13
devarshishimpi wants to merge 6 commits into
devfrom
feature/support-openai-compatible-apis

Conversation

@devarshishimpi
Copy link
Copy Markdown
Owner

Description

This PR implements a comprehensive dashboard-managed LLM provider system that allows users to configure and manage their own AI model providers directly through the Codra dashboard. Users can now securely store and use custom API keys for various LLM providers, including OpenAI, Anthropic, Google, and any OpenAI-compatible APIs.

Key Features:

  • Dashboard Provider Management: Users can add, edit, and manage LLM provider configurations (API keys, model selections) through the UI
  • Secure Configuration Storage: Provider configurations are encrypted using a new LLM_CONFIG_ENCRYPTION_KEY
  • OpenAI-Compatible API Support: Support for any OpenAI-compatible API endpoint
  • Provider Validation: Added validation for provider configurations to ensure correctness
  • Database Schema Updates: New updated global migration (001_initial.sql) to store provider configurations
  • Enhanced Model Catalog: Updated model catalog with support for multiple providers

Technical Changes:

  • New encryption utilities for storing sensitive provider configurations (llm-crypto.ts)
  • Expanded API endpoints for model management (/api/models)
  • Settings page UI redesign for provider management
  • Provider-agnostic model service that routes to configured providers
  • Support for Anthropic, OpenAI, Google, and Cloudflare models

Fixes #4

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Unit Tests
  • Integration Tests
  • Manual Dashboard Verification
  • Manual GitHub Webhook Verification

Checklist:

  • I have starred Codra on GitHub
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes
  • I have signed the CLA

codra-app-personal[bot]

This comment was marked as resolved.

Copy link
Copy Markdown

@codra-app-personal codra-app-personal Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codra Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 426bda0e3c

ℹ️ About Codra in GitHub

Your team has set up Codra to review pull requests in this repo. Reviews are triggered when you:

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codra-app review"

If Codra has suggestions, it will comment; otherwise it will react with 👍.

Codra can also answer questions or update the PR. Try commenting "@codra-app address that feedback".

Comment thread CONTRIBUTING.md
Comment thread scripts/migrate.mjs
Comment thread scripts/migrate.mjs
Comment thread scripts/migrate.mjs
Comment thread db/migrations/001_initial.sql
Comment thread src/server/core/config.ts
Comment thread src/server/core/config.ts
Comment thread src/client/pages/repos.tsx
Comment thread src/server/core/github.ts
Comment thread src/server/core/github.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant