@juspay/neurolink 13.8.29 → 13.8.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2407,7 +2407,7 @@
2407
2407
  {"objectID":"6653ad7d7db43c9524583b9dadbf6368e9f153396ef5489c318c688f0fe95d24","title":"9. Streaming response shows as raw bytes","url":"/docs/features/claude-proxy-troubleshooting#9-streaming-response-shows-as-raw-bytes","content":"Cause: An earlier version of the Hono handler re-encoded the ReadableStream as a byte array instead of passing it through as a raw SSE stream.\n\nFix: This is fixed in the current version. The proxy returns a raw Response object for streaming requests, preserving the SSE format. If you encounter this, rebuild:","hierarchy":{"lvl0":"Features","lvl1":"Claude Proxy Troubleshooting","lvl2":"9. Streaming response shows as raw bytes","lvl3":""}},
2408
2408
  {"objectID":"c11829787189c82bd28cebb8f491b004b2778739e15705556ffaa098ed95dd7a","title":"10. Tools not working / \"0 chunks\"","url":"/docs/features/claude-proxy-troubleshooting#10-tools-not-working-0-chunks","content":"Cause: An earlier architecture had NeuroLink merging 68+ MCP tools with the client's tools, causing tool name conflicts and prefixing issues. Tool definitions were being modified or dropped in the merge.\n\nFix: This is fixed in the current version. The proxy uses passthrough mode for Claude-to-Claude requests: the raw request body is forwarded directly to Anthropic without any parsing, tool merging, or reconstruction. Tool definitions pass through exactly as Claude Code sent them.\n\nIf you are seeing tool issues:\nVerify the proxy is in passthrough mode (check logs for [proxy] POST /v1/messages -- passthrough requests do not show \"translation\" in the log).\nEnsure you are targeting a Claude model (passthrough is only for claude-* models).\nCheck that NEUROLINK_SKIP_MCP=true is set (prevents MCP tool injection).","hierarchy":{"lvl0":"Features","lvl1":"Claude Proxy Troubleshooting","lvl2":"10. Tools not working / \"0 chunks\"","lvl3":""}},
2409
2409
  {"objectID":"f5e4bc93c3248b16f666fc22de0855f134d5dde56d25280c5a7c2ae9abddc8ee","title":"11. Account not rotating on 429","url":"/docs/features/claude-proxy-troubleshooting#11-account-not-rotating-on-429","content":"Cause: The proxy uses fill-first routing by design. It keeps sending requests to one account until that account is rate-limited, then switches to the next.\n\nThis is expected behavior. Fill-first is optimal for Anthropic because:\nAnthropic's prompt caching is tied to the account/session. Spreading requests across accounts reduces cache hit rates.\nFill-first maximizes the benefit of each account's rate-limit window before moving on.\n\nOn a 429, the proxy applies exponential backoff to the current account (1s, 2s, 4s, 8s, ... up to 10 minutes) and immediately tries the next non-cooling account.\n\nTo verify rotation is working:","hierarchy":{"lvl0":"Features","lvl1":"Claude Proxy Troubleshooting","lvl2":"11. Account not rotating on 429","lvl3":""}},
