registry  /  @openrouter/sdk  /  0.13.34

@openrouter/sdk@0.13.34

The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 400+ language models through a unified API.

AI Security Review

scanned 2h ago · by lpm-firewall-ai

No confirmed malicious attack surface. The only install-time behavior is a package-aligned stale type check against OpenRouter, and runtime network access is expected SDK API behavior.

Static reason
One or more suspicious static signals were detected.
Trigger
npm install postinstall or user-invoked SDK methods
Impact
Expected API requests; no credential harvesting, persistence, destructive action, or foreign agent config mutation found
Mechanism
OpenRouter API client and stale model type check
Rationale
Static inspection found a generated OpenRouter SDK with an install-time model freshness check that contacts an OpenRouter endpoint and does not write files or exfiltrate local data. Suspicious scanner signals are explained by expected SDK networking, OpenRouter-specific environment variables, and benign lifecycle scripts.
Evidence
package.jsonscripts/check-types.jsesm/index.jsesm/lib/config.jsesm/lib/env.jsesm/lib/http.jsesm/lib/sdks.jsesm/funcs/chatSend.jsesm/funcs/filesUpload.jssrc/types/models.ts
Network endpoints2
openrouter.ai/api/v1/modelsopenrouter.ai/api/v1

Decision evidence

public snapshot
AI called this Clean at 92.0% confidence as Benign with low false-positive risk.
Evidence for block
  • package.json defines postinstall: node scripts/check-types.js || true
  • scripts/check-types.js performs install-time fetch to https://openrouter.ai/api/v1/models unless CI or OPENROUTER_SKIP_TYPE_CHECK is set
Evidence against
  • scripts/check-types.js only reads src/types/models.ts, hashes model IDs, and prints a stale-types warning
  • No child_process, shell execution, eval, native binary, or filesystem writes found in inspected JS/TS sources
  • Runtime network calls are SDK API methods to configured OpenRouter base URL in esm/lib/config.js
  • Environment reads are OpenRouter-specific API/debug/header settings in esm/lib/env.js
  • esm/index.js only re-exports generated SDK modules
Behavioral surface
Source
CryptoEnvironmentVarsFilesystemNetwork
Supply chain
HighEntropyStringsTelemetryUrlStrings
ManifestNo manifest risk signals triggered.
scanned 826 file(s), 1.72 MB of source, external domains: api.braintrust.dev, api.ramp.com, api.smith.langchain.com, api.us5.datadoghq.com, openrouter.ai, otlp-gateway-prod-us-west-0.grafana.net, otlp.arize.com, trace.wandb.ai, us.cloud.langfuse.com, us.i.posthog.com

Source & flagged code

2 flagged · loading source
package.jsonView file
scripts.postinstall = node scripts/check-types.js || true
High
Install Time Lifecycle Scripts

Package defines install-time lifecycle scripts.

package.jsonView on unpkg
scripts.postinstall = node scripts/check-types.js || true
Medium
Ambiguous Install Lifecycle Script

Install-time lifecycle script is not statically allowlisted and needs review.

package.jsonView on unpkg

Findings

1 High3 Medium6 Low
HighInstall Time Lifecycle Scriptspackage.json
MediumAmbiguous Install Lifecycle Scriptpackage.json
MediumNetwork
MediumEnvironment Vars
LowNon Install Lifecycle Scripts
LowScripts Present
LowFilesystem
LowHigh Entropy Strings
LowTelemetry
LowUrl Strings