Is onFinish Fire-and-Forget?

I use the onFinish callback from getText, streamText, etc. to track token usage. However, it seems like the promise given isn’t actually awaited which results in no usage being tracked.

My question is if this is the intended use for onFinish especially in getText contexts or not? I ended up tracking the usage after getText which works fine further confirming my suspicions.

Before:

        const { output } = await generateText({
          model,
          messages: [
            {
              role: "system",
              content: Handlebars.compile(
                ai.healthInsurance.servicesExtraction.systemPrompt
              )({}),
            },
            {
              role: "user",
              content: [
                {
                  type: "file",
                  data: getPublicUrl(serviceOverview.url!),
                  mediaType: "application/pdf",
                },
              ],
            },
          ],
          output: Output.object({ schema: insuranceProviderSchema }),
          onFinish: trackUsage(
            user,
            payload,
            ai.healthInsurance.comparison.packageExtractionModelId
          ),
        });

After:

        const { output, usage, totalUsage, response } = await generateText({
          model,
          messages: [
            {
              role: "system",
              content: Handlebars.compile(
                ai.healthInsurance.servicesExtraction.systemPrompt
              )({}),
            },
            {
              role: "user",
              content: [
                {
                  type: "file",
                  data: getPublicUrl(serviceOverview.url!),
                  mediaType: "application/pdf",
                },
              ],
            },
          ],
          output: Output.object({ schema: insuranceProviderSchema }),
        });

        await trackUsage(
          user,
          payload,
          ai.healthInsurance.comparison.packageExtractionModelId,
          { relationTo: "insurance-providers", value: job.input.provider }
        )({ usage, totalUsage, response });