Skip to content

🔄 Upstream Sync: LiteLLM v1.81.0-stable - #87

Closed
Cartofante wants to merge 7605 commits into
carto/mainfrom
upstream-sync/v1.81.0-stable
Closed

🔄 Upstream Sync: LiteLLM v1.81.0-stable#87
Cartofante wants to merge 7605 commits into
carto/mainfrom
upstream-sync/v1.81.0-stable

Conversation

@Cartofante

Copy link
Copy Markdown
Collaborator

🔄 Upstream Sync: LiteLLM v1.81.0-stable

Syncs CARTO's LiteLLM fork with upstream stable release v1.81.0-stable.

Metric Value
Version 1.79.1v1.81.0-stable
Commits 7603
Files Changed 3658
Upstream Release v1.81.0-stable

Caution

⚠️ DO NOT SQUASH MERGE THIS PR

Use "Create a merge commit" only. Squashing destroys upstream history and breaks future syncs.


🧪 Pre-Merge Checklist

  • CI checks pass (lint, tests, Docker build)
  • CARTO customizations preserved
  • pyproject.toml version matches upstream

📊 Release Information (click to expand)
🔀 Branch Flow (click to expand)
  1. BerriAI/litellm:main merged into CartoDB/litellm:main
  2. ✅ Created dedicated sync branch: upstream-sync/v1.81.0-stable
  3. 📝 This PR: upstream-sync/v1.81.0-stablecarto/main

[!NOTE]
Why a dedicated branch? Allows pushing conflict resolution commits directly to this PR.

📝 CARTO-Specific File Guidelines (click to expand)

When reviewing or resolving conflicts:

✅ Keep CARTO Versions (Ours)

  • .github/workflows/carto_*.yaml - CARTO workflows
  • .github/workflows/carto-*.yml - CARTO workflows
  • CARTO_*.md, docs/CARTO_*.md - CARTO documentation

🔄 Accept Upstream (Theirs)

  • pyproject.toml - Version field
  • litellm/ - Core library code
  • tests/ - Upstream tests
  • requirements.txt - Dependencies

⚠️ Manual Review Required

  • Dockerfile, docker/Dockerfile.non_root - CARTO customizations
  • Makefile - Check # CARTO: sections
🔧 Conflict Resolution (click to expand)

If this PR has conflicts:

Option 1: Automated (Recommended)

The carto-upstream-sync-resolver workflow triggers automatically.

What it does:

  1. 🤖 Detects conflicts → 🔀 Merges carto/main → ✏️ Resolves conflicts → 🧪 Runs tests → 📌 Pushes to this PR

You just need to: Wait for resolution commits, verify CARTO customizations, merge.

[!TIP]
Single PR workflow! No separate resolution PR needed.

Option 2: Manual Resolution

git fetch origin
git checkout upstream-sync/v1.81.0-stable
git merge origin/carto/main  # Creates conflicts
# ... resolve conflicts ...
make lint && make test-unit
git push origin upstream-sync/v1.81.0-stable
📚 Documentation Links (click to expand)

🤖 This PR was automatically created by the carto-upstream-sync workflow.

Sameerlite and others added 30 commits January 28, 2026 18:35
…ridge_usage

Fix: output_tokens_details.reasoning_tokens None
* Cleanup code for user cli auth, and make sure not to prompt user for team multiple times while polling

* Adding tests

* Cleanup normalize teams some more
…erriAI#19944)

The regex in get_vertex_model_id_from_url() was using [^/:]+
which stopped at the first slash, truncating model names like
'gcp/google/gemini-2.5-flash' to just 'gcp'. This caused
access_groups checks to fail for custom model names.

Changed the pattern to [^:]+ to allow slashes in model names,
only stopping at the colon before the action (e.g., :generateContent).
…tore

[Feature] UI - Spend Logs: Settings Modal
)

* fix: LiteLLMA2ACardResolver

* fix: LiteLLMA2ACardResolver

* feat: .well-known/agent.json

* test_card_resolver_fallback_from_new_to_old_path
…rror_message