2410
- {"objectID":"a344f10565b8cb427dd5b903be65d7445973de5f1fbfdc7eeb523cae2a8b673f","title":"12. \"400 invalid_image_reference\" when sending an image","url":"/docs/features/claude-proxy-troubleshooting#12-400-invalid_image_reference-when-sending-an-image","content":"Cause: A request to a translated route (/v1/chat/completions, Gemini generateContent, or /v1/messages routed to a non-Anthropic provider) named its image as a local file path, an http:// URL or another scheme, or (Gemini) sent raw base64 in inlineData.data without an image/<subtype> mimeType, or with a length or = padding that is not valid base64. The proxy resolves image references before the SDK sees them and accepts only data: URIs and public https:// URLs. The answer is identical whether or not the file exists, and it never echoes the path.\n\nFix: Send the image inline as a data: URI (a Claude base64 source is converted for you), or host it at a public https:// URL that answers without a redirect. A Gemini client may send inlineData.data as raw base64 (standard or URL-safe) next to a mimeType such as image/png: the proxy converts it to a data: URI. If that request gets this answer, check inlineData.mimeType: it must be an image/<subtype> type with no space, comma or semicolon, and audio, PDF and untyped parts are not translated. Then check data itself: a length one character over a multiple of four, or = padding that does not match the length, is refused rather than forwarded. image_url_unfetchable means an https:// URL was refused (a private or non-public address, a redirect, an error status, or larger than the size limit while downloading); image_input_too_large means more than 20 images, a data: image over 50 MB, or data: images together over 100 MB. See Image references on translated requests.","hierarchy":{"lvl0":"Features","lvl1":"Claude Proxy Troubleshooting","lvl2":"12. \"400 invalid_image_reference\" when sending an image","lvl3":""}},
2410
+ {"objectID":"bf5a33e57595f9a2e92da78a456ee2cdb2da25664669413c618d314b1e3fa159","title":"12. \"400 invalid_image_reference\" or \"invalid_image_data\" when sending an image","url":"/docs/features/claude-proxy-troubleshooting#12-400-invalid_image_reference-or-invalid_image_data-when-sending-an-image","content":"Cause: A request to a translated route (/v1/chat/completions, Gemini generateContent, or /v1/messages routed to a non-Anthropic provider) was refused locally, before any provider was contacted, for one of two reasons.\ninvalid_image_reference: the image was named as a local file path, an http:// URL, an empty URL or another scheme, or (Gemini) raw base64 in inlineData.data was sent without an image/<subtype> mimeType, or with a length or = padding that is not valid base64. The proxy resolves image references before the SDK sees them. It accepts data: URIs and public https:// URLs, plus a Claude base64 source and Gemini raw base64 with an image/<subtype> mimeType, both of which it converts to a data: URI first. The answer is identical whether or not the file exists, and it never echoes the path.\ninvalid_image_data: the reference was acceptable, but the bytes behind it are not a recognised image. The proxy decodes every data: image (and every download) and reads its file signature; it does not trust the declared type. Text, a path, a page of HTML, a PDF, SVG, a truncated payload, an empty one (a data: URI with nothing after the comma, a Claude base64 source or a Gemini inlineData of an image type whose data is empty or absent), and a data: URI that is not ;base64 all land here. An empty slot is refused, never dropped: the request is not sent on without the picture. A Gemini inlineData.data that is a path made only of base64 characters (/var/tmp/photo) is the usual surprise: it is taken for base64, decodes to text, and is refused as data instead of being forwarded for the provider to fail on.\n\nFix: Send the image inline as a data: URI (a Claude base64 source is converted for you), or host it at a public https:// URL that answers without a redirect. A Gemini client may send inlineData.data as raw base64 (standard or URL-safe) next to a mimeType such as image/png: the proxy converts it to a data: URI.","hierarchy":{"lvl0":"Features","lvl1":"Claude Proxy Troubleshooting","lvl2":"12. \"400 invalid_image_reference\" or \"invalid_image_data\" when sending an image","lvl3":""}},
2411
2411
  {"objectID":"f3a39e51eb140c1d4a2d4a3ca65428fa316193a4e5e8fa94ff94167e1c46fff2","title":"Enable debug logging","url":"/docs/features/claude-proxy-troubleshooting#enable-debug-logging","content":"This outputs detailed information for every request:","hierarchy":{"lvl0":"Features","lvl1":"Claude Proxy Troubleshooting","lvl2":"Enable debug logging","lvl3":""}},
2412
2412
  {"objectID":"787ea2a89999f69958b0dd99b8ae0410812df77cd2198c4e2b3d056c2147cdcd","title":"Check request logs","url":"/docs/features/claude-proxy-troubleshooting#check-request-logs","content":"The proxy writes structured JSONL logs to ~/.neurolink/logs/:\n\nEach log entry includes: timestamp, request ID, method, path, model, account label, response status, response time (ms), token usage, and OTel correlation fields (traceId, spanId).","hierarchy":{"lvl0":"Features","lvl1":"Claude Proxy Troubleshooting","lvl2":"Check request logs","lvl3":""}},
