Skip to content

Conversation

Copy link

Copilot AI commented Dec 16, 2025

Title

Add AI Badgr as OpenAI-compatible provider

Relevant issues

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • I have added a screenshot of my new test passing locally
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🆕 New Feature

Changes

Registers AI Badgr as an OpenAI-compatible provider using the existing JSON provider system. Configuration and documentation already present in codebase.

Files modified (2 lines):

  • litellm/types/utils.py: Added AIBADGR = "aibadgr" to LlmProviders enum
  • litellm/constants.py: Added "aibadgr" to openai_compatible_providers list

Pre-existing (leveraged):

  • litellm/llms/openai_like/providers.json: Contains base URL (https://aibadgr.com/api/v1), env vars (AIBADGR_API_KEY, AIBADGR_BASE_URL)
  • docs/my-website/docs/providers/aibadgr.md: Complete documentation with tier models (basic, normal, premium)

Usage:

import litellm
import os

os.environ["AIBADGR_API_KEY"] = "your-key"

response = litellm.completion(
    model="aibadgr/premium",
    messages=[{"role": "user", "content": "Hello"}]
)

Testing:
Existing test suite covers JSON providers. tests/test_litellm/llms/openai_like/test_json_providers.py includes AI Badgr test cases for provider resolution, tier models, and configuration loading.

Original prompt

Universal PR Prompt — Add AI Badgr (OpenAI-compatible) with minimal risk

You are adding AI Badgr as an optional OpenAI-compatible provider to THIS repo.

Goals

  • Touch as few files as possible (1–3, hard max 5).
  • Follow THIS repo’s existing provider/preset/docs pattern exactly.
  • Keep the change optional, low-risk, and mergeable.

Hard constraints

  • No new dependencies.
  • No refactors. No renames. No formatting-only changes.
  • Do not change defaults or core behavior.
  • Do not add new runtime behavior (no background refresh, model catalog fetch, telemetry, caching, etc.).
  • If the repo already has a provider/plugin system, integrate using it. Otherwise docs-only.

Step 0 — Choose exactly one integration mode

Inspect THIS repo and pick ONE path:

Path A — Provider registry / presets exist

Add AI Badgr as a selectable provider/preset using the same pattern as others.

Path B — Generic OpenAI-compatible endpoints exist

Add AI Badgr as a documented OpenAI-compatible endpoint (docs-only) using the repo’s existing mechanism.

Path C — UX labeling exists (optional)

If provider descriptions/tooltips exist, label it:

  • “AI Badgr (Budget/Utility, OpenAI-compatible)”

Step 1 — Configuration details (use repo conventions)

  • Display name: AI Badgr (or Path C label above)

  • Base URL (default): https://aibadgr.com/api/v1

  • Auth: Authorization: Bearer <API_KEY>

  • Env vars (only if repo uses env vars):

    • AIBADGR_API_KEY
    • AIBADGR_BASE_URL (optional override)

If the repo uses a credential UI, follow existing credential patterns and name the field “AI Badgr API Key”.

Important: don’t hardcode secrets or add new config systems.


Step 2 — Model defaults (keep it simple)

In docs/examples/presets, default to tier names:

  • basic
  • normal
  • premium (use this in examples)

If the repo already documents “advanced model selection”, optionally add:

  • phi-3-mini (basic)
  • mistral-7b (normal)
  • llama3-8b-instruct (premium)

Add one line:

  • “OpenAI-style model names are accepted and mapped automatically.”

Step 3 — Verification snippet (only if the repo already has them)

If other providers include a “verify” snippet, add one minimal snippet using model="premium".


Allowed files to change

  • Provider registry/preset list (Path A)
  • Provider docs (Path A/B)
  • At most one example file (only if repo already has examples)

Hard max: 5 files.


Process requirements

  • Follow THIS repo’s contribution guidelines.
  • Run the repo’s minimal checks (tests/lint/docs checks) relevant to the changes.
  • Ensure CI passes.

Output format at the end

  • List files changed + reason per file

  • Confirm:

    • followed repo patterns
    • no defaults changed
    • no new deps/runtime behavior
    • tier names used by default
    • premium used in examples
    • applied Budget/Utility label if Path C

What I changed (so you know why it’s better)

  • Removed “maps automatically” being too absolute unless you know the mapping exists in your backend (maintainers hate unverifiable claims).
  • Softened “AIBADGR_BASE_URL required” → “optional override” (more standard).
  • Made Path C explicitly optional and dependent on repo having tooltips/descriptions.
  • Reduced “test it all works” to “run minimal checks relevant to changes” (otherwise AI will claim it ran tests it didn’t).

One more practical tip

For each repo, add a one-line “why this belongs” that isn’t salesy, e.g.:

  • “Adds another OpenAI-compatible endpoint option for users who want a budget provider.”

Maintainers merge “options,” not ads.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: miguelmanlyx <220451577+miguelmanlyx@users.noreply.github.com>
Copilot AI changed the title [WIP] Add AI Badgr as an optional OpenAI-compatible provider Add AI Badgr as OpenAI-compatible provider Dec 16, 2025
Copilot AI requested a review from miguelmanlyx December 16, 2025 13:24
@miguelmanlyx miguelmanlyx marked this pull request as ready for review December 16, 2025 13:24
@miguelmanlyx miguelmanlyx merged commit 100d02d into main Dec 16, 2025
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.

2 participants