Skip to content

New Runtime API ​

The nodejs26 and python314 runtimes introduce a new handler API that removes the event and context wrapper objects. Handlers receive the raw HTTP framework objects directly, and function metadata is provided by an explicit sdk module. This document explains what changed and how the new API compares to the legacy one.

Handler Signature ​

In the legacy runtimes (nodejs22, nodejs24, python312), every handler received event and context arguments injected by the runtime. In the new runtimes, handlers work directly with the underlying HTTP framework.

SDK Module ​

In the legacy runtimes, function metadata was available through the context object and tracing through event.tracer. In the new runtimes, an explicit sdk module replaces both. For the full SDK reference, see Function's Specification.

CloudEvent Handling ​

In the legacy runtimes, CloudEvent attributes were spread as individual string keys on the event object (for example, event['ce-type']). In the new runtimes, getCloudEvent() / sdk.get_cloud_event() returns a standard CloudEvent object with typed properties.

Emitting CloudEvents ​

In the legacy runtimes, CloudEvents were emitted through event.emitCloudEvent(). In the new runtimes, emitCloudEvent is imported directly from the sdk module.

HTTP Responses ​

Environment Variables ​

The following environment variables were renamed in the new runtimes. The FUNC_MEMFILE_MAX variable also changed its unit from bytes to megabytes.

Old nameNew nameRuntimesNotes
FUNC_HANDLERHANDLER_FUNC_NAMEnodejs26, python314
MOD_NAMEHANDLER_MOD_NAMEnodejs26, python314
KUBELESS_INSTALL_VOLUMEHANDLER_PATHnodejs26, python314
REQ_MB_LIMITFUNC_BODY_MB_LIMITnodejs26
FUNC_MEMFILE_MAXFUNC_BODY_MB_LIMITpython314Unit changed from bytes to megabytes
KYMA_INTERNAL_LOGGER_ENABLEDSERVER_INTERNAL_LOGGERnodejs26, python314