2413
2413
  {"objectID":"1df2cf3c6943377703033901df111cb673599219d7af3451c0e1b03cc7258d60","title":"Correlate logs with traces","url":"/docs/features/claude-proxy-troubleshooting#correlate-logs-with-traces","content":"When OTEL_EXPORTER_OTLP_ENDPOINT is set, every request log entry includes traceId and spanId fields. Use these to find the corresponding trace in your observability backend (Jaeger, Grafana Tempo, OpenObserve):","hierarchy":{"lvl0":"Features","lvl1":"Claude Proxy Troubleshooting","lvl2":"Correlate logs with traces","lvl3":""}},
@@ -2475,7 +2475,7 @@
2475
2475
  {"objectID":"7a743b6bb13366c925cd238d4853826a08f0b161659bcb0575d5b2e83709a2e5","title":"429 Rate Limit","url":"/docs/features/claude-proxy#429-rate-limit","content":"Treat top-level anthropic-ratelimit-unified-status: rejected as authoritative, even if sub-windows still say allowed.\nPrefer the rejected 5-hour or 7-day reset and otherwise use Retry-After.\nPersist the cooldown and rotate immediately for authoritative exhaustion.\nReturn the earliest recovery timestamp without another upstream request when all accounts are cooling.","hierarchy":{"lvl0":"Features","lvl1":"Claude Proxy","lvl2":"429 Rate Limit","lvl3":""}},
2476
2476
  {"objectID":"1522c22c8467bae6a5a51e9e4c4dca5792a7b45c457b0628ef5536d068d642b3","title":"401/402/403 Authentication Errors","url":"/docs/features/claude-proxy#401402403-authentication-errors","content":"OAuth accounts with refresh token: Serialize refresh, persist the new rotating token, and retry. A rejected refresh credential disables the account until re-authentication; transient refresh infrastructure errors cool and rotate.\nOAuth accounts without refresh token: Disable until re-authentication and rotate.\nAPI key accounts: Rotate after authentication failure.","hierarchy":{"lvl0":"Features","lvl1":"Claude Proxy","lvl2":"401/402/403 Authentication Errors","lvl3":""}},
2477
2477
  {"objectID":"b8f1c40c30e2fe7c3e03ca8b9857986dbce8dc17c382f69e1575e3c9b8e22c11","title":"400/422 Request Shape Error","url":"/docs/features/claude-proxy#400422-request-shape-error","content":"Detected via HTTP 422 status or invalid_request_error error type in the response body.\nNo retry or failover. These are client-side errors (malformed request, invalid parameters).\nReturn the error body directly to Claude Code.","hierarchy":{"lvl0":"Features","lvl1":"Claude Proxy","lvl2":"400/422 Request Shape Error","lvl3":""}},
2478
- {"objectID":"afa3c85f9ffa8a82a4379702baa0f7270668e8c8cd1792431947aadd4e3ed0d1","title":"400 Refused Image Reference","url":"/docs/features/claude-proxy#400-refused-image-reference","content":"A translated request (OpenAI, Gemini, or Claude routed to another provider) named an image the proxy will not resolve: a local path, an http:// URL, another scheme, an https:// URL that could not be fetched safely, or (Gemini) raw base64 whose mimeType is not an image/<subtype> type.\nAnswered locally before any provider is contacted, with code invalid_image_reference, image_url_unfetchable or image_input_too_large. No retry and no fallback.\nSee Image references on translated requests.","hierarchy":{"lvl0":"Features","lvl1":"Claude Proxy","lvl2":"400 Refused Image Reference","lvl3":""}},
2478
+ {"objectID":"afa3c85f9ffa8a82a4379702baa0f7270668e8c8cd1792431947aadd4e3ed0d1","title":"400 Refused Image Reference","url":"/docs/features/claude-proxy#400-refused-image-reference","content":"A translated request (OpenAI, Gemini, or Claude routed to another provider) named an image the proxy will not resolve: a local path, an http:// URL, another scheme, an https:// URL that could not be fetched safely, an empty URL, or (Gemini) raw base64 whose mimeType is not an image/<subtype> type; or it carried image bytes that are not a recognised image: text, a path, a page, SVG, an empty (or absent) or truncated payload.\nAnswered locally before any provider is contacted, with code invalid_image_reference, invalid_image_data, image_url_unfetchable or image_input_too_large. No retry and no fallback.\nSee Image references on translated requests.","hierarchy":{"lvl0":"Features","lvl1":"Claude Proxy","lvl2":"400 Refused Image Reference","lvl3":""}},
2479
2479
  {"objectID":"e1f4a02d90c3d80f462b4ab9d516b9be9e53d7f954539837078c9e19088d01fb","title":"404 Not Found","url":"/docs/features/claude-proxy#404-not-found","content":"Typically means the model is not available for this account.\nNo cooldown applied.\nReturn the error body immediately to the client (no failover to next account).","hierarchy":{"lvl0":"Features","lvl1":"Claude Proxy","lvl2":"404 Not Found","lvl3":""}},
