Skip to content

Upgrade LiteLLM to 1.84.1#3233

Open
neubig wants to merge 7 commits into
mainfrom
upgrade-litellm-1.84.0-rc.1
Open

Upgrade LiteLLM to 1.84.1#3233
neubig wants to merge 7 commits into
mainfrom
upgrade-litellm-1.84.0-rc.1

Conversation

@neubig
Copy link
Copy Markdown
Member

@neubig neubig commented May 12, 2026

  • A human has tested these changes.

Why

Upgrade LiteLLM to the requested incident-fix release 1.84.1.

Summary

  • Pins openhands-sdk's LiteLLM dependency to 1.84.1.
  • Regenerates uv.lock for the workspace using --upgrade-package litellm to minimize churn.
  • openai (2.24.0 → 2.33.0) and tokenizers (0.22.2 → 0.23.1) are also updated because litellm 1.84.1 pins them as exact dependencies. No other packages are changed.

Issue Number

N/A

How to Test

  • Parsed modified pyproject.toml with Python tomllib.
  • Ran uv lock --check --exclude-newer-package litellm=2026-05-06T00:00:00Z from the repository root.

Video/Screenshots

N/A - dependency upgrade only.

Type

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

Notes

The package-specific exclude-newer override is needed because this repo has a workspace-wide exclude-newer = "7 days" guardrail, while litellm==1.84.1 was uploaded on 2026-05-05.

This PR was created by an AI agent (OpenHands) on behalf of the user.

Issue

Related to OpenHands/OpenHands#14456

Related issue: #3345


Agent Server images for this PR

GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server

Variants & Base Images

Variant Architectures Base Image Docs / Tags
java amd64, arm64 eclipse-temurin:17-jdk Link
python amd64, arm64 nikolaik/python-nodejs:python3.13-nodejs22-slim Link
golang amd64, arm64 golang:1.21-bookworm Link

Pull (multi-arch manifest)

# Each variant is a multi-arch manifest supporting both amd64 and arm64
docker pull ghcr.io/openhands/agent-server:4848977-python

Run

docker run -it --rm \
  -p 8000:8000 \
  --name agent-server-4848977-python \
  ghcr.io/openhands/agent-server:4848977-python

All tags pushed for this build

ghcr.io/openhands/agent-server:4848977-golang-amd64
ghcr.io/openhands/agent-server:48489772914016f2d2124e118b18470effb4279b-golang-amd64
ghcr.io/openhands/agent-server:upgrade-litellm-1.84.0-rc.1-golang-amd64
ghcr.io/openhands/agent-server:4848977-golang_tag_1.21-bookworm-amd64
ghcr.io/openhands/agent-server:4848977-golang-arm64
ghcr.io/openhands/agent-server:48489772914016f2d2124e118b18470effb4279b-golang-arm64
ghcr.io/openhands/agent-server:upgrade-litellm-1.84.0-rc.1-golang-arm64
ghcr.io/openhands/agent-server:4848977-golang_tag_1.21-bookworm-arm64
ghcr.io/openhands/agent-server:4848977-java-amd64
ghcr.io/openhands/agent-server:48489772914016f2d2124e118b18470effb4279b-java-amd64
ghcr.io/openhands/agent-server:upgrade-litellm-1.84.0-rc.1-java-amd64
ghcr.io/openhands/agent-server:4848977-eclipse-temurin_tag_17-jdk-amd64
ghcr.io/openhands/agent-server:4848977-java-arm64
ghcr.io/openhands/agent-server:48489772914016f2d2124e118b18470effb4279b-java-arm64
ghcr.io/openhands/agent-server:upgrade-litellm-1.84.0-rc.1-java-arm64
ghcr.io/openhands/agent-server:4848977-eclipse-temurin_tag_17-jdk-arm64
ghcr.io/openhands/agent-server:4848977-python-amd64
ghcr.io/openhands/agent-server:48489772914016f2d2124e118b18470effb4279b-python-amd64
ghcr.io/openhands/agent-server:upgrade-litellm-1.84.0-rc.1-python-amd64
ghcr.io/openhands/agent-server:4848977-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim-amd64
ghcr.io/openhands/agent-server:4848977-python-arm64
ghcr.io/openhands/agent-server:48489772914016f2d2124e118b18470effb4279b-python-arm64
ghcr.io/openhands/agent-server:upgrade-litellm-1.84.0-rc.1-python-arm64
ghcr.io/openhands/agent-server:4848977-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim-arm64
ghcr.io/openhands/agent-server:4848977-golang
ghcr.io/openhands/agent-server:48489772914016f2d2124e118b18470effb4279b-golang
ghcr.io/openhands/agent-server:upgrade-litellm-1.84.0-rc.1-golang
ghcr.io/openhands/agent-server:4848977-golang_tag_1.21-bookworm
ghcr.io/openhands/agent-server:4848977-java
ghcr.io/openhands/agent-server:48489772914016f2d2124e118b18470effb4279b-java
ghcr.io/openhands/agent-server:upgrade-litellm-1.84.0-rc.1-java
ghcr.io/openhands/agent-server:4848977-eclipse-temurin_tag_17-jdk
ghcr.io/openhands/agent-server:4848977-python
ghcr.io/openhands/agent-server:48489772914016f2d2124e118b18470effb4279b-python
ghcr.io/openhands/agent-server:upgrade-litellm-1.84.0-rc.1-python
ghcr.io/openhands/agent-server:4848977-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim

