Compatibility
Migration steps
- Upgrade Node.js to version 22 or newer.
- Upgrade
ai, provider packages, and React bindings to their AI SDK 7-compatible major versions. - Replace
@contextcompany/otelwith@contextcompany/ai-sdkin the application. - Replace
registerOTelTCCwithregisterTCC. - Move
experimental_telemetry.metadataintotccTelemetry, preserving every reservedtcc.*key. - 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
instructionsinstead ofsystemwhen following the current text-generation API. - Use
isStepCountinstead ofstepCountIs. - Use stable
telemetryinstead ofexperimental_telemetry. - Put application tracking data in the
tccTelemetrymetadata 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.