Repository navigation
[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
Open
github-actions[bot] wants to merge 4 commits into
github-actions[bot] wants to merge 4 commits into
Conversation
…ne file parts to Anthropic documents Signed-off-by: GitHub Action <action@github.com>
Deploying agentproxy with
|
| 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 |
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
agentgateway/agentgateway#3912 — feat(llm): convert OpenAI inline file parts to Anthropic documents
Docs versions:
standalone/main,kubernetes/mainWhat changes for users: OpenAI Chat Completions clients can send inline
fileparts to Anthropic or another Messages-format provider whenfile.file_datais a base64data:URI. The request now becomes a Messagesdocumentblock;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-3912was drafted, and what was not verifiedPlan, and what changed it
file.file_dataconversion, 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
filecontent part to a Messages provider no longer disappears silently when the file content is an inline base64data:URI. The changed function and golden fixture show that the inline file becomes a Messagesdocumentblock, while the new test rejectsfile_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
/v1/chat/completionsrequest with a usercontentarray 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 Messagesdocumentblock withsource.type: "base64"andtitle: "report.pdf".file_id: "file-abc123"instead offile_data. The request should fail with an unsupported conversion error that says the Anthropic path cannot resolve the OpenAIfile_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:
Draft a documentation change
agentgateway/agentgateway#3912 — feat(llm): convert OpenAI inline file parts to Anthropic documents
agentgateway/websitefilepart 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.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:
content/docs/kubernetes/main/release-notes/release-notes.md: feat(llm): convert OpenAI inline file parts to Anthropic documents agentgateway#3912's note namesURI in, whichcontent/docs/standalone/mainmentions andcontent/docs/kubernetes/maindoes not. Check that this tree's readers can set it, or word the note for this mode.content/docs/standalone/main/release-notes/release-notes.md: feat(llm): convert OpenAI inline file parts to Anthropic documents agentgateway#3912's note namespart as a base64, whichcontent/docs/kubernetes/mainmentions andcontent/docs/standalone/maindoes not. Check that this tree's readers can set it, or word the note for this mode.content/docs/standalone/main/release-notes/release-notes.md: feat(llm): convert OpenAI inline file parts to Anthropic documents agentgateway#3912's note names. The conversion sends it as a Messages, whichcontent/docs/kubernetes/mainmentions andcontent/docs/standalone/maindoes not. Check that this tree's readers can set it, or word the note for this mode.content/docs/standalone/main/release-notes/release-notes.md: feat(llm): convert OpenAI inline file parts to Anthropic documents agentgateway#3912's note namesblock. Requests that use, whichcontent/docs/kubernetes/mainmentions andcontent/docs/standalone/maindoes not. Check that this tree's readers can set it, or word the note for this mode.Draft branch:
pr-tracker-draft-agentgateway-3912Important
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 asaction_requireduntil 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.