-
Notifications
You must be signed in to change notification settings - Fork 456
Add useAiGateway tool to the Helicone MCP + Claude Agent SDK example for docs
#5306
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @juliettech13's task —— View job PR Code Review CompleteScore: 7/10 - Good implementation with one critical bug that needs immediate fixing Todo List:
Critical Issues Found🚨 Bug: Incorrect Custom Properties Header Format (
|
Greptile OverviewGreptile SummaryAdds a new Key Changes:
Issue Found:
Confidence Score: 3/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User as Developer
participant SDK as Claude Agent SDK
participant MCP as Helicone MCP Server
participant Gateway as Helicone AI Gateway
participant LLM as LLM Provider
User->>SDK: query() with prompt
SDK->>MCP: Connect to MCP server
MCP-->>SDK: Available tools (use_ai_gateway, etc.)
SDK->>SDK: Analyze prompt & decide to use use_ai_gateway
SDK->>MCP: Call use_ai_gateway tool
Note over SDK,MCP: Parameters: model, messages,<br/>sessionId, customProperties, etc.
MCP->>MCP: Prepare request with<br/>Helicone headers
MCP->>Gateway: POST /v1/chat/completions
Note over MCP,Gateway: Headers: Authorization,<br/>Helicone-Session-Id,<br/>Helicone-Property-*
Gateway->>Gateway: Log request metadata<br/>for observability
Gateway->>LLM: Forward request to provider
LLM-->>Gateway: Response
Gateway->>Gateway: Log response
Gateway-->>MCP: Chat completion response
MCP-->>SDK: Tool result
SDK-->>User: Final result with response
|
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.
9 files reviewed, 1 comment
Ticket
[ENG-3643] - Claude Agent SDK Integration with AI Gateway
Context
Why are you making this change?
In order to get the Claude Agent SDK working with the Helicone AI Gateway, we had to create a new tool call for our MCP that the Claude Agent SDK can call whenever it wants to make an LLM request.
This PR creates the new MCP tool alongside its documentation and examples, as well as generate the documentation needed for the Claude Agent SDK integration.
Component/Service
What part of Helicone does this affect?
Type of Change
Testing
Technical Considerations
Dependencies
Deployment Notes