Repository navigation
feat(usage): tool_call on usage events for MCP gateways - #29
Merged
Merged
Conversation
An MCP gateway such as Keystone's sends one event per tool call it forwards: vendor mcp, model server__tool, no tokens, and tool_call with the server, the tool and the result's size. They are stored in Postgres and ClickHouse as tool_server, tool_name and response_bytes; the field is only added to usage.v1. docs#183
Merged
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.
Keystone's MCP gateway (ai-process/ktms#136) sends one event per forwarded tool call: vendor
mcp, modelserver__tool, no tokens, and the newtool_call(server, tool, response_bytes). Additive field 19 inusage.v1; stored astool_server,tool_name,response_bytesin Postgres (migration 009) and ClickHouse (005), carried by the outbox and replicator; accepted over gRPC and HTTP and validated (both names set, lengths, size >= 0). Task: ai-process/docs#183.Verified:
go vet,go test ./... -raceagainst Postgres and ClickHouse, and end to end from a KTMS build: events (including ones held during an outage) arrive with tool_call stored.