Skip to main content
AI SDK 7 replaces experimental OpenTelemetry options with stable telemetry integrations and runtime context. The Context Company supports both formats, so you can deploy server-side ingestion support before migrating application code.

Compatibility

Migration steps

  1. Upgrade Node.js to version 22 or newer.
  2. Upgrade ai, provider packages, and React bindings to their AI SDK 7-compatible major versions.
  3. Replace @contextcompany/otel with @contextcompany/ai-sdk in the application.
  4. Replace registerOTelTCC with registerTCC.
  5. Move experimental_telemetry.metadata into tccTelemetry, preserving every reserved tcc.* key.
  6. Run a multi-step tool call and confirm its run, model steps, tool calls, usage, and metadata in The Context Company.

Registration

Per-call metadata

Common AI SDK 7 API changes

  • Use instructions instead of system when following the current text-generation API.
  • Use isStepCount instead of stepCountIs.
  • Use stable telemetry instead of experimental_telemetry.
  • Put application tracking data in the tccTelemetry metadata object.
  • Keep the tcc.* prefix on every TCC-specific metadata key.
tccTelemetry handles runtime-context inclusion automatically. Application-specific metadata such as environment remains unprefixed. The tcc.* namespace is reserved for supported TCC metadata keys.

Rollback

The ingest service accepts legacy and AI SDK 7 spans simultaneously. If the application migration needs to be rolled back, restore the AI SDK 5 or 6 application dependencies and continue using @contextcompany/otel. No stored-data migration is required.