How It Works
Auto-instrumentation#
When you call delimiter.init(), the SDK patches Node's HTTP layer — globalThis.fetch, http.request, and https.request. This is the same technique used by Datadog, Sentry, and New Relic.
No wrapping. No per-provider setup. One call at startup and you're done.
Request interception#
On every outbound HTTP request, the SDK checks the destination URL against a list of known AI provider domains:
| Domain | Provider |
| --- | --- |
| api.openai.com | OpenAI |
| api.anthropic.com | Anthropic |
| generativelanguage.googleapis.com | Google Gemini |
| api.mistral.ai | Mistral |
| api.cohere.com | Cohere |
| api.groq.com | Groq |
| api.deepseek.com | DeepSeek |
| api.x.ai | xAI |
| api.perplexity.ai | Perplexity |
| api.together.xyz | Together AI |
| api.fireworks.ai | Fireworks AI |
| api.replicate.com | Replicate |
| *.openai.azure.com | Azure OpenAI |
| bedrock-runtime.*.amazonaws.com | Amazon Bedrock |
| openrouter.ai | OpenRouter |
If the URL doesn't match a known provider, the request passes through untouched — zero overhead. New providers are added with every SDK update.
Response header extraction#
When a response comes back from a known provider, the SDK reads the rate-limit headers:
- OpenAI:
x-ratelimit-limit-requests,x-ratelimit-remaining-requests,x-ratelimit-limit-tokens,x-ratelimit-remaining-tokens,x-ratelimit-reset-requests,x-ratelimit-reset-tokens - Anthropic:
anthropic-ratelimit-requests-limit,anthropic-ratelimit-requests-remaining,anthropic-ratelimit-tokens-limit,anthropic-ratelimit-tokens-remaining,anthropic-ratelimit-requests-reset,anthropic-ratelimit-tokens-reset
Async reporting#
A fire-and-forget POST sends the parsed headers to the Delimiter API. This never blocks your application — the original response is returned to your code immediately.
If the report fails to send, it's silently dropped. Your application is never affected.
Why auto-instrumentation?#
- Zero maintenance. Add Anthropic 6 months later — don't touch Delimiter. The dashboard just shows it.
- Framework agnostic. Works with the official SDKs, LangChain, Vercel AI SDK, LiteLLM, or raw
fetch()calls. - No peer dependencies. The SDK doesn't need to know about
openaior@anthropic-ai/sdkpackages. It works at the HTTP layer. - Drop-in. Two lines of code in your entry point. Deploy and forget.