About Multi-Architecture Support

  • Each variant tag (e.g., 4848977-python) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., 4848977-python-amd64) are also available if needed

Co-authored-by: openhands <openhands@all-hands.dev>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

Python API breakage checks — ✅ PASSED

Result:PASSED

Action log

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

REST API breakage checks (OpenAPI) — ✅ PASSED

Result:PASSED

Action log

Copy link
Copy Markdown
Collaborator

@all-hands-bot all-hands-bot left a comment

Choose a reason for hiding this comment

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

⚠️ Supply Chain Timing Alert: litellm==1.84.0rc1 was uploaded less than 7 days ago (by ~30 minutes), violating the repo's supply chain guardrail. While this is an intentional override for an incident fix, recommend either (1) waiting ~30 minutes for the 7-day window to pass, or (2) explicit human maintainer approval of the supply chain risk vs incident urgency trade-off.

Comment thread openhands-sdk/pyproject.toml Outdated
Comment thread uv.lock
openhands-agent and others added 2 commits May 12, 2026 23:04
Revert the requires-python change (not needed for litellm 1.84.0rc1)
and re-lock with --upgrade-package litellm so only litellm,
openai (==2.33.0), and tokenizers (==0.23.1) change — the latter two
are exact pins in litellm's own metadata and cannot be avoided.

Co-authored-by: openhands <openhands@all-hands.dev>
@neubig
Copy link
Copy Markdown
Member Author

neubig commented May 24, 2026

Resolved the remaining review-thread gate: the prior supply-chain warning was about litellm==1.84.0rc1 being ~30 minutes inside the 7-day guardrail on 2026-05-12. As of 2026-05-24, that package is well beyond the guardrail window, and this branch was re-locked after merging current main.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 24, 2026

Coverage

Coverage Report •
FileStmtsMissCoverMissing
TOTAL28860640277% 
report-only-changed-files is enabled. No files were changed during this commit :)

@neubig neubig added the review-this This label triggers a PR review by OpenHands label May 25, 2026
Copy link
Copy Markdown
Collaborator

@all-hands-bot all-hands-bot left a comment

Choose a reason for hiding this comment

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

🟡 Acceptable, but I can’t approve this yet. The dependency freshness concern is now cleared: litellm==1.84.0rc1 was uploaded on 2026-05-05, more than 7 days ago.

