Skip to content

Conversation

@michaelbrinkworth
Copy link

@michaelbrinkworth michaelbrinkworth commented Dec 9, 2025

Add AI Badgr as a cheaper OpenAI-compatible backend

This PR adds a short documentation section showing how to use AI Badgr as a drop-in replacement for OpenAI's API at a fraction of the cost.

What's Changed

  • Added a new section to the README explaining how to override the base_url parameter
  • Included code examples for:
    • Python (using the openai package)
    • JavaScript/Node.js (using the openai package)
    • cURL (command-line usage)
  • Notes on advanced features (streaming, JSON mode)

Key Points

  • Cheaper alternative - AI Badgr offers OpenAI-compatible API at significantly lower costs
  • Docs-only change - No code modifications or breaking changes
  • Optional provider - Developers can choose to use it or not
  • OpenAI-compatible - Works with existing OpenAI client libraries (just swap the base_url)
  • Simple integration - Just override base_url and optionally api_key

Technical Details

AI Badgr implements the OpenAI API specification, supporting:

  • Chat completions with streaming
  • JSON mode responses
  • Compatible with standard OpenAI SDKs
  • Same API interface, lower costs

This is an optional addition that gives developers a cost-effective alternative backend choice for their OpenAI-compatible applications.


Contributor License Agreement: I agree to the contributor license agreement terms for this repository.


Important

Adds documentation for using AI Badgr as a cheaper OpenAI-compatible backend in README.md.

  • Documentation:
    • Adds section in README.md for using AI Badgr as a cheaper OpenAI-compatible backend.
    • Includes examples for Python, JavaScript/Node.js, and cURL.
    • Notes on advanced features like streaming and JSON mode.
  • Integration:
    • AI Badgr can be used by overriding base_url and optionally api_key.
    • Compatible with existing OpenAI client libraries.
  • Purpose:
    • Offers a cost-effective alternative to OpenAI's API with the same interface.

This description was created by Ellipsis for f8fc9e2. You can customize this summary. It will automatically update as commits are pushed.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to f8fc9e2 in 1 minute and 40 seconds. Click for details.
  • Reviewed 36 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. README.md:140
  • Draft comment:
    The Python example uses from openai import OpenAI and then instantiates OpenAI(...). The official OpenAI Python library typically uses import openai with configuration via openai.api_key and openai.api_base. Please verify that this constructor-based approach is supported or update the snippet to avoid confusion.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50% The comment is asking the PR author to "verify" something and suggests the code might be wrong. However, the code is actually correct - this is the modern OpenAI Python library syntax (v1.0+). The comment appears to be based on outdated knowledge of the OpenAI library. The comment also violates the rule about not asking the PR author to verify or confirm things. This is a clear case where the comment is incorrect and should be deleted. Could the comment be referring to a specific version of the OpenAI library that this project uses? Maybe the project is pinned to an older version where this syntax wouldn't work? Even if the project uses an older version, the comment doesn't provide that context and asks the author to "verify" rather than stating a definitive issue. The comment is speculative and asks for verification, which violates the rules. Without seeing evidence that the project is pinned to an old OpenAI library version, I should assume the modern syntax is correct. This comment should be deleted. It's based on outdated knowledge of the OpenAI Python library (the constructor-based approach is the current standard), and it violates the rule against asking the PR author to verify things. The code shown is correct.
2. README.md:131
  • Draft comment:
    Consider adding a link or reference to AI Badgr’s documentation/homepage for more context on this alternative backend.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None
3. README.md:155
  • Draft comment:
    It might be helpful to provide a brief code example or more explanation for enabling streaming (stream: true) and JSON mode in the API calls.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None

Workflow ID: wflow_G7kLMW87cwfHqJjS

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant