Skip to content

[Automated] Draft docs (agentgateway): feat(llm): convert OpenAI inline file parts to Anthropic documents - #1382

Open
github-actions[bot] wants to merge 4 commits into
mainfrom
pr-tracker-draft-agentgateway-3912
Open

github-actions[bot] wants to merge 4 commits into
mainfrom
pr-tracker-draft-agentgateway-3912

Conversation

@github-actions

Copy link
Copy Markdown

agentgateway/agentgateway#3912 — feat(llm): convert OpenAI inline file parts to Anthropic documents

Docs versions: standalone/main, kubernetes/main

What changes for users: OpenAI Chat Completions clients can send inline file parts to Anthropic or another Messages-format provider when file.file_data is a base64 data: URI. The request now becomes a Messages document block; file_id, raw base64, remote URLs, and empty file parts are rejected instead of being silently dropped.

What the docs now say: The Chat Completions API page, the standalone and Kubernetes Anthropic provider pages, and the Kubernetes custom provider page now document the inline file conversion and the rejected non-inline file forms.

Not verified: No cluster or standalone gateway was available in CI; the configuration is unrun.

How agentgateway-3912 was drafted, and what was not verified

Plan, and what changed it

  • Planned: Document the Chat Completions-to-Messages file conversion on the API and provider pages that already describe this conversion path.
  • Learned: the code diff and the new rejection test contradicted the pull request body on remote URLs, so the docs say remote URLs are rejected.
  • Did: Added main-version standalone and Kubernetes prose for inline file.file_data conversion, plus a main-only gate in the shared Kubernetes Anthropic asset.

Why a documentation change is necessary

The pull request changes a user-visible request conversion path: a Chat Completions file content part to a Messages provider no longer disappears silently when the file content is an inline base64 data: URI. The changed function and golden fixture show that the inline file becomes a Messages document block, while the new test rejects file_id, raw base64, remote URLs, and empty file parts. The existing conversion pages described reasoning and usage behavior for this path but did not tell readers whether file parts were kept, dropped, or rejected.

What changed on disk

  • assets/agw-docs/pages/agentgateway/llm/providers/anthropic.md: Added a gated main-only Kubernetes section for inline files through Chat Completions on the Anthropic provider.
  • content/docs/kubernetes/main/integrations/llm/providers/custom.md: Added the file-part conversion and rejection boundary to the custom provider conversion discussion.
  • content/docs/standalone/main/documentation/llm/api-types/completions.md: Added a section for file parts on Chat Completions routes that convert to Messages.
  • content/docs/standalone/main/integrations/llm/providers/anthropic.md: Added the same Anthropic provider section for the standalone main tree.

How to verify this change

  1. Configure the Anthropic provider by using either the standalone or Kubernetes Anthropic guide that this draft edits.
  2. Send a /v1/chat/completions request with a user content array that contains { "type": "file", "file": { "filename": "report.pdf", "file_data": "data:application/pdf;base64,JVBERi0xLjQK" } }. The request should succeed, and the provider request should contain an Anthropic Messages document block with source.type: "base64" and title: "report.pdf".
  3. Send the same request with file_id: "file-abc123" instead of file_data. The request should fail with an unsupported conversion error that says the Anthropic path cannot resolve the OpenAI file_id.

What was not verified

How the pages were chosen (triage report)

Feature clusters

These clusters look incomplete. Each names a pull request this run never saw, so documenting the cluster as it stands may describe half a feature — the classic failure is a guide telling a reader to set a field that a later change gave a default. Read the absent pull request before drafting:

Cluster Missing What it is Why it matters
c2 agentgateway/agentgateway#4127 fix(llm): convert Messages documents to Responses input files (open) also worked issue #3792, which agentgateway/agentgateway#3912 closes

Draft a documentation change

agentgateway/agentgateway#3912 — feat(llm): convert OpenAI inline file parts to Anthropic documents

  • Product: agentgateway (upstream) → agentgateway/website
  • Docs version: standalone/main, kubernetes/main
  • Code issue: Anthropic conversion silently drops OpenAI file Content Parts agentgateway#3792
  • Summary (read from the body): A user message with an OpenAI inline file part was silently dropped on the way to an Anthropic backend — the conversion mapped unhandled part types to {}, so the model answered as if no file had been attached.
  • Not tested: no cluster was available, so every command in this diff is unrun

Release notes

This pull request also adds its release-note entries:

  • content/docs/kubernetes/main/release-notes/release-notes.md: Chat Completions file parts convert to Anthropic documents (feature)
  • content/docs/standalone/main/release-notes/release-notes.md: Chat Completions file parts convert to Anthropic documents (feature)

Check these release-note links and names. Each note is on its page, but a link may not reach the drafted content there, or a name may belong to the other mode:

Draft branch: pr-tracker-draft-agentgateway-3912


Important

The test suite has not run on this pull request. It was opened by github-actions[bot], and GitHub does not start workflows for pull requests opened with the repository's own token. Doc tests, link checking and the static checks are held as action_required until somebody presses Approve and run on the Checks tab. Cloudflare Pages and DCO are GitHub Apps rather than Actions, so those two do run on their own.

Please approve the checks before reviewing the content: an absence of failures here means the tests have not run, not that they passed.

…ne file parts to Anthropic documents

Signed-off-by: GitHub Action <action@github.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Deploying agentproxy with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2642fe8
Status: ✅  Deploy successful!
Preview URL: https://ea2d0d03.agentproxy.pages.dev
Branch Preview URL: https://pr-tracker-draft-agentgatewa-c18g.agentproxy.pages.dev

View logs

Signed-off-by: Kristin Brown <kristin.brown@solo.io>
Signed-off-by: Art Berger <art.berger@solo.io>
- Standalone: full text stays in completions.md, promoted to an H2
  because it is not part of reasoning carryover. anthropic.md now links
  to it.
- K8s custom.md: own H3 after the reasoning table, plus the filename
  title and the prompt_cache_breakpoint to cache_control mapping
  (conversion/messages.rs).
- Gate the asset text with upstream version tokens only.

Signed-off-by: Art Berger <art.berger@solo.io>
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