[TESTING GAP]

  • This updates the core LiteLLM runtime path, so it can plausibly affect agent behavior/evals. I don’t see end-to-end SDK/agent evidence in the PR description beyond tomllib parsing and uv lock --check, and the human-tested checkbox is still unchecked. Please add concrete end-to-end evidence for a real LiteLLM-backed SDK/agent run, or an eval monitor link with human maintainer confirmation, before approval.

[RISK ASSESSMENT]

  • [Overall PR] ⚠️ Risk Assessment: 🟡 MEDIUM. Small diff, but it pins a prerelease core LLM dependency and pulls transitive runtime updates (openai, tokenizers), so runtime/eval validation matters.

VERDICT:
Needs validation before approval: code changes look minimal, but runtime evidence is required.

This review was generated by an AI agent (OpenHands) on behalf of the user.


Was this automated review useful? React with 👍 or 👎 to this review to help us measure review quality.
Workflow run: https://github.com/OpenHands/software-agent-sdk/actions/runs/26411136696

@neubig neubig added review-this This label triggers a PR review by OpenHands and removed review-this This label triggers a PR review by OpenHands labels May 25, 2026
Copy link
Copy Markdown
Collaborator

@all-hands-bot all-hands-bot left a comment

Choose a reason for hiding this comment

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

🟡 Acceptable, but I’m not approving yet. No new code/lockfile issues found in this re-review, and the dependency upload ages are now outside the 7-day guardrail.

[TESTING GAP]
The previously noted validation gap still applies: this bumps the core LiteLLM runtime path (plus openai/tokenizers), but the PR evidence is still lockfile/TOML checks and CI rather than a concrete end-to-end LiteLLM-backed SDK/agent run or completed eval evidence with human confirmation.

[RISK ASSESSMENT]

  • [Overall PR] ⚠️ Risk Assessment: 🟡 MEDIUM. The diff is small, but it pins a prerelease core LLM dependency that can affect runtime agent behavior.

VERDICT:
Needs validation before approval: please add end-to-end/eval evidence or have a human maintainer accept the runtime-validation risk.

This review was generated by an AI agent (OpenHands) on behalf of the user.


Was this automated review useful? React with 👍 or 👎 to this review to help us measure review quality.
Workflow run: https://github.com/OpenHands/software-agent-sdk/actions/runs/26411547409

@enyst
Copy link
Copy Markdown
Member

enyst commented May 25, 2026

We could probably use 1.84.1 now @neubig

Co-authored-by: openhands <openhands@all-hands.dev>
@neubig neubig changed the title Upgrade LiteLLM to 1.84.0rc1 Upgrade LiteLLM to 1.84.1 May 26, 2026
Co-authored-by: openhands <openhands@all-hands.dev>
@neubig neubig marked this pull request as ready for review May 26, 2026 01:59
Copy link
Copy Markdown
Collaborator

@all-hands-bot all-hands-bot left a comment

Choose a reason for hiding this comment

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

🟡 Acceptable, but I can’t approve while the target dependency is still inside the 7-day freshness guardrail.

[RISK ASSESSMENT]

  • [Overall PR] ⚠️ Risk Assessment: 🟡 MEDIUM — LiteLLM is a core runtime dependency and litellm==1.84.1 was uploaded less than 7 days ago. Human maintainer review is needed if this incident fix must bypass the guardrail.

VERDICT:
Needs human maintainer decision on whether to wait for the package to age past 7 days or intentionally accept the supply-chain freshness risk.

KEY INSIGHT:
The change is mechanically small, but it explicitly bypasses the repository’s dependency freshness guardrail for a new LiteLLM release.

This review was generated by an AI agent (OpenHands) on behalf of the user.


Was this automated review useful? React with 👍 or 👎 to this review to help us measure review quality.
Workflow run: https://github.com/OpenHands/software-agent-sdk/actions/runs/26427966967

