Skip to content

Fix BYOK Anthropic endpoints sending PDFs as image blocks - #324960

Merged
Bhavya U (bhavyaus) merged 2 commits into
microsoft:mainfrom
AntonioLujanoLuna:codex/fix-byok-anthropic-pdf-document-blocks
Jul 13, 2026
Merged

Bhavya U (bhavyaus) merged 2 commits into
microsoft:mainfrom
AntonioLujanoLuna:codex/fix-byok-anthropic-pdf-document-blocks

Conversation

@AntonioLujanoLuna

@AntonioLujanoLuna Antonio Lujano Luna (AntonioLujanoLuna) commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • send PDF data parts as Anthropic document blocks instead of invalid image blocks
  • handle PDFs both at message level and inside tool results while preserving image behavior

Validation

  • npm run gulp compile-extensions
  • npm run typecheck in extensions/copilot
  • npx eslint src/extension/byok/common/anthropicMessageConverter.ts src/extension/byok/common/test/anthropicMessageConverter.spec.ts
  • npm run test:unit -- src/extension/byok/common/test/anthropicMessageConverter.spec.ts
Copilot AI review requested due to automatic review settings July 8, 2026 15:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@bhavyaus
Bhavya U (bhavyaus) merged commit a1a77a7 into microsoft:main Jul 13, 2026
45 of 47 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.130.0 milestone Jul 13, 2026
@AntonioLujanoLuna
Antonio Lujano Luna (AntonioLujanoLuna) deleted the codex/fix-byok-anthropic-pdf-document-blocks branch July 31, 2026 12:39
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Aug 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

6 participants