Skip to content

Enable citations on provided ContentDocument (Anthropic)#4527

Open
sjawhar wants to merge 1 commit into
UKGovernmentBEIS:mainfrom
trajectory-labs-pbc:feature/anthropic-document-citations
Open

Enable citations on provided ContentDocument (Anthropic)#4527
sjawhar wants to merge 1 commit into
UKGovernmentBEIS:mainfrom
trajectory-labs-pbc:feature/anthropic-document-citations

Conversation

@sjawhar

@sjawhar sjawhar commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Inspect parses Anthropic document citations from responses, but callers could not enable citations on ContentDocument inputs.

  • Add the public ContentDocument.citations opt-in, defaulting to False.
  • Send Anthropic document configuration citations={"enabled": true} only when enabled.
  • Preserve backward compatibility and leave other providers unchanged.

Testing

  • Add direct Anthropic document-block conversion tests for opted-in and default behavior.
  • uv run make check
  • uv run make test

@sjawhar

sjawhar commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

Resubmission of #4480, rebased onto current main (that PR was auto-closed by a head-branch deletion during fork cleanup, without review).

@legion-implementer
legion-implementer Bot force-pushed the feature/anthropic-document-citations branch from e911427 to ba10622 Compare July 17, 2026 02:11
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