Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"|:-------------------------:|:---------:|:------------------:|:---------------:|\n",
"| `bridgic-llms-openai-like`| ✅ | ❌ | ❌ |\n",
"| `bridgic-llms-openai` | ✅ | ✅ | ✅ |\n",
"| `bridgic-llms-vllm` | ✅ | ✅ | ✅ |\n"
"| `bridgic-llms-vllm` | ✅ | ✅ | ✅ |\n",
"| `bridgic-llms-litellm` | ✅ | ❌ | ❌ |\n"
]
},
{
Expand Down
36 changes: 36 additions & 0 deletions packages/bridgic-integration/llms/bridgic-llms-litellm/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.PHONY: venv-init test build publish

package_name := $(notdir $(CURDIR))
repo ?= btsk

ROOT_DIR := $(shell git rev-parse --show-toplevel)
VERSION_CHECK := $(ROOT_DIR)/scripts/version_check.py
SET_CREDENTIALS := $(ROOT_DIR)/scripts/set_publish_credentials.sh

venv-collect:
@echo "\n==> Installing dependencies for [${package_name}]..."
@uv pip install -e .

test:
@uv run -- pytest

build:
@mkdir -p dist
@rm -rf dist/*
@package_name=$$(uv run python -c "import tomli; print(tomli.load(open('pyproject.toml', 'rb'))['project']['name'])") && \
uv build --package "$$package_name" --out-dir dist

publish:
@source $(SET_CREDENTIALS) && \
version=$$(uv run python -c "import tomli; print(tomli.load(open('pyproject.toml', 'rb'))['project']['version'])") && \
uv run python $(VERSION_CHECK) --version "$$version" --repo "$(repo)" --package "$(package_name)" && \
$(MAKE) _publish_$(repo)

_publish_btsk:
@uv publish dist/* --index btsk-repo --config-file $(ROOT_DIR)/uv.toml

_publish_testpypi:
@uv publish dist/* --index test-pypi --config-file $(ROOT_DIR)/uv.toml

_publish_pypi:
@uv publish dist/* --config-file $(ROOT_DIR)/uv.toml
27 changes: 27 additions & 0 deletions packages/bridgic-integration/llms/bridgic-llms-litellm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# bridgic-llms-litellm

LiteLLM adapters for [Bridgic](https://github.com/bitsky-tech/bridgic), enabling connectivity with 100+ LLM providers through a single unified interface.

## Installation

```shell
pip install bridgic-llms-litellm
```

## Usage

```python
from bridgic.llms.litellm import LiteLLM
from bridgic.core.model.types import Message, Role

# API keys are read from environment variables (e.g. OPENAI_API_KEY)
llm = LiteLLM()

response = llm.chat(
model="openai/gpt-4o",
messages=[Message.from_text("Hello!", role=Role.USER)],
)
print(response.message.content)
```

See https://docs.litellm.ai/docs/providers for the full provider list.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
"""
The LiteLLM integration module provides access to 100+ LLM providers through
a single unified interface.

Supported providers include OpenAI, Anthropic, Google, Groq, Together AI,
AWS Bedrock, Azure, Mistral, and many more. Uses provider-prefixed model
names, e.g. ``openai/gpt-4o``, ``anthropic/claude-sonnet-4-6``.

See https://docs.litellm.ai/docs/providers for the full provider list.

You can install the LiteLLM integration package for Bridgic by running:

```shell
pip install bridgic-llms-litellm
```
"""

from importlib.metadata import version
from ._litellm_llm import LiteLLMConfiguration, LiteLLM

__version__ = version("bridgic-llms-litellm")
__all__ = ["LiteLLMConfiguration", "LiteLLM", "__version__"]
Loading
Loading