Hover tooltips for barchart broken in bokeh 3.8

I had a vbar_stack plot. The plot was written originally in Bokeh 3.6.
We could hover the bar and a tooltip was displayed with the numeric value of the bar. See attached file Bokeh_3.6_barchart_tooltip_success.png

I have updated my system with Bokeh 3.8 and the numeric value on the tooltip is replaced with the string “@name of the bar”. See attached file Bokeh_3.8_barchart_tooltip_error.png

Below is a minimal reproducible example to observe the above behaviour:

from bokeh.plotting import figure, show
from bokeh.models import HoverTool
from bokeh.models import ColumnDataSource
from bokeh.palettes import TolRainbow



stages = ['Stage1', 'Stage2', 'Stage3']
costs = ['cFix', 'cVar', 'cFuel', 'cNSE', 'cStart', 'cUnmetRsv', 'cNetworkExp', 'cUnmetPolicyPenalty', 'cCO2']
data = {
    'cFix': [1383746169.2278163, 884296586.3347533, 284149474.8879363, 215300108.00512677],
    'cVar': [44611648.62465662, 33572367.644309215, 7743604.844316075, 3295676.136031328],
    'cFuel': [85095286.72358733, 65296581.45350175, 18075138.22088323, 1723567.0492023495],
    'cNSE': [12.333818866721018, 1.9328193280526111, 2.5462439425594803, 7.854755596108927],
    'cStart': [6640245.009495095, 4359184.440677883, 1900959.92808766, 380100.640729552],
    'cUnmetRsv': [0.0, 0.0, 0.0, 0.0],
    'cNetworkExp': [18.71842377159223, 11.785378296213011, 0.9945214063612848, 5.938524069017936],
    'cUnmetPolicyPenalty': [0.0, 0.0, 0.0, 0.0],
    'cCO2': [0.0, 0.0, 0.0, 0.0],
    'index': ['Overall', 'Stage1', 'Stage2', 'Stage3'],
    'stages': ['Overall', 'Stage1', 'Stage2', 'Stage3']
}

source = ColumnDataSource(data)
p1 = figure(
    x_range=['Overall'] + stages,
    height=500,
    width=2000,
)

p1.title.text = 'Overall costs'
p1.outline_line_color = None
p1.y_range.start = 0
p1.x_range.range_padding = 0.1
p1.xgrid.grid_line_color = None
p1.axis.minor_tick_line_color = None
p1.yaxis.axis_label = '$'
p1.yaxis.axis_label_text_font_style= 'bold'
p1.xaxis.axis_label = 'Stages'
p1.xaxis.axis_label_text_font_style= 'bold'

renderers = p1.vbar_stack(
    costs,
    x='stages',
    width=0.9,
    color=TolRainbow[max(min(TolRainbow),len(costs))],
    source=source,
    legend_label=costs
)

hover_tool = HoverTool(
    tooltips='<style>' \
        '.bk-tooltip>div:not(:first-child) {display:none;}' \
        '</style>' \

        'Stage: <b>@stages{safe}</b> <br>' \
        '$name cost: <b>@$name</b> <br>',
    renderers=renderers
)
p1.add_tools(hover_tool)
show(p1)

This was already reported and fixed on GitHub, and will be part of an upcoming release.

Backports for 3.8.1 by mattpap · Pull Request #14704 · bokeh/bokeh · GitHub PR is up I’d exepct a fix release in the next few days.

Edit: 3.8.1 is published