OpenRouter
OpenRouter limitations
-
Every request needs an agent tag. OpenRouter does not infer the agent. Requests without
agent_idin thetraceobject are Unattributed. -
Only requests made through OpenRouter are included. Calls your agents make directly to a provider are not on this connection.
-
Routing spans are not counted as LLM calls. One model request counts as one LLM call.
-
Tags need the
mvk.tags.prefix. Put tags in thetraceobject asmvk.tags.<key>. Other keys are not read as tags.
Sessions and users
Send session_id and user at the top level of each OpenRouter request. OpenRouter exports them as session.id and user.id, and Mavvrik uses them for the Sessions view and per-user cost.
agentgateway
agentgateway limitations
-
Every request needs agent headers. Requests without
x-agent-idare Unattributed, including requests from the agentgateway Chat Playground and unchanged Client Setup snippets. -
Only requests that go through the gateway are included. Calls your agents make directly to a provider are not on this connection.
-
Tools your agent runs in its own code are counted only with an extra line. Add
gen_ai.tool_calls: 'llm.toolCalls'underattributesin the tracing block. MCP tools called through the gateway's MCP proxy are always counted. -
The environment values cannot be set in the agentgateway UI. You can paste the tracing block in Tools → Raw Configuration, but
MVK_TENANT_ID,MVK_OTLP_TOKENandMVK_CONNECTION_IDmust be set on the gateway container.
Sessions and users
Send x-session-id and x-user-id headers on each request. The gateway exports them as session.id and user.id, and Mavvrik uses them for the Sessions view and per-user cost.
Troubleshooting
|
Symptom |
Cause |
Resolution |
|---|---|---|
|
Test Connection fails in OpenRouter |
The endpoint path is missing |
The endpoint must end with |
|
HTTP 401 reported by Broadcast |
The headers JSON was edited or is incomplete |
Paste the headers JSON from Mavvrik without modification |
|
All traffic appears as Unattributed |
Agent ID attribute is unset or incorrect |
Set it to |
|
Some agents are missing |
Those requests do not carry |
Add the |
|
Reported total differs from OpenRouter |
The comparison periods differ, or ingestion is incomplete |
Compare identical periods and allow 24 hours for ingestion |
|
agentgateway sends no data |
The tracing block is not at the top level of config.yaml, or the environment values are not set |
Put |
|
agentgateway traffic appears as Unattributed |
Requests do not carry |
Add the agent headers to every request sent to the gateway |
|
agentgateway tool calls show 0 |
The |
Add |