Skip to content

Conversation

TomeHirata
Copy link
Contributor

@TomeHirata TomeHirata commented Aug 28, 2025

Title

Add supported text field to anthropic citation response

Relevant issues

#7970

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
  • I have added a screenshot of my new test passing locally
  • 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
image

Type

🆕 New Feature

Changes

Add supported text field to anthropic citation response to tell which sentence is supported by each citation.

Copy link

vercel bot commented Aug 28, 2025

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

Project Deployment Preview Comments Updated (UTC)
litellm Ready Ready Preview Comment Aug 28, 2025 5:46am

@TomeHirata
Copy link
Contributor Author

@krrishdholakia Can you take a look?

@TomeHirata
Copy link
Contributor Author

Lint failure is unrelated

@TomeHirata
Copy link
Contributor Author

@ishaan-jaff Can you help take a look?

@krrishdholakia krrishdholakia merged commit afa6871 into BerriAI:main Aug 30, 2025
4 of 6 checks passed
@@ -797,7 +797,15 @@ def extract_response_content(self, completion_response: dict) -> Tuple[
if content.get("citations") is not None:
if citations is None:
citations = []
citations.append(content["citations"])
citations.append(
Copy link
Contributor

Choose a reason for hiding this comment

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

add a unit test for this behaviour inside test_litellm/

ishaan-jaff added a commit that referenced this pull request Aug 30, 2025
…text"

This reverts commit afa6871, reversing
changes made to 55186da.
@ishaan-jaff
Copy link
Contributor

@TomeHirata heads up this needed to be reverted - it looks like this change broke this test. I want to help get this merged in again - could you help take a 2nd look why this led to test_completion_claude_3_function_call_with_streaming failing ?

Specific test that broke

pytest test_streaming.py::test_completion_claude_3_function_call_with_streaming -s -v

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.

3 participants