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
63 changes: 0 additions & 63 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,69 +23,6 @@ concurrency:
cancel-in-progress: true

jobs:
openai-compatibility:
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
matrix:
python: ["3.11", "3.14"]
openai: ["2.20.0", "2.54.0", "3.0.0", "3.29.0"]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: ${{ matrix.python }}
- uses: astral-sh/setup-uv@18d369b23da25a81e9458561248e1aafff6a70fa # v10.3.1
with:
version-file: uv.lock
enable-cache: true
- name: Install default dependencies without LiteLLM
run: uv sync --frozen
- name: Test the selected OpenAI SDK without LiteLLM
env:
OPENAI_VERSION: ${{ matrix.openai }}
LITELLM_LOCAL_MODEL_COST_MAP: "True"
LITELLM_TELEMETRY: "False"
run: |
uv run --frozen --no-sync --with "openai==$OPENAI_VERSION" python -c '
import importlib.util, os, openai, pytest
assert openai.__version__ == os.environ["OPENAI_VERSION"]
assert importlib.util.find_spec("litellm") is None
raise SystemExit(pytest.main([
"-q",
"tests/unit/prompt_target/target/test_openai_sdk_compatibility.py",
"tests/unit/prompt_target/target/test_openai_url_warnings.py",
"tests/unit/prompt_target/target/test_openai_error_handling.py",
"tests/unit/prompt_target/target/test_openai_target_auth.py",
"tests/unit/embedding/test_azure_text_embedding.py",
"tests/unit/prompt_target/target/test_litellm_chat_target.py",
]))
'
- name: Install LiteLLM compatibility extra
if: startsWith(matrix.openai, '2.')
run: uv sync --frozen --extra litellm
- name: Test LiteLLM with the selected OpenAI SDK
if: startsWith(matrix.openai, '2.')
env:
OPENAI_VERSION: ${{ matrix.openai }}
LITELLM_LOCAL_MODEL_COST_MAP: "True"
LITELLM_TELEMETRY: "False"
run: |
uv run --frozen --no-sync --with "openai==$OPENAI_VERSION" python -c '
import importlib.metadata, os, openai, pytest
from packaging.version import Version
assert openai.__version__ == os.environ["OPENAI_VERSION"]
assert not Version(importlib.metadata.version("litellm")).is_prerelease
raise SystemExit(pytest.main([
"-q",
"tests/unit/prompt_target/target/test_openai_sdk_compatibility.py",
"tests/unit/prompt_target/target/test_litellm_chat_target.py",
"-k", "litellm",
]))
'

pre-commit:
strategy:
fail-fast: true
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ dependencies = [
"mcp>=2.2,<3",
"numpy>=1.26.0; python_version < '3.14'",
"numpy>=2.3.0; python_version >= '3.14'",
"openai>=2.20.0,<4",
"openai>=3,<4",
"openpyxl>=3.1.5",
"opentelemetry-sdk>=1.36,<2",
"pillow>=12.2.0",
Expand Down
1 change: 0 additions & 1 deletion tests/unit/build_scripts/test_uv_version_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def test_lockfile_selects_one_uv_version() -> None:
@pytest.mark.parametrize(
("workflow_name", "job_name"),
[
("build_and_test.yml", "openai-compatibility"),
("build_and_test.yml", "pre-commit"),
("build_and_test.yml", "main-job"),
("diff_cover.yml", "coverage"),
Expand Down
Loading
Loading