Function: toModelDisplayName()
toModelDisplayName(
name,provided?):string
Derive a human-readable display name for a serving endpoint.
When provided is a non-blank string (a Databricks display-name tag or
external-model name), it wins verbatim (trimmed). Otherwise the endpoint
name is humanized: leading vendor prefixes (databricks, the
system.ai namespace, dbx) are dropped, then each -/_/.-separated
segment is title-cased (acronyms like GPT/GTE/BGE uppercased, “AI” kept),
runs of purely-numeric segments are joined into a dotted version
(...-4-6 -> “4.6”), and a size unit glued to its number (120b ->
“120B”). Falls back to the trimmed raw name if stripping leaves nothing.
Parameters
Section titled “Parameters”string
provided?
Section titled “provided?”string | null
Returns
Section titled “Returns”string
Example
Section titled “Example”toModelDisplayName("databricks-claude-sonnet-4-6") // "Claude Sonnet 4.6"toModelDisplayName("databricks-gpt-oss-120b") // "GPT OSS 120B"toModelDisplayName("system.ai.bge_large_en") // "BGE Large En"toModelDisplayName("x", "Claude 4.6 (Preview)") // provided wins