Skip to content

feat: Add Amazon Bedrock & OpenAI Compatible provider to Lighthouse AI - #8957

Merged
vicferpoy merged 75 commits into
masterfrom
PRWLR-7835-openai-compatible
Oct 31, 2025
Merged

vicferpoy merged 75 commits into
masterfrom
PRWLR-7835-openai-compatible

Conversation

@0xbadshah

@0xbadshah 0xbadshah commented Oct 20, 2025

Copy link
Copy Markdown
Contributor

Context

Lighthouse supports multi LLM provider as part of #8772
This PR adds support for Amazon Bedrock & OpenAI Compatible Providers.

Description

With multi LLM provider support, Lighthouse AI allows addition of new LLM providers. This PR adds support for Amazon Bedrock and OpenAI Compatible Providers.

As multi LLM support is limited to one provider config per tenant, the users can have 1 Amazon Bedrock configuration and 1 Open AI compatible provider (ex: OpenRouter, etc).

This PR also adds necessary code to validate the entered credentials.

Steps to review

After merge you should have the option of creating bedrock and openai_compatible provider configuration.

  1. To create a configuration, send a POST request /api/v1/lighthouse/providers
    Sample POST body:

(OpenAI compatible)

{
  "data": {
    "type": "lighthouse-providers",
    "attributes": {
      "provider_type": "openai_compatible",
      "base_url": "https://openrouter.ai/api/v1/",
      "credentials": {
        "api_key": "sk-or-v1-xxx"
      }
    }
  }
}

(Amazon Bedrock)

{
  "data": {
    "type": "lighthouse-providers",
    "attributes": {
      "provider_type": "openai_compatible",
      "base_url": "https://openrouter.ai/api/v1/",
      "credentials": {
        "access_key_id": "AKIA....",
        "secret_access_key": "XXXXX....",
        "region": "us-east-1"
      }
    }
  }
}
  1. To get list of providers, GET request to /api/v1/lighthouse/providers
  2. To check the validity of the entered credential - POST request to /api/v1/lighthouse/providers/<UUID>/connection
  3. To refresh models available from the provider - POST request to /api/v1/lighthouse/providers/<UUID>/refresh-models

Checklist

API

  • Verify if API specs need to be regenerated.
  • Check if version updates are required (e.g., specs, Poetry, etc.).
  • Ensure new entries are added to CHANGELOG.md, if applicable.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@0xbadshah
0xbadshah force-pushed the PRWLR-7835-openai-compatible branch from 1917f73 to d64a435 Compare October 26, 2025 16:30
@0xbadshah
0xbadshah marked this pull request as ready for review October 28, 2025 09:28
@0xbadshah
0xbadshah requested a review from a team October 28, 2025 09:28
@0xbadshah 0xbadshah changed the title feat: Add OpenAI Compatible provider to Lighthouse AI feat: Add Amazon Bedrock & OpenAI Compatible provider to Lighthouse AI Oct 28, 2025

@vicferpoy vicferpoy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you provide some examples of wrong payload's responses using POST and/or PATCH endpoints? To see the format of the response.

Comment thread api/src/backend/tasks/jobs/lighthouse_providers.py
@vicferpoy
vicferpoy merged commit c3940c7 into master Oct 31, 2025
14 of 15 checks passed
@vicferpoy
vicferpoy deleted the PRWLR-7835-openai-compatible branch October 31, 2025 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/api review-django-migrations This PR contains changes in Django migrations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants