Set up
agentgateway is an open-source AI gateway that runs in your own cluster. Solo.io’s enterprise edition and Gloo AI Gateway are builds of the same project, so the same recipe covers all three. The gateway has no public address for the SDK to recognize, so pass the agentgateway recipe with your gateway’s base URL:Anthropic client pointed at the gateway’s root, with the same recipe, and its calls are governed the same way:
- Always pass
baseUrlfor Solo.io and Gloo builds. Without it, the SDK recognizes the gateway only when a part of its hostname isagentgatewayor starts withagentgateway-, as in a default install’sagentgateway-proxy.agentgateway-system.svc. - Tell deployments apart with a dimension. Every build reports under the same
agentgateway.*event names. To separate Solo.io traffic from another agentgateway deployment, add a dimension such asgateway: 'solo-enterprise'to thestiggContext.
agentgatewayRecipe options
What is reported
agentgateway is a gateway you host: one endpoint in front of many model providers, answering in OpenAI’s format and in Anthropic’s. Each route reports the token counts of the format it answered in. The gateway puts no price on its responses, so there is nocost metric. Each provider charges you directly for what its models served.
- Chat Completions and Responses report the same metrics as OpenAI.
- Messages reports the same metrics as Anthropic.
Every usage field the gateway returns is also included, with a
raw. prefix. See How usage is reported.