Skip to content

Implementing more Anthropic messages API schema #1837

Closed
changminbark wants to merge 11 commits intoenvoyproxy:mainfrom
changminbark:anthropic-messages-schema-tracing
Closed

Implementing more Anthropic messages API schema #1837
changminbark wants to merge 11 commits intoenvoyproxy:mainfrom
changminbark:anthropic-messages-schema-tracing

Conversation

@changminbark
Copy link
Contributor

@changminbark changminbark commented Feb 5, 2026

Description
This PR adds more struct definitions and their corresponding JSONMarshal and JSONUnmarshal methods according to the Anthropic Messages API.

It does not introduce any tracing as that should be opened in a new issue.

Related Issues/PRs (if applicable)

Fixes #1799

Special notes for reviewers (if applicable)
Claude code was used to write most of the code here, but I manually checked all of code that it generated. One thing that I noticed is that some of the previous API schema for Anthropic implemented in this repository were moved to beta status by Anthropic. This is something that the maintainers should discuss.

  1. https://platform.claude.com/docs/en/api/messages#body-messages-content
  2. https://platform.claude.com/docs/en/api/messages/create
  3. https://platform.claude.com/docs/en/api/beta/messages#body-messages-content
  4. https://platform.claude.com/docs/en/api/beta/messages/create

@changminbark changminbark requested a review from a team as a code owner February 5, 2026 20:27
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Feb 5, 2026
@changminbark changminbark reopened this Feb 5, 2026
@changminbark
Copy link
Contributor Author

Hello @nacx, this is the PR that introduces the rest of the Anthropic messages API schema. Btw, is there any way for me to change the PR title? It is not passing the PR style check for titles.

changminbark and others added 11 commits February 9, 2026 10:06
Signed-off-by: Chang Min <changminbark@gmail.com>
Signed-off-by: Chang Min <changminbark@gmail.com>
Signed-off-by: Chang Min <changminbark@gmail.com>
Signed-off-by: Chang Min <changminbark@gmail.com>
Signed-off-by: Chang Min <changminbark@gmail.com>
…1842)

**Description**

Claude Opus 4.6 has new value `adaptive` for thinking [1] type 

1.
https://platform.claude.com/docs/en/about-claude/models/whats-new-claude-4-6#adaptive-thinking-mode

Signed-off-by: Xiaolin Lin <xlin158@bloomberg.net>
…nvoyproxy#1648)

**Description**
Add InvokeModel API support for claude models in aws bedrock. The
motivation is to provide consistent services cross providers,
envoyproxy#1644 for more details
about the motivation.

Other Changes:
I put common codes related to anthropic into `anthropic_helper.go`, so
that both aws and gcp can share these codes.

---------

Signed-off-by: yxia216 <yxia216@bloomberg.net>
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Signed-off-by: Aaron Choo <achoo30@bloomberg.net>
Signed-off-by: Dan Sun <dsun20@bloomberg.net>
Co-authored-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Co-authored-by: Aaron Choo <achoo30@bloomberg.net>
Co-authored-by: Dan Sun <dsun20@bloomberg.net>
**Description**
This adds support for API Key upstream auth as a HTTP query parameter
for MCP servers. There are several public MCP server that employ this
pattern, thus this unlocks several patterns.

To adds support for that, this remove the use of CredentialsInjector for
inserting API Keys as it doesn't support the query parameter as a
location.



**Related Issues/PRs (if applicable)**
Closes envoyproxy#1731

---------

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Co-authored-by: Ignasi Barrera <ignasi@tetrate.io>
Signed-off-by: Chang Min <changminbark@gmail.com>
@changminbark changminbark force-pushed the anthropic-messages-schema-tracing branch from f3ea05e to a669424 Compare February 9, 2026 15:07
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Feb 9, 2026
@changminbark
Copy link
Contributor Author

@nutanix-Hrushikesh @nacx I created a new PR because of the git mess I created (while trying to signoff on previous commits) and not being able to change the PR title. The new PR is here: #1843

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Complete Anthropic /messages schema and tracing

7 participants