Comment thread pyproject.toml Outdated
# Security: Apply workspace-wide dependency guardrails.
[tool.uv]
exclude-newer = "7 days" # Avoid packages uploaded in the last 7 days.
exclude-newer-package = { litellm = "2026-05-22T00:00:00Z" }
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🟠 Important: This override allows litellm==1.84.1, whose wheel in uv.lock was uploaded at 2026-05-21T02:07:59.059Z. With the review date at 2026-05-26, that is still under the repo’s 7-day dependency freshness guardrail. Per the active review instruction, I can’t approve a dependency target published less than 7 days ago; please wait until it ages past the guardrail or get explicit human maintainer sign-off for the incident-risk tradeoff.

Copy link
Copy Markdown
Collaborator

@all-hands-bot all-hands-bot left a comment

Choose a reason for hiding this comment

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

Code Review: Upgrade LiteLLM to 1.84.1

This is a well-scoped dependency upgrade with minimal lock file churn (only litellm itself and its required transitive deps: openai and tokenizers). The use of --upgrade-package litellm in lock regeneration is the right approach. Two issues worth addressing before merging:

  1. Exact pin (==) in a library — can cause downstream dependency conflicts.
  2. exclude-newer-package date acts as a future ceiling — will block future litellm upgrades until removed or updated.

This review was generated by an AI agent (OpenHands) on behalf of the user through OpenHands Automation.

Comment thread openhands-sdk/pyproject.toml Outdated
Comment thread pyproject.toml Outdated
Copy link
Copy Markdown
Collaborator

@all-hands-bot all-hands-bot left a comment

Choose a reason for hiding this comment

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

✅ QA Report: PASS

Verified that the PR installs LiteLLM 1.84.1 and that real SDK LLM usage still works through both the low-level LLM.completion() path and the high-level Conversation.run() path.

Does this PR achieve its stated goal?

Yes. The stated goal is to upgrade openhands-sdk to the requested LiteLLM incident-fix release 1.84.1; after make build, the PR environment installed litellm==1.84.1, openai==2.33.0, and tokenizers==0.23.1. I then made real LLM calls via the SDK against the configured LiteLLM proxy and received the expected responses, confirming the upgraded dependency is usable end-to-end in the main SDK execution path.

Phase Result
Environment Setup make build completed and installed the workspace successfully.
CI Status ✅ Completed checks were green; the current qa-changes job was still in progress when checked.
Functional Verification ✅ Real SDK completion and conversation flows succeeded with LiteLLM 1.84.1.
Functional Verification

Test 1: Baseline main branch uses the old LiteLLM stack but can complete requests

Step 1 — Reproduce / establish baseline without the fix:
Created a detached origin/main worktree, ran uv sync --dev, then ran this real SDK completion command from /tmp/qa-sdk-main:

OPENHANDS_SUPPRESS_BANNER=1 uv run python - <<'PY'
import importlib.metadata as md
import os
from openhands.sdk import LLM, Message
print('installed_versions:', {
    'litellm': md.version('litellm'),
    'openai': md.version('openai'),
    'tokenizers': md.version('tokenizers'),
})
llm = LLM(
    model=os.environ['LLM_MODEL'],
    base_url=os.environ['LLM_BASE_URL'],
    api_key=os.environ['LLM_API_KEY'],
    max_output_tokens=80,
    temperature=0,
    timeout=90,
    num_retries=0,
    reasoning_effort='none',
)
response = llm.completion([
    Message(role='user', content=[{'type': 'text', 'text': 'Reply with exactly: LITELLM_BASELINE_OK'}])
])
print('response_type:', type(response).__name__)
print('assistant_text:', response.message.content[0].text)
print('tokens:', response.metrics.accumulated_token_usage.model_dump(exclude_none=True))
PY

Observed output excerpt:

