Skip to content

[fix] anthropic during call error - #19060

Merged
uc4w6c merged 2 commits into
mainfrom
litellm_fix_anthropic-during-call-error
Jan 14, 2026
Merged

uc4w6c merged 2 commits into
mainfrom
litellm_fix_anthropic-during-call-error

Conversation

@uc4w6c

@uc4w6c uc4w6c commented Jan 14, 2026 •

Copy link
Copy Markdown
Contributor

Relevant issues

#N/A

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

CI (LiteLLM team)

CI status guideline:

  • 50-55 passing tests: main is stable with minor issues.
  • 45-49 passing tests: acceptable but needs attention
  • <= 40 passing tests: unstable; be careful with your merges and assess the risk.

Type

🐛 Bug Fix
✅ Test

Changes

Fixed the issue where calling a guardrail during during_call from /v1/messages requests triggered the following error.

traceback:"  File "/usr/lib/python3.13/site-packages/litellm/proxy/anthropic_endpoints/endpoints.py", line 53, in anthropic_response
    result = await base_llm_response_processor.base_process_llm_request(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<16 lines>...
    )
    ^
  File "/usr/lib/python3.13/site-packages/litellm/proxy/common_request_processing.py", line 560, in base_process_llm_request
    responses = await llm_responses
                ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/litellm/proxy/utils.py", line 1305, in during_call_hook
    raise e
  File "/usr/lib/python3.13/site-packages/litellm/proxy/utils.py", line 1302, in during_call_hook
    await asyncio.gather(*guardrail_tasks)
  File "/usr/lib/python3.13/site-packages/litellm/proxy/guardrails/guardrail_hooks/unified_guardrail/unified_guardrail.py", line 135, in async_moderation_hook
    CallTypes(call_type)
    ~~~~~~~~~^^^^^^^^^^^
  File "/usr/lib/python3.13/enum.py", line 726, in __call__
    return cls.__new__(cls, value)
           ~~~~~~~~~~~^^^^^^^^^^^^
  File "/usr/lib/python3.13/enum.py", line 1203, in __new__
    raise ve_exc
",
error_code:"",
error_class:"ValueError",
llm_provider:"",
error_message:"None is not a valid CallTypes"

@vercel

vercel Bot commented Jan 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
litellm Ready Ready Preview, Comment Jan 14, 2026 4:59am

@uc4w6c
uc4w6c merged commit 8d204f0 into main Jan 14, 2026
55 of 63 checks passed
@uc4w6c
uc4w6c deleted the litellm_fix_anthropic-during-call-error branch January 14, 2026 06:13
fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
…uring-call-error

[fix] anthropic during call error

This branch was successfully deployed

1 active deployment
Preview — 82ed6283 Deployed Jan 14, 2026 by vercel[bot]
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.

1 participant