-
Notifications
You must be signed in to change notification settings - Fork 3
perf: eliminate unnecessary json marshalling for anthropic requests to bridge #102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
SasSwart
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reviewed the PR structurally, and I only have one comment about test coverage. The rest looks good.
At a higher level I'm a little concerned that we might not sufficiently document why we need to do this kind of content modification.
Its a seemingly invalid assumption of mine that because Bridge acts as a gateway, there should be no discrepancies between the payloads we receive and the ones we track or send on.
Yet, we need to introduce the stream attribute, and me need to coerce tool calls into a specific format and I've been unable to determine why.
| checkContent: nil, | ||
| }, | ||
| { | ||
| name: "mcp_tool_result with string content unchanged", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this test case (and others related to tool_result, mcp_tool_result) no longer relevant? We still have logic in convertStringContentRecursive that relates to these types of content.
Merge activity
|
Signed-off-by: Danny Kopping <[email protected]>
14690bd to
78c808d
Compare
Update our dependency on coder/aibridge. This allows us to benefit from the following additions to bridge: feat: inner agentic loop for openai responses requests (blocking only) (coder/aibridge#127) feat: req/resp logging middleware (coder/aibridge#105) perf: eliminate unnecessary json marshalling for anthropic requests to bridge (coder/aibridge#102) feat: add token usage recording for responses streaming interceptor (coder/aibridge#125) feat: add token usage recording for responses blocking interceptor (coder/aibridge#124) feat: add tool usage recording to streaming responses interceptor (coder/aibridge#123) feat: add tool usage recording for blocking responses interceptor (coder/aibridge#122) Extend circuit breaker functionality to support per-model isolation (coder/aibridge#111) feat: add circuit breaker for upstream provider overload protection (coder/aibridge#75) chore: change blocking request timeouts to 10m (coder/aibridge#118) feat: add prompt recording for responses API (coder/aibridge#109) feat: add basic responses API interceptor (coder/aibridge#107)

The actions of determining whether to use Anthropic's streaming APIs and ensuring a uniform message payload format used to unmarshal and remarshal the same payload twice. This PR ensures we unmarshal once, do both, and then remarshal once.