installed_versions: {'litellm': '1.83.14', 'openai': '2.24.0', 'tokenizers': '0.22.2'}
response_type: LLMResponse
assistant_text: LITELLM_BASELINE_OK
tokens: {'model': 'litellm_proxy/openai/gpt-5.5', 'prompt_tokens': 17, 'completion_tokens': 10, ...}

This establishes the before state: main is still on the older LiteLLM/OpenAI/tokenizers stack.

Step 2 — Apply the PR's changes:
Returned to the PR checkout at commit 38f5876b07b3a12661941d446a9bf8f000d24b5e and ran make build, which completed successfully and installed the PR lockfile.

Step 3 — Re-run with the fix in place:
Ran the same real SDK completion flow from the PR checkout:

OPENHANDS_SUPPRESS_BANNER=1 uv run python - <<'PY'
import importlib.metadata as md
import os
from openhands.sdk import LLM, Message
print('installed_versions:', {
    'litellm': md.version('litellm'),
    'openai': md.version('openai'),
    'tokenizers': md.version('tokenizers'),
})
llm = LLM(
    model=os.environ['LLM_MODEL'],
    base_url=os.environ['LLM_BASE_URL'],
    api_key=os.environ['LLM_API_KEY'],
    max_output_tokens=80,
    temperature=0,
    timeout=90,
    num_retries=0,
    reasoning_effort='none',
)
response = llm.completion([
    Message(role='user', content=[{'type': 'text', 'text': 'Reply with exactly: LITELLM_1841_OK'}])
])
print('response_type:', type(response).__name__)
print('assistant_text:', response.message.content[0].text)
print('tokens:', response.metrics.accumulated_token_usage.model_dump(exclude_none=True))
PY

Observed output excerpt:

installed_versions: {'litellm': '1.84.1', 'openai': '2.33.0', 'tokenizers': '0.23.1'}
response_type: LLMResponse
assistant_text: LITELLM_1841_OK
tokens: {'model': 'litellm_proxy/openai/gpt-5.5', 'prompt_tokens': 18, 'completion_tokens': 11, ...}

This confirms the PR changes actually install LiteLLM 1.84.1 and the SDK can still make successful LLM calls through that upgraded dependency.

Test 2: High-level SDK conversation still runs with LiteLLM 1.84.1

Step 1 — Baseline:
The PR target is a dependency upgrade rather than a new CLI/API surface, so the relevant user-facing path is a normal SDK conversation that sends a user message through the agent/LLM stack.

Step 2 — Apply the PR's changes:
Used the PR checkout after make build, with litellm==1.84.1 installed.

Step 3 — Exercise the changed behavior:
Ran this high-level SDK flow:

mkdir -p /tmp/qa-sdk-conversation
OPENHANDS_SUPPRESS_BANNER=1 uv run python - <<'PY'
import os
from openhands.sdk import Agent, Conversation, LLM
llm = LLM(
    model=os.environ['LLM_MODEL'],
    base_url=os.environ['LLM_BASE_URL'],
    api_key=os.environ['LLM_API_KEY'],
    max_output_tokens=120,
    temperature=0,
    timeout=90,
    num_retries=0,
    reasoning_effort='none',
)
agent = Agent(llm=llm, tools=[])
conversation = Conversation(agent=agent, workspace='/tmp/qa-sdk-conversation')
conversation.send_message('Reply exactly: LITELLM_CONVERSATION_OK')
conversation.run()
print('conversation_completed: yes')
print('event_count:', len(conversation.state.events))
PY

Observed output excerpt:

Message from Agent
LITELLM_CONVERSATION_OK
conversation_completed: yes
event_count: 3

This shows the upgraded LiteLLM dependency works not only through direct SDK completion, but also through the higher-level user-facing conversation path.

Issues Found

None.

This QA review was created by an AI agent (OpenHands) on behalf of the user.

Co-authored-by: openhands <openhands@all-hands.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-this This label triggers a PR review by OpenHands

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants