Skip to content

Conversation

Copy link

Copilot AI commented Dec 15, 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

Adds AI Badgr as a budget-focused OpenAI-compatible provider using the existing JSON-based provider registry.

Configuration (litellm/llms/openai_like/providers.json)

  • Added aibadgr entry with base URL https://aibadgr.com/api/v1
  • Environment variables: AIBADGR_API_KEY, AIBADGR_BASE_URL

Documentation (docs/my-website/docs/providers/aibadgr.md)

  • Tier-based model naming: aibadgr/basic, aibadgr/normal, aibadgr/premium
  • Power-user models: phi-3-mini, mistral-7b, llama3-8b-instruct
  • Labeled as "Budget/Utility, OpenAI-compatible"
  • Full usage examples for direct SDK, streaming, function calling, and proxy configuration

Tests (tests/test_litellm/llms/openai_like/test_json_providers.py)

  • Verify provider loads from JSON registry
  • Test provider resolution for tier models (aibadgr/premiumpremium, provider aibadgr)
  • Test all tier and power-user model variants

Usage

import os
import litellm

os.environ["AIBADGR_API_KEY"] = "sk-..."

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

# Power-user models
response = litellm.completion(
    model="aibadgr/llama3-8b-instruct",
    messages=[{"role": "user", "content": "Hello"}]
)

Files changed: 4 (providers.json, aibadgr.md, sidebars.js, test_json_providers.py)

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • install.python-poetry.org
    • Triggering command: /usr/bin/curl curl -sSL REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

https://chatgpt.com/c/693df2ac-f5c0-8323-8f1e-a28790ba9abf

Universal Prompt — AI Badgr (Tier-first, OpenAI-compatible, Minimal + Mergeable)
You are adding AI Badgr as an optional OpenAI-compatible provider to THIS repo.
Goals
Touch the fewest files possible (ideally 1–3, max 5).

Copy the existing provider/preset/doc pattern used in THIS repo.

Keep the change low-risk, optional, and mergeable.

Hard constraints (must follow)
No new runtime behavior unless the repo already has a provider plugin system and you are implementing the full provider.

That means: do NOT add new HTTP fetches, model catalog downloads, caching layers, background refresh, telemetry, or extra managers.

Do NOT add new dependencies.

Do NOT change defaults or core behavior.

Do NOT refactor or rename existing code.

Only add the minimum config/docs/preset wiring required to use AI Badgr.

Step 0 — Choose integration mode based on what already exists (do not invent)
Inspect THIS repo and choose exactly one:
Path A — Preset/Provider registry exists
Add AI Badgr as a selectable provider/preset using the same pattern as other providers.
Path B — Repo supports generic OpenAI-compatible endpoints
Add AI Badgr as a documented OpenAI-compatible endpoint (docs-only) using the repo’s existing mechanism.
Path C — Coding assistant UX
If presets have descriptions/tooltips, label AI Badgr explicitly as Budget/Utility to set expectations.

Step 1 — Add AI Badgr configuration
Use these exact details:
Display name:

Default: AI Badgr (OpenAI-compatible)

If Path C: AI Badgr (Budget/Utility, OpenAI-compatible)

Base URL: https://aibadgr.com/api/v1

Auth header: Authorization: Bearer <API_KEY>

Env vars (mirror repo style where env vars are used):

AIBADGR_API_KEY

AIBADGR_BASE_URL

If the repo uses credential UI rather than env vars, follow the existing credential pattern and name the field “AI Badgr API Key”.

Step 2 — Model naming (tiers first, always)
In all docs/examples/presets, default to tier model names:
basic

normal

premium (use this as the default in examples)

Only if there is already an “advanced” section in the repo’s provider docs, add:
Power-user model names:

phi-3-mini (maps to basic)

mistral-7b (maps to normal)

llama3-8b-instruct (maps to premium)

One-liner: “OpenAI model names are accepted and mapped automatically.”

Step 3 — Verification snippet (only if repo already has them)
If other providers have a verify snippet/example, add one minimal example and use model="premium".

Allowed files to change
provider registry/config OR preset list (if Path A)

provider docs (Path A or B)

at most ONE example file (only if other providers have examples)
Max 5 files total.

Process requirements
Follow THIS repo’s contribution guidelines (issue/assignment formatting).

Run the repo’s standard minimal checks for docs/config changes.

Output at the end
Files changed + reason per file

Confirm:

followed existing repo patterns

no defaults/core behavior changed

no new runtime behavior/dependencies added

tiers used by default (premium in examples)

Budget/Utility labeling applied if Path C

Make sure to check the repos contribution guidelines and follow them. Make sure to test it all works, check repo if there are unit tests etc and make sure our changes pass them.


✨ 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 optional AI Badgr provider to repository Add AI Badgr as OpenAI-compatible provider Dec 15, 2025
Copilot AI requested a review from miguelmanlyx December 15, 2025 04:18
@miguelmanlyx miguelmanlyx marked this pull request as ready for review December 15, 2025 06:23
@miguelmanlyx miguelmanlyx merged commit 89ce5ac into main Dec 15, 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