langchain/callbacks/openai_info.py/standardize_model_name
def standardize_model_name(
    model_name: str,
    is_completion: bool = False,
) -> str:
    model_name = model_name.lower()
    if "ft-" in model_name:
        return model_name.split(":")[0] + "-finetuned"
    elif is_completion and model_name.startswith("gpt-4"):
        return model_name + "-completion"
    else:
        return model_name