2480
2480
  {"objectID":"8ea0d60b8e33eeebfb825eb12ad9fcd0cdad610ee262ac5486db5d7fa3b8406b","title":"5xx / Transient Server Error","url":"/docs/features/claude-proxy#5xx-transient-server-error","content":"Transient errors (408, 500, 502, 503, 504, and Cloudflare 520-526/529).\nAlso matches 400 responses with api_error or overloaded_error types that wrap transient HTML content (e.g., Cloudflare error pages).\nApply bounded same-account retries, then rotate to the next account.","hierarchy":{"lvl0":"Features","lvl1":"Claude Proxy","lvl2":"5xx / Transient Server Error","lvl3":""}},
2481
2481
  {"objectID":"195dae3c0ea28fdcfeb0fbf39c456fd580652b07fa5f2ce81b341d4279621cf8","title":"All Accounts Exhausted","url":"/docs/features/claude-proxy#all-accounts-exhausted","content":"When every account is in a cooling state:\nWalk the fallback chain (if configured).\nEach fallback uses NeuroLink's stream() pipeline with the specified provider/model.\nIf all fallbacks also fail, return a 429 with Retry-After set to the earliest account recovery time.","hierarchy":{"lvl0":"Features","lvl1":"Claude Proxy","lvl2":"All Accounts Exhausted","lvl3":""}},
@@ -2487,7 +2487,9 @@
2487
2487
  {"objectID":"08067260c522d0f7b196b054e71ab3a4c733c6cedc590cfc5ff95f96e5d5d527","title":"Passthrough mode (Claude to Claude)","url":"/docs/features/claude-proxy#passthrough-mode-claude-to-claude","content":"When the target provider is anthropic (the default for any claude-* model), the proxy operates in passthrough mode:\nLoad allowed, enabled TokenStore accounts. Consider legacy or environment credentials only when no Anthropic TokenStore entries exist and the source is allowed.\nSelect the first non-cooling account according to the active routing strategy. With the default fill-first strategy, this is always the current primary account until it cools down.\nAuto-refresh the token if expiring within 5 minutes, sharing one in-flight refresh for concurrent requests.\nForward the raw request body via plain fetch() to https://api.anthropic.com/v1/messages?beta=true.\nSet authentication headers (Authorization: Bearer for OAuth, x-api-key for API keys).\nForward client headers as-is, preserving Claude Code's own request shape, then merge in required OAuth betas and trace headers when absent. The proxy extracts incoming traceparent and x-neurolink-* headers and injects outbound trace context plus x-claude-code-session-id when needed.\nFor streaming: verify the first chunk (bootstrap retry), then forward the stream. For non-streaming: return JSON.\n\nThis mode preserves the exact request format that Claude Code expects, including thinking blocks, cache control headers, and multi-turn tool use conversations. Rate-limit headers from Anthropic are passed through to the client — see Limit response headers below.","hierarchy":{"lvl0":"Features","lvl1":"Claude Proxy","lvl2":"Passthrough mode (Claude to Claude)","lvl3":""}},
