Skip to content

fix(llm): Add LiteLLM version guard comments and TODO tracking#5956

Closed
namo507 wants to merge 1 commit intoaden-hive:mainfrom
namo507:patch-5
Closed

fix(llm): Add LiteLLM version guard comments and TODO tracking#5956
namo507 wants to merge 1 commit intoaden-hive:mainfrom
namo507:patch-5

Conversation

@namo507
Copy link

@namo507 namo507 commented Mar 6, 2026

Summary

Adds version guard documentation and a TODO for LiteLLM monkey-patches in core/framework/llm/litellm.py. These patches target internal APIs that could silently break when litellm is upgraded.

Changes

  • Added # VERSION GUARD comment block before the litellm import
  • Documents the risk: patches target litellm internals that change across versions
  • Added TODO(fix/litellm-patch-version-guards) to implement importlib.metadata version check and logger.warning() when patch targets are missing or the version is outside the known-working range
  • References LiteLLM monkey-patches should include version checks and graceful fallback #5948

Related issue: Closes #5948

Test plan

  • Verify litellm imports still work correctly after the comment additions
  • Run existing LLM provider tests to confirm no regressions
  • Manual check of comment formatting

…y checks

- Adds VERSION GUARD comment block before litellm try/import block
- Documents the risk: patches target litellm internals that change across versions
- Adds TODO(fix/litellm-patch-version-guards) to track the full implementation
- References issue aden-hive#5948
- Resolves: aden-hive#5948 (tracking comment)
@github-actions
Copy link

github-actions bot commented Mar 6, 2026

PR Closed - Requirements Not Met

This PR has been automatically closed because it doesn't meet the requirements.

PR Author: @namo507
Found issues: #5948 (assignees: none)
Problem: The PR author must be assigned to the linked issue.

To fix:

  1. Assign yourself (@namo507) to one of the linked issues
  2. Re-open this PR

Exception: To bypass this requirement, you can:

  • Add the micro-fix label or include micro-fix in your PR title for trivial fixes
  • Add the documentation label or include doc/docs in your PR title for documentation changes

Micro-fix requirements (must meet ALL):

Qualifies Disqualifies
< 20 lines changed Any functional bug fix
Typos & Documentation & Linting Refactoring for "clean code"
No logic/API/DB changes New features (even tiny ones)

Why is this required? See #472 for details.

@github-actions github-actions bot closed this Mar 6, 2026
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.

LiteLLM monkey-patches should include version checks and graceful fallback

1 participant