Skip to main content

Module model

Module model 

Source
Expand description

Canonical utilities for parsing model identifiers.

Model IDs use the format "provider/model_name" (e.g., "openai/gpt-4o"). These functions provide a single source of truth for extracting the two components, replacing 15+ ad hoc .split('/') calls scattered across the workspace.

Functionsยง

model_name
Extract the model name (without provider prefix) from a model identifier.
provider_prefix
Extract the provider prefix from a model identifier.