{"_id":"@mlflow/vercel","_rev":"4-93c295f857a262a775fe1f06312fab06","name":"@mlflow/vercel","dist-tags":{"rc":"0.2.0-rc.1","latest":"0.4.0"},"versions":{"0.2.0-rc.0":{"name":"@mlflow/vercel","version":"0.2.0-rc.0","keywords":["mlflow","tracing","observability","opentelemetry","llm","vercel","ai-sdk","vercel-ai","javascript","typescript"],"author":{"url":"https://mlflow.org/","name":"MLflow"},"license":"Apache-2.0","_id":"@mlflow/vercel@0.2.0-rc.0","maintainers":[{"name":"yuki_watanabe","email":"yuki.watanabe@databricks.com"}],"homepage":"https://mlflow.org/","bugs":{"url":"https://github.com/mlflow/mlflow/issues"},"dist":{"shasum":"718944e780b48076a64ed8b736c729710433c796","tarball":"https://registry.npmjs.org/@mlflow/vercel/-/vercel-0.2.0-rc.0.tgz","fileCount":2,"integrity":"sha512-JrOGFpvs+V2RERU75KlN/xMuE5x+7GZlVh/fsraXlnanp2WTPKmxsGzlJVvj9o5/kWoeocvbcfqN1x88kDrUgg==","signatures":[{"sig":"MEUCIC/UXR6oYOuVh8kPa+6Pq6xgAZPguWBOhoN2g+CBg2V6AiEAmareYRQvbCNQGXYaHYxEMowNntLUy3aKNjtiM2cGaRg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5603},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18"},"gitHead":"aca3ebb37e830b2917a1422a864187bd52c51d56","scripts":{"lint":"eslint . --ext .ts --max-warnings 0","test":"jest","build":"tsc","format":"prettier --write .","lint:fix":"eslint . --ext .ts --fix","format:check":"prettier --check ."},"_npmUser":{"name":"yuki_watanabe","email":"yuki.watanabe@databricks.com"},"repository":{"url":"git+https://github.com/mlflow/mlflow.git","type":"git"},"_npmVersion":"9.8.0","description":"Vercel AI SDK integration for MLflow Tracing — SpanProcessor that translates AI SDK span attributes to MLflow format","directories":{},"_nodeVersion":"20.5.1","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.6.2","ts-jest":"^29.1.1","typescript":"^5.8.3","@opentelemetry/sdk-trace-base":"^2.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0","@opentelemetry/sdk-trace-base":">=1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/vercel_0.2.0-rc.0_1776069165227_0.6458544049352928","host":"s3://npm-registry-packages-npm-production"}},"0.2.0-rc.1":{"name":"@mlflow/vercel","version":"0.2.0-rc.1","keywords":["mlflow","tracing","observability","opentelemetry","llm","vercel","ai-sdk","vercel-ai","javascript","typescript"],"author":{"url":"https://mlflow.org/","name":"MLflow"},"license":"Apache-2.0","_id":"@mlflow/vercel@0.2.0-rc.1","maintainers":[{"name":"yuki_watanabe","email":"yuki.watanabe@databricks.com"}],"homepage":"https://mlflow.org/","bugs":{"url":"https://github.com/mlflow/mlflow/issues"},"dist":{"shasum":"85889e4eb2c1d18a1bc481812d1530b5016f30b8","tarball":"https://registry.npmjs.org/@mlflow/vercel/-/vercel-0.2.0-rc.1.tgz","fileCount":11,"integrity":"sha512-7HcQzR1OMmxv42m/11tnzAUYmS+ZDsfv0kei+MTRt5TEWBZxB/o0Y16e7JdD6vmDfpgW+CLhCwx07zzXj3GMKQ==","signatures":[{"sig":"MEQCIB8AOI2XmsATTgvWJWbkSpCk1O1seQv4n3h8kIchj6ljAiAelhzMvCisa5i2SamTvFxJpGnJpy6VMUjnn807V0esUQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20498},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18"},"gitHead":"db9142d7ac809da9da6c148e196d0170b6b665ae","scripts":{"lint":"eslint . --ext .ts --max-warnings 0","test":"jest","build":"tsc","format":"prettier --write .","lint:fix":"eslint . --ext .ts --fix","format:check":"prettier --check ."},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e1ead3e5-a14b-40a2-99a3-8c79013e6fd2"}},"repository":{"url":"git+https://github.com/mlflow/mlflow.git","type":"git"},"_npmVersion":"11.5.1","description":"Vercel AI SDK integration for MLflow Tracing — SpanProcessor that translates AI SDK span attributes to MLflow format","directories":{},"_nodeVersion":"22.22.2","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.6.2","ts-jest":"^29.1.1","typescript":"^5.8.3","@opentelemetry/sdk-trace-base":"^2.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0","@opentelemetry/sdk-trace-base":">=1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/vercel_0.2.0-rc.1_1776161999003_0.24917001481361511","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@mlflow/vercel","version":"0.3.0","keywords":["mlflow","tracing","observability","opentelemetry","llm","vercel","ai-sdk","vercel-ai","javascript","typescript"],"author":{"url":"https://mlflow.org/","name":"MLflow"},"license":"Apache-2.0","_id":"@mlflow/vercel@0.3.0","maintainers":[{"name":"yuki_watanabe","email":"yuki.watanabe@databricks.com"}],"homepage":"https://mlflow.org/","bugs":{"url":"https://github.com/mlflow/mlflow/issues"},"dist":{"shasum":"90b3d2ff498c9c98fe8437fc0398d8e8c84745fa","tarball":"https://registry.npmjs.org/@mlflow/vercel/-/vercel-0.3.0.tgz","fileCount":11,"integrity":"sha512-NdXH3lk1rkEBm4Sd3Yf+USdJ3c3wx3aSt46PXgi0W+uQBPWd7IJ65ck4O/jgjYvQdclDgLKVsUPuCWhnu8v+vA==","signatures":[{"sig":"MEUCIQCYv0wtEvmPw/+WutWsSehMzANxj8RHKtNqwksA7EZN7wIgCxPF4y6j/v2D9PrbqM1UzTj3TM7406+VbbJjz8fTjOM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20532},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18"},"gitHead":"9369186bc80eba725a1648c9a6b24dca666ac77a","scripts":{"lint":"eslint . --ext .ts --max-warnings 0","test":"jest","build":"tsc","format":"prettier --write .","lint:fix":"eslint . --ext .ts --fix","format:check":"prettier --check .","prepublishOnly":"npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e1ead3e5-a14b-40a2-99a3-8c79013e6fd2"}},"repository":{"url":"git+https://github.com/mlflow/mlflow.git","type":"git"},"_npmVersion":"11.5.1","description":"Vercel AI SDK integration for MLflow Tracing — SpanProcessor that translates AI SDK span attributes to MLflow format","directories":{},"_nodeVersion":"22.23.1","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.6.2","ts-jest":"^29.1.1","typescript":"^5.8.3","@opentelemetry/sdk-trace-base":"^2.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0","@opentelemetry/sdk-trace-base":">=1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/vercel_0.3.0_1783409797551_0.5504464254188994","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@mlflow/vercel","version":"0.4.0","description":"Vercel AI SDK integration for MLflow Tracing — SpanProcessor that translates AI SDK span attributes to MLflow format","repository":{"type":"git","url":"git+https://github.com/mlflow/mlflow.git"},"homepage":"https://mlflow.org/","author":{"name":"MLflow","url":"https://mlflow.org/"},"bugs":{"url":"https://github.com/mlflow/mlflow/issues"},"license":"Apache-2.0","keywords":["mlflow","tracing","observability","opentelemetry","llm","vercel","ai-sdk","vercel-ai","javascript","typescript"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","prepublishOnly":"npm run build","test":"jest","lint":"eslint . --ext .ts --max-warnings 0","lint:fix":"eslint . --ext .ts --fix","format":"prettier --write .","format:check":"prettier --check ."},"peerDependencies":{"@opentelemetry/api":">=1.0.0","@opentelemetry/sdk-trace-base":">=1.0.0"},"devDependencies":{"jest":"^29.6.2","ts-jest":"^29.1.1","typescript":"^5.8.3","@opentelemetry/sdk-trace-base":"^2.1.0"},"engines":{"node":">=18"},"_id":"@mlflow/vercel@0.4.0","gitHead":"50d4736d74453f4f58ca58a1b2748a1e3356a52c","_nodeVersion":"22.23.2","_npmVersion":"11.5.1","dist":{"integrity":"sha512-eo4Utgfgo+6w6/BrGdD35amC4DQCPvcT/T9W2Zc7bK04kK1yzF6TMcNPvbNw3iZ46u4t6o+wj5dLKD8paNuZiw==","shasum":"f4b97a10dfc1a866faf06a89e094eab6a0a208d1","tarball":"https://registry.npmjs.org/@mlflow/vercel/-/vercel-0.4.0.tgz","fileCount":11,"unpackedSize":20532,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIH1gcWWFnS4jHqphO2erCWxqvfeZvC4Asxdxw+eOxejcAiBVgGfadILw7L0ih8cs/YmOnYvmXKG7Bp6x45GBV6ILpw=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e1ead3e5-a14b-40a2-99a3-8c79013e6fd2"}},"directories":{},"maintainers":[{"name":"yuki_watanabe","email":"yuki.watanabe@databricks.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vercel_0.4.0_1787821146477_0.3592654836385136"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-13T08:32:45.068Z","modified":"2026-08-27T08:59:06.871Z","0.2.0-rc.0":"2026-04-13T08:32:45.384Z","0.2.0-rc.1":"2026-04-14T10:19:59.135Z","0.3.0":"2026-07-07T07:36:37.797Z","0.4.0":"2026-08-27T08:59:06.636Z"},"bugs":{"url":"https://github.com/mlflow/mlflow/issues"},"author":{"name":"MLflow","url":"https://mlflow.org/"},"license":"Apache-2.0","homepage":"https://mlflow.org/","keywords":["mlflow","tracing","observability","opentelemetry","llm","vercel","ai-sdk","vercel-ai","javascript","typescript"],"repository":{"type":"git","url":"git+https://github.com/mlflow/mlflow.git"},"description":"Vercel AI SDK integration for MLflow Tracing — SpanProcessor that translates AI SDK span attributes to MLflow format","maintainers":[{"name":"yuki_watanabe","email":"yuki.watanabe@databricks.com"}],"readme":"# MLflow Typescript SDK - Vercel AI\n\nSeamlessly integrate [MLflow Tracing](https://github.com/mlflow/mlflow/tree/main/libs/typescript) with [Vercel AI SDK](https://ai-sdk.dev/) to automatically trace your AI API calls.\n\n| Package              | NPM                                                                                                                               | Description                                         |\n| -------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |\n| [@mlflow/vercel](./) | [![npm package](https://img.shields.io/npm/v/%40mlflow%2Fvercel?style=flat-square)](https://www.npmjs.com/package/@mlflow/vercel) | Auto-instrumentation integration for Vercel AI SDK. |\n\n## Installation\n\n```bash\nnpm install @mlflow/vercel\n```\n\nThe package includes `@opentelemetry/api` and `@opentelemetry/sdk-trace-base` as peer dependencies. Depending on your package manager, you may need to install them separately.\n\n## Quickstart\n\nStart MLflow Tracking Server. If you have a local Python environment, you can run the following command:\n\n```bash\npip install mlflow\nmlflow server --port 5000\n```\n\nIf you don't have Python environment locally, MLflow also supports Docker deployment or managed services. See [Self-Hosting Guide](https://mlflow.org/docs/latest/self-hosting/index.html) for getting started.\n\nSet up the MLflow span processor and use the Vercel AI SDK with telemetry enabled:\n\n```typescript\nimport { MLflowSpanProcessor } from '@mlflow/vercel';\nimport { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-proto';\nimport { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';\nimport { generateText } from 'ai';\nimport { openai } from '@ai-sdk/openai';\n\nconst provider = new NodeTracerProvider({\n  spanProcessors: [\n    new MLflowSpanProcessor(\n      new OTLPTraceExporter({\n        url: 'http://localhost:5000/api/2.0/otel/v1/traces',\n        headers: {\n          'x-mlflow-experiment-id': '<your-experiment-id>',\n        },\n      }),\n    ),\n  ],\n});\nprovider.register();\n\nconst result = await generateText({\n  model: openai('gpt-5'),\n  prompt: \"What's the weather like in Seattle?\",\n  experimental_telemetry: { isEnabled: true },\n});\n```\n\n## Databricks\n\nTo send traces to a Databricks Unity Catalog table, set the OTLP exporter URL to `<DATABRICKS_HOST>/api/2.0/otel/v1/traces` and include the following headers:\n\n- `Authorization`: `Bearer <your-databricks-token>`\n- `X-Databricks-UC-Table-Name`: `<catalog>.<schema>.<table_prefix>_otel_spans`\n\nNote: Do not set the `x-mlflow-experiment-id` header when using Databricks.\n\n## Attribute Translation\n\nThe Vercel AI SDK emits spans with `ai.*` attributes. `MLflowSpanProcessor` translates these into MLflow's format:\n\n| Vercel AI SDK                                | MLflow                                     | Description                      |\n| -------------------------------------------- | ------------------------------------------ | -------------------------------- |\n| `ai.operationId`                             | `mlflow.spanType`                          | Span type (LLM, TOOL, EMBEDDING) |\n| `ai.prompt.*` / `ai.response.*`              | `mlflow.spanInputs` / `mlflow.spanOutputs` | Structured request/response data |\n| `ai.model.id`                                | `mlflow.llm.model`                         | Model name                       |\n| `ai.model.provider`                          | `mlflow.llm.provider`                      | Provider name                    |\n| `ai.usage.promptTokens` / `completionTokens` | `mlflow.chat.tokenUsage`                   | Token usage for cost tracking    |\n| (chat spans)                                 | `mlflow.message.format` = `\"vercel_ai\"`    | Enables chat UI rendering        |\n\n## Documentation\n\n- [MLflow Tracing](https://mlflow.org/docs/latest/llms/tracing/index.html)\n- [Vercel AI SDK Telemetry](https://ai-sdk.dev/docs/ai-sdk-core/telemetry)\n- [Databricks OTEL Collector](https://docs.databricks.com/aws/en/mlflow3/genai/tracing/trace-unity-catalog)\n\n## License\n\nThis project is licensed under the [Apache License 2.0](https://github.com/mlflow/mlflow/blob/master/LICENSE.txt).\n","readmeFilename":"README.md"}