dbt metricflow execution

I am using dbt-core, version 1.8.3. I have defined semantic model and metric. Is it possible to refer the metric in the dbt model like it is supported in dbt 1.4.x using metrics.calculate method?

Or metricflow allows just to generate the query alone and developer should copy the generated query to model?

select
header_btch_max metric_val
from {{ metrics.calculate(
metric(‘cnt_batch’)
,dimensions=[‘batch’]
) }}

‘metrics’ is undefined. This can happen when calling a macro that does not exist. Check for typos and/or install package dependencies with “dbt deps”.

“developer should copy the generated query to model?”
Of course depending on the exact use case, this should not be needed, you can use exports to materialize a saved_query.