2488
2488
  {"objectID":"fbc67516d545a8892da4fcf8e8d8f06fe29e480e22303b430eec8a70262aafa6","title":"Limit response headers","url":"/docs/features/claude-proxy#limit-response-headers","content":"Every proxy response — streaming, non-streaming, and errors including 429 — carries the account's limit state. There are two layers.\n\nVerbatim passthrough. Anthropic's own anthropic-ratelimit-* headers and retry-after are forwarded unchanged. This is deliberate: a proxied response looks identical to a direct one, so a client needs only a single parser for both. Which family is present depends on the serving account:\n\n| Account type | Headers | Semantics |\n| -------------------- | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |\n| OAuth / subscription | anthropic-ratelimit-unified-5h-*, -7d-*, -status, -overage-status | Utilization (0.0-1.0 of capacity used) plus a reset epoch. Anthropic publishes no absolute remaining count for subscription windows. |\n| API key | anthropic-ratelimit-requests-remaining/-limit, anthropic-ratelimit-tokens-remaining/-limit | Absolute remaining counts.","hierarchy":{"lvl0":"Features","lvl1":"Claude Proxy","lvl2":"Limit response headers","lvl3":""}},
2489
2489
  {"objectID":"dc6518f4c6b67f9a5231d413df258d79141e42dcc772f807732d7627f3502931","title":"Translation mode (Claude to other provider)","url":"/docs/features/claude-proxy#translation-mode-claude-to-other-provider","content":"When model routing directs to a non-Anthropic provider:\nParse the Claude request using parseClaudeRequest() -- extracts prompt, system prompt, images, tools, thinking config, and conversation history. The thinking type field is handled adaptively: both \"enabled\" (fixed budget) and \"adaptive\" (auto budget, mapped to thinkingLevel: \"medium\") are supported.\nCall neurolink.stream() with the target provider and model. Tools and conversation messages from the original request are passed through (not disabled).\nFor streaming: use ClaudeStreamSerializer to emit Claude-compatible SSE events (message_start, content_block_start, content_block_delta, content_block_stop, message_delta, message_stop).\nFor non-streaming: collect all text from the stream and call serializeClaudeResponse() to build a Claude Messages API response.\n\nIf the translated response model differs from the requested model, the proxy records that as a model-substitution metric (proxy_model_substitution_total) and adds the requested vs actual model attributes to the trace.","hierarchy":{"lvl0":"Features","lvl1":"Claude Proxy","lvl2":"Translation mode (Claude to other provider)","lvl3":""}},