[Feature] Add error_message Search in Spend Logs Endpoint
…ssthroughs to stop working for router models (BerriAI#19967)

* fix(vertex_ai): replace custom model names with actual Vertex AI model names in passthrough URLs (BerriAI#19948)

When the passthrough URL already contains project and location, the code
was skipping the deployment lookup and forwarding the URL as-is to Vertex AI.
For custom model names like gcp/google/gemini-2.5-flash, Vertex AI returned
404 because it only knows the actual model name (gemini-2.5-flash).

The fix makes the deployment lookup always run, so the custom model name
gets replaced with the actual Vertex AI model name before forwarding.

* add _resolve_vertex_model_from_router

* fix: get_llm_provider

* Potential fix for code scanning alert no. 4020: Clear-text logging of sensitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: michelligabriele <gabriele.michelli@icloud.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…t in router (BerriAI#19969)

* feat: List all available search tools configured in the router.

* add debugging search API

* add debugging search API
…component

[Feature] UI - Tables: Reusable Table Sort Component
…m_search

[Feature] UI - Logs: Adding Error message search to ui spend logs
…eams (BerriAI#19972)

* fix: create_vector_store_in_db

* add team/user to LiteLLM_ManagedVectorStore

* add _check_vector_store_access

* add new fields

* test_check_vector_store_access

* add vector_store/list endpoints

* fix code QA checks
…7`, `z-ai/glm-4.7-flash`, and `minimax/minimax-m2.1`. to model prices and context window (BerriAI#19938)

Co-authored-by: Rushil Chugh <Rushil>
@Cartofante
Cartofante force-pushed the upstream-sync/v1.81.0-stable branch from 8bb3acc to 32b6e59 Compare February 4, 2026 09:39
@Cartofante

Copy link
Copy Markdown
Collaborator Author

🔧 CI Fix Applied

Error Fixed:

ModuleNotFoundError: No module named 'litellm.llms.bedrock.realtime'

Fix Applied:

  • Folder: litellm/llms/bedrock/realtime/
  • Change: Restored entire folder from upstream. This folder (containing handler.py, transformation.py, and __init__.py) was missing because it was dropped during conflict resolution. The folder implements AWS Bedrock Nova Sonic realtime API.

Note: The TypeScript error mentioned in Docker logs (AllModelsTab.tsx with table prop) was already fixed in a previous commit - the current file doesn't have this issue.

Verification: Pushed to branch, CI will re-run automatically.


Attempt #5 - Restored missing bedrock/realtime module from upstream.

@Cartofante

Copy link
Copy Markdown
Collaborator Author

✅ CI Fix Complete

Fixes applied and pushed to this PR.

Step Status
🔍 Analyze failures ✅ Complete
✏️ Apply fixes ✅ Complete
📌 Push fixes ✅ Complete

Note

CI will re-run automatically. Monitor check results below.

Next Steps

  1. Wait for CI checks to complete
  2. If failures persist, manual review may be needed
  3. Merge when all checks pass
🔧 Workflow Details (click to expand)

Workflow Run: https://github.com/CartoDB/litellm/actions/runs/21666231016

@Cartofante

Copy link
Copy Markdown
Collaborator Author

🔧 CI Auto-Fix Started

Status: ⏳ In progress...

Claude Code (Opus 4.5) is analyzing and fixing CI failures.

Failed Checks:

  • test: FAILURE
Step Status
🔍 Analyze failures In progress
✏️ Apply fixes Pending
📌 Push fixes Pending

Note

This may take 15-30 minutes. Fixes will be pushed directly to this PR.

View workflow run →

@Cartofante
Cartofante force-pushed the upstream-sync/v1.81.0-stable branch from 32b6e59 to 0527f9f Compare February 4, 2026 09:44
@Cartofante

Copy link
Copy Markdown
Collaborator Author

🔧 CI Fix Applied

Errors Fixed:

1. TypeScript Import Error

Type error: Cannot find module './networking' or its corresponding type declarations.
./src/components/AIHub/forms/MakeModelPublicForm.tsx:4:38

Fix: Changed import path from "./networking" to "../../networking" to match the correct relative path (same as other files in the folder like MakeAgentPublicForm.tsx and MakeMCPPublicForm.tsx).

2. Python Import Error

ImportError: cannot import name 'get_shared_realtime_ssl_context' from 'litellm.llms.custom_httpx.http_handler'

Fix: Synced litellm/llms/custom_httpx/http_handler.py from upstream (1121 → 1280 lines) to include the missing get_shared_realtime_ssl_context function.

Verification: Pushed to branch, CI will re-run automatically.


Attempt #6 - Fixed import path typo in MakeModelPublicForm.tsx and synced http_handler.py from upstream.

@Cartofante

Copy link
Copy Markdown
Collaborator Author

✅ CI Fix Complete

Fixes applied and pushed to this PR.

Step Status
🔍 Analyze failures ✅ Complete
✏️ Apply fixes ✅ Complete
📌 Push fixes ✅ Complete

Note

CI will re-run automatically. Monitor check results below.

Next Steps

  1. Wait for CI checks to complete
  2. If failures persist, manual review may be needed
  3. Merge when all checks pass
🔧 Workflow Details (click to expand)

Workflow Run: https://github.com/CartoDB/litellm/actions/runs/21666386232

@Cartofante

Copy link
Copy Markdown
Collaborator Author

🔧 CI Auto-Fix Started

Status: ⏳ In progress...

Claude Code (Opus 4.5) is analyzing and fixing CI failures.

Failed Checks:

  • test: FAILURE
Step Status
🔍 Analyze failures In progress
✏️ Apply fixes Pending
📌 Push fixes Pending

Note

This may take 15-30 minutes. Fixes will be pushed directly to this PR.

View workflow run →

@Cartofante

Copy link
Copy Markdown
Collaborator Author

❌ CI Fix Failed

The automated fix encountered an error.

Step Status
🔍 Analyze failures failure
✏️ Apply fixes -
📌 Push fixes -

Warning

Manual intervention required. Check the workflow logs below.

🔧 Troubleshooting (click to expand)

Common issues:

  • Complex merge conflicts requiring human judgment
  • Multiple interrelated failures
  • Test failures requiring code logic changes

Manual fix steps:

  1. Check the workflow logs
  2. Review error messages
  3. Fix issues locally and push

View workflow logs →

@Cartofante

Copy link
Copy Markdown
Collaborator Author

🔧 CI Auto-Fix Started

Status: ⏳ In progress...

Claude Code (Opus 4.5) is analyzing and fixing CI failures.

Failed Checks:

  • test: FAILURE
  • build-and-push-image-non_root: FAILURE
Step Status
🔍 Analyze failures In progress
✏️ Apply fixes Pending
📌 Push fixes Pending

Note

This may take 15-30 minutes. Fixes will be pushed directly to this PR.

View workflow run →

@Cartofante
Cartofante force-pushed the upstream-sync/v1.81.0-stable branch from 0527f9f to 2b67b50 Compare February 4, 2026 10:32
@Cartofante

Copy link
Copy Markdown
Collaborator Author

🔧 CI Fix Applied

Errors Fixed:

1. Python ModuleNotFoundError (Tests)

ModuleNotFoundError: No module named 'litellm.llms.xai.realtime'

Root Cause: The litellm/llms/xai/realtime/ folder was missing - it was dropped during conflict resolution.

Fix: Restored the entire litellm/llms/xai/realtime/ folder from upstream:

  • __init__.py (5 lines)
  • handler.py (38 lines)

2. TypeScript Import Error (Docker Build)

Type error: Cannot find module './model_filters' or its corresponding type declarations.
./src/components/AIHub/forms/MakeModelPublicForm.tsx:5:26

Root Cause: The file is in AIHub/forms/ but was importing ./model_filters which should be ../../model_filters.

Fix: Changed import from ./model_filters to ../../model_filters in MakeModelPublicForm.tsx.

Verification: Pushed to branch, CI will re-run automatically.


If this fails, I'll analyze the new errors and try again.

@Cartofante

Copy link
Copy Markdown
Collaborator Author

✅ CI Fix Complete

Fixes applied and pushed to this PR.

Step Status
🔍 Analyze failures ✅ Complete
✏️ Apply fixes ✅ Complete
📌 Push fixes ✅ Complete

Note

CI will re-run automatically. Monitor check results below.

Next Steps

  1. Wait for CI checks to complete
  2. If failures persist, manual review may be needed
  3. Merge when all checks pass
🔧 Workflow Details (click to expand)

Workflow Run: https://github.com/CartoDB/litellm/actions/runs/21666614474

@Cartofante

Copy link
Copy Markdown
Collaborator Author

🔧 CI Auto-Fix Started

Status: ⏳ In progress...

Claude Code (Opus 4.5) is analyzing and fixing CI failures.

Failed Checks:

  • test: FAILURE
Step Status
🔍 Analyze failures In progress
✏️ Apply fixes Pending
📌 Push fixes Pending

Note

This may take 15-30 minutes. Fixes will be pushed directly to this PR.

View workflow run →

@Cartofante
Cartofante force-pushed the upstream-sync/v1.81.0-stable branch from 2b67b50 to 317a708 Compare February 4, 2026 10:37
@Cartofante

Copy link
Copy Markdown
Collaborator Author

🔧 CI Fix Applied

Errors Fixed:

1. Python Import Error (Tests)

ImportError: cannot import name 'get_requester_metadata' from 'litellm.utils'

Root Cause: litellm/utils.py was out of sync with upstream (8124 lines vs 9168 lines). The get_requester_metadata function and ~1000 other lines were missing.

Fix: Synced entire litellm/utils.py from upstream (8124 → 9168 lines). This file is NOT CARTO-modified, so full sync was safe.

2. TypeScript Import Error (Docker Build)

Type error: Cannot find module './model_filters' or its corresponding type declarations.
./src/components/AIHub/forms/MakeModelPublicForm.tsx:5:26

Note: The model_filters import was already fixed in previous commits (now uses ../../model_filters).

The CI log was showing an outdated error. The NEW error in the file was on line 6:

import NotificationsManager from "./molecules/notifications_manager";

Fix: Changed to ../../molecules/notifications_manager since the file is in AIHub/forms/ but notifications_manager.tsx is in components/molecules/.

Verification: Pushed to branch, CI will re-run automatically.


If this fails, I'll analyze the new errors and try again.

@Cartofante

Copy link
Copy Markdown
Collaborator Author

✅ CI Fix Complete

Fixes applied and pushed to this PR.

Step Status
🔍 Analyze failures ✅ Complete
✏️ Apply fixes ✅ Complete
📌 Push fixes ✅ Complete

Note

CI will re-run automatically. Monitor check results below.

Next Steps

  1. Wait for CI checks to complete
  2. If failures persist, manual review may be needed
  3. Merge when all checks pass
🔧 Workflow Details (click to expand)

Workflow Run: https://github.com/CartoDB/litellm/actions/runs/21668056939

@Cartofante

Copy link
Copy Markdown
Collaborator Author

🔧 CI Auto-Fix Started

Status: ⏳ In progress...

Claude Code (Opus 4.5) is analyzing and fixing CI failures.

Failed Checks:

  • test: FAILURE
Step Status
🔍 Analyze failures In progress
✏️ Apply fixes Pending
📌 Push fixes Pending

Note

This may take 15-30 minutes. Fixes will be pushed directly to this PR.

View workflow run →

@Cartofante
Cartofante force-pushed the upstream-sync/v1.81.0-stable branch from 317a708 to 3159f60 Compare February 4, 2026 10:45
@Cartofante

Copy link
Copy Markdown
Collaborator Author

🔧 CI Fix Applied

Errors Fixed:

1. Python Import Error

ImportError: cannot import name 'filter_internal_params' from 'litellm.litellm_core_utils.core_helpers'

Fix: Synced litellm/litellm_core_utils/core_helpers.py from upstream (301 → 424 lines). The file contained an incomplete version that was missing the filter_internal_params function added in newer upstream releases.

2. UI Type Error (Docker Build)

Type error: Module './types' has no exported member 'MarginConfig'.

Fix: Synced ui/litellm-dashboard/src/components/CostTrackingSettings/types.ts from upstream (15 → 52 lines). Added missing MarginConfig, CostMarginResponse, CostEstimateRequest, and CostEstimateResponse interfaces.

Verification: Amended previous CI fix commit and pushed to branch. CI will re-run automatically.


Note: The provided CI logs in /tmp were stale. Fetched fresh logs from GitHub Actions run #21668171451.

@Cartofante

Copy link
Copy Markdown
Collaborator Author

✅ CI Fix Complete

Fixes applied and pushed to this PR.

Step Status
🔍 Analyze failures ✅ Complete
✏️ Apply fixes ✅ Complete
📌 Push fixes ✅ Complete

Note

CI will re-run automatically. Monitor check results below.

Next Steps

  1. Wait for CI checks to complete
  2. If failures persist, manual review may be needed
  3. Merge when all checks pass
🔧 Workflow Details (click to expand)

Workflow Run: https://github.com/CartoDB/litellm/actions/runs/21668220946

@Cartofante

Copy link
Copy Markdown
Collaborator Author

🔧 CI Auto-Fix Started

Status: ⏳ In progress...

Claude Code (Opus 4.5) is analyzing and fixing CI failures.

Failed Checks:

  • test: FAILURE
Step Status
🔍 Analyze failures In progress
✏️ Apply fixes Pending
📌 Push fixes Pending

Note

This may take 15-30 minutes. Fixes will be pushed directly to this PR.

View workflow run →

- Add DEFAULT_REDIS_MAJOR_VERSION constant to litellm/constants.py
- Restore chat_ui folder from carto/main (ChatUI.tsx and dependencies)
- Restore new_usage.tsx component from carto/main
- Restore make_model_public_form.tsx component from carto/main

Fixes:
- ImportError: cannot import name 'DEFAULT_REDIS_MAJOR_VERSION'
- Module not found: Can't resolve '@/components/chat_ui/ChatUI'
- Module not found: Can't resolve '@/components/new_usage'
- Module not found: Can't resolve './make_model_public_form'

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Cartofante
Cartofante force-pushed the upstream-sync/v1.81.0-stable branch from 3159f60 to 437e341 Compare February 4, 2026 11:32
@Cartofante

Copy link
Copy Markdown
Collaborator Author

🔧 CI Fix Applied

Error Fixed:

ModuleNotFoundError: No module named 'litellm.llms.bedrock.image.amazon_nova_canvas_transformation'

Root Cause:
The file litellm/llms/bedrock/image_generation/image_handler.py had incorrect import paths. It was importing from litellm.llms.bedrock.image.* but the transformation files are located in litellm.llms.bedrock.image_generation/*.

Fix Applied:

  • File: litellm/llms/bedrock/image_generation/image_handler.py
  • Change: Synced from upstream to fix all import paths from ...bedrock.image. to ...bedrock.image_generation.

Note on UI Issues:
The Docker build is also failing on UI TypeScript errors. These are due to antd version compatibility issues (current codebase uses antd 5.13.2, but upstream code expects features from newer versions like styles prop on Tooltip, labelRender prop on Select, variant prop on Button, etc.). Fixing these requires either:

  1. Upgrading antd to a newer version
  2. Syncing a large number of interdependent UI components from upstream

This fix addresses the Python import error. The UI issues may need separate attention.

Verification: Pushed to branch (amended existing CI fix commit), CI will re-run automatically.


If CI fails again on UI errors, a more comprehensive UI sync or antd version update will be needed.

@Cartofante

Copy link
Copy Markdown
Collaborator Author

❌ CI Fix Failed

The automated fix encountered an error.

Step Status
🔍 Analyze failures cancelled
✏️ Apply fixes -
📌 Push fixes -

Warning

Manual intervention required. Check the workflow logs below.

🔧 Troubleshooting (click to expand)

Common issues:

  • Complex merge conflicts requiring human judgment
  • Multiple interrelated failures
  • Test failures requiring code logic changes

Manual fix steps:

  1. Check the workflow logs
  2. Review error messages
  3. Fix issues locally and push

View workflow logs →

@Cartofante

Copy link
Copy Markdown
Collaborator Author

🔧 CI Auto-Fix Started

Status: ⏳ In progress...

Claude Code (Opus 4.5) is analyzing and fixing CI failures.

Failed Checks:

  • test: FAILURE
Step Status
🔍 Analyze failures In progress
✏️ Apply fixes Pending
📌 Push fixes Pending

Note

This may take 15-30 minutes. Fixes will be pushed directly to this PR.

View workflow run →

@Cartofante

Copy link
Copy Markdown
Collaborator Author

❌ CI Fix Failed

The automated fix encountered an error.

Step Status
🔍 Analyze failures cancelled
✏️ Apply fixes -
📌 Push fixes -

Warning

Manual intervention required. Check the workflow logs below.

🔧 Troubleshooting (click to expand)

Common issues:

  • Complex merge conflicts requiring human judgment
  • Multiple interrelated failures
  • Test failures requiring code logic changes

Manual fix steps:

  1. Check the workflow logs
  2. Review error messages
  3. Fix issues locally and push

View workflow logs →

@mateo-di mateo-di closed this Feb 4, 2026
@mateo-di
mateo-di deleted the upstream-sync/v1.81.0-stable branch February 4, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.