2490
- {"objectID":"230e1aa96cd18fcbcdb4072e0aa5815cc298b7e55dcdf7e805181551efa5c413","title":"Image references on translated requests","url":"/docs/features/claude-proxy#image-references-on-translated-requests","content":"Translation mode serves three request formats, and each carries images in its own slot:\n\n| Format | Endpoint | Image slot |\n| ------ | ----------------------------------------------------------------------- | --------------------------------------------------------- |\n| OpenAI | POST /v1/chat/completions | image_url.url of the latest user turn |\n| Gemini | POST /v1beta/models/<model>:generateContent, :streamGenerateContent | inlineData of the latest user turn (data, mimeType) |\n| Claude | POST /v1/messages (routed or falling back to another provider) | source.url of an image block (source.type: \"url\") |\n\nThe SDK resolves an image string by itself (an http(s) URL is fetched, anything else naming an existing file is read from disk), which is right for a program naming its own files and wrong for a request that arrived over a socket. So the proxy resolves every reference first and hands the SDK nothing but bytes it vetted:\n\n| Reference | What the proxy does |\n| ----------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| data: URI | Accepted and passed through unchanged. Its length counts against the limits below.","hierarchy":{"lvl0":"Features","lvl1":"Claude Proxy","lvl2":"Image references on translated requests","lvl3":""}},
2490
+ {"objectID":"230e1aa96cd18fcbcdb4072e0aa5815cc298b7e55dcdf7e805181551efa5c413","title":"Image references on translated requests","url":"/docs/features/claude-proxy#image-references-on-translated-requests","content":"Translation mode serves three request formats, and each carries images in its own slot:\n\n| Format | Endpoint | Image slot |\n| ------ | ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| OpenAI | POST /v1/chat/completions | image_url.url of the latest user turn |\n| Gemini | POST /v1beta/models/<model>:generateContent, :streamGenerateContent | inlineData of the final turn, only when that turn has the user role (data, mimeType); a request that ends with a model turn sends no images, and earlier turns contribute text only |\n| Claude | POST /v1/messages (routed or falling back to another provider) | source of an image block of the latest user turn (url, or base64 data and media_type) |\n\nThe SDK resolves an image string by itself (an http(s) URL is fetched, anything else naming an existing file is read from disk), which is right for a program naming its own files and wrong for a request that arrived over a socket.","hierarchy":{"lvl0":"Features","lvl1":"Claude Proxy","lvl2":"Image references on translated requests","lvl3":""}},
2491
+ {"objectID":"7851388e7ebf6105e257a055fc0e2f6cad27bb736d42dff4579f5b80ed235f2d","title":"What counts as an image, and the type it is sent with","url":"/docs/features/claude-proxy#what-counts-as-an-image-and-the-type-it-is-sent-with","content":"An inline image is judged by its bytes, never by what the client called it. The proxy decodes the payload strictly (an alphabet, length or = padding that no decoder takes is refused; the URL-safe alphabet and missing padding are rewritten to padded standard base64) and reads the file signature from its first bytes. A recognised image is forwarded as data:<detected type>;base64,<payload>, and the type comes from the bytes: a JPEG labelled image/png, image/jpg or even application/octet-stream reaches the provider as image/jpeg. A correction is logged at debug level, not warn. Header parameters (data:image/png;charset=utf-8;base64,...) are dropped.\n\n| Format | Types it is recognised as | What the provider receives |\n| ------------------------------- | -------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| PNG, JPEG, WebP, GIF | image/png, image/jpeg, image/webp, image/gif | The same bytes under the type they have. Every vision provider takes them as they are. |\n| HEIC, HEIF | image/heic, image/heif | A PNG when the SDK can convert the file, otherwise the original bytes under the detected type. Google takes HEIC and HEIF as they are, so for Google the second outcome works; every other provider refuses it.","hierarchy":{"lvl0":"Features","lvl1":"Claude Proxy","lvl2":"What counts as an image, and the type it is sent with","lvl3":""}},
2492
+ {"objectID":"e80f7928dacafcdcf655fe6d016bb531d3783beef2b7ddc418f837801d5c1368","title":"Empty image slots","url":"/docs/features/claude-proxy#empty-image-slots","content":"An image slot that carries nothing is still an image slot. The proxy refuses it instead of leaving it out, so a request that names a picture and supplies none is never sent upstream as though no picture had been attached. Each format spells \"no bytes\" its own way, and the answer depends on whether the slot is a payload or a URL:\n\n| Format | Empty image slot | Answer |\n| ------ | ------------------------------------------------------------------------------------ | ------------------------- |\n| OpenAI | image_url.url empty or absent | invalid_image_reference |\n| OpenAI | A data: URI with no payload (data:image/png;base64,) | invalid_image_data |\n| Claude | A base64 source whose data is empty or absent (with or without media_type) | invalid_image_data |\n| Claude | A url source whose url is empty or absent | invalid_image_reference |\n| Gemini | An inlineData with an image/<subtype> mimeType whose data is empty or absent | invalid_image_data |\n\nLeft out as before, because there is nothing to call an image by: a Gemini part with no inlineData, or one that declares no image/<subtype> type and carries no data; and a Claude image block whose source is neither base64 nor url. Only the images of the latest user turn are read, so an empty image in an earlier turn is not looked at.\n\nA refused reference answers 400 before anything is sent upstream or any stream starts, in the client's own error format, with one of these codes. The answer never echoes the reference, the data or any server path, and no fallback provider is tried because every one would refuse the same request.","hierarchy":{"lvl0":"Features","lvl1":"Claude Proxy","lvl2":"Empty image slots","lvl3":""}},
2491
2493
  {"objectID":"8a2ed66111704403b1e9a7c68b3214184ddc57877a63dc50ad6a25461d24c778","title":"OAuth cloaking","url":"/docs/features/claude-proxy#oauth-cloaking","content":"For OAuth-authenticated requests, the proxy applies transformations to make requests appear as standard Claude CLI traffic:\nUser-Agent: claude-cli/2.1.87 (external, sdk-cli)\nBeta headers: oauth-2025-04-20, claude-code-20250219, interleaved-thinking-2025-05-14, context-management-2025-06-27, prompt-caching-scope-2026-01-05, advanced-tool-use-2025-11-20, effort-2025-11-24\nIdentity headers: x-app: cli, anthropic-dangerous-direct-browser-access: true\nStainless SDK headers: x-stainless-runtime, x-stainless-lang, x-stainless-os, etc.\nBilling header: Injected into the system prompt as a deterministic Claude-Code-shaped billing block so prompt caching stays stable across requests\nUser ID: metadata.user_id is a JSON string with device_id, account_uuid, and session_id, cached per account/token seed and reused across requests\nTrace linkage: outbound requests include W3C trace headers and a stable x-claude-code-session-id when the proxy owns the request shape\n\nThe CloakingPipeline supports three modes:\n\n| Mode | Behavior |\n| -------- | ------------------------------------------------ |\n| auto | Apply cloaking only for OAuth accounts (default) |\n| always | Apply cloaking for all accounts |\n| never | Skip all cloaking |","hierarchy":{"lvl0":"Features","lvl1":"Claude Proxy","lvl2":"OAuth cloaking","lvl3":""}},
2492
2494
  {"objectID":"95865db245f6ad8bafa53c81d03c73e6b1486683b1d545cae1670fc33b6c049f","title":"Cloaking plugins","url":"/docs/features/claude-proxy#cloaking-plugins","content":"The pipeline runs plugins in order field order:\nHeaderScrubber -- Removes or modifies headers that reveal proxy usage\nSessionIdentity -- Generates Claude-Code-shaped identity metadata with stable device_id and account_uuid\nSystemPromptInjector -- Adds billing and agent block to system prompts\nTlsFingerprint -- TLS fingerprint matching\nWordObfuscator -- Obfuscates identifiable patterns","hierarchy":{"lvl0":"Features","lvl1":"Claude Proxy","lvl2":"Cloaking plugins","lvl3":""}},
2493
2495
  {"objectID":"8c04eba9378c5ec10f74e502b58467103bdefcde924c940884e1c6fe9d39d8c2","title":"Request logging","url":"/docs/features/claude-proxy#request-logging","content":"The proxy writes four complementary log families under ~/.neurolink/logs/:\nproxy-YYYY-MM-DD.jsonl -- final request summaries used for request counts, status trends, token totals, and dashboard panels\nproxy-attempts-YYYY-MM-DD.jsonl -- per-upstream-attempt diagnostics for retries, failover, and rate-limit debugging\nproxy-debug-YYYY-MM-DD.jsonl -- redacted body-capture index rows with phase, headers, file path, and response metadata\nbodies/YYYY-MM-DD/<request-id>/*.json.gz -- the corresponding redacted request and response body artifacts, stored compressed with 0o600 permissions\n\nFinal request summaries include request ID, method, path, model, account label, response status, response time, token usage, and traceId / spanId for trace correlation. Debug body captures are also emitted to OTLP logs as event.name=proxy.body_capture.\n\nRedaction: Sensitive headers and common JSON secret keys (authorization, access_token, refresh_token, api_key, etc.) are redacted before debug artifacts are written locally or emitted to OTLP.","hierarchy":{"lvl0":"Features","lvl1":"Claude Proxy","lvl2":"Request logging","lvl3":""}},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/neurolink",
3
- "version": "13.8.29",
3
+ "version": "13.8.31",
4
4
  "packageManager": "pnpm@10.34.9+sha512.f49b5a8ea0fdedb44bb3c0c1d6575092a53c2950d95b7ad15df11f17974877a2de3a01c07e934e9b28ce716e51c09a94962c7306d09be2e1e4b18a8c8762fd32",
5
5
  "description": "The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002/call) for routing, tool selection and context budgeting. MCP-native (4 transports), voice TTS/STT/realtime, RAG, agents, memory, compaction, 9 observability exporters. OpenAI · Anthropic · Gemini · Bedrock · Azure · Ollama · TypeSafe Jev and more.",
6
6
  "author": {