# Buggy code
def __class_getitem__(
    cls: Type[GenericModelT], params: Union[Type[Any], Tuple[Type[Any], ...]]
) -> Type[Any]:
    cached = _generic_types_cache.get((cls, params))
    if cached is not None:
        return cached
    if cls.__concrete__:
        raise TypeError(
            "Cannot parameterize a concrete instantiation of a generic model"
        )
    if not isinstance(params, tuple):
        params = (params,)
    if cls is GenericModel and any(isinstance(param, TypeVar) for param in params):  # type: ignore
        raise TypeError(
            "Type parameters should be placed on typing.Generic, not GenericModel"
        )
    if not hasattr(cls, "__parameters__"):
        raise TypeError(
            f"Type {cls.__name__} must inherit from typing.Generic before being parameterized"
        )

    check_parameters_count(cls, params)
    typevars_map: Dict[TypeVarType, Type[Any]] = dict(zip(cls.__parameters__, params))
    type_hints = get_type_hints(cls).items()
    instance_type_hints = {
        k: v for k, v in type_hints if getattr(v, "__origin__", None) is not ClassVar
    }
    concrete_type_hints: Dict[str, Type[Any]] = {
        k: resolve_type_hint(v, typevars_map) for k, v in instance_type_hints.items()
    }

    model_name = cls.__concrete_name__(params)
    validators = gather_all_validators(cls)
    fields = _build_generic_fields(cls.__fields__, concrete_type_hints, typevars_map)
    created_model = cast(
        Type[
            GenericModel
        ],  # casting ensures mypy is aware of the __concrete__ and __parameters__ attributes
        create_model(
            model_name=model_name,
            __module__=cls.__module__,
            __base__=cls,
            __config__=None,
            __validators__=validators,
            **fields,
        ),
    )
    created_model.Config = cls.Config
    concrete = all(not _is_typevar(v) for v in concrete_type_hints.values())
    created_model.__concrete__ = concrete
    if not concrete:
        parameters = tuple(v for v in concrete_type_hints.values() if _is_typevar(v))
        parameters = tuple(
            {k: None for k in parameters}.keys()
        )  # get unique params while maintaining order
        created_model.__parameters__ = parameters
    _generic_types_cache[(cls, params)] = created_model
    if len(params) == 1:
        _generic_types_cache[(cls, params[0])] = created_model
    return created_model


# Traceback (TypeError)
Traceback (most recent call last):
File "test_model_name.py", line 3, in <module>
@dataclass
File "pydantic/dataclasses.py", line 146, in pydantic.dataclasses.dataclass
#
File "pydantic/dataclasses.py", line 141, in pydantic.dataclasses.dataclass.wrap
# | True  | True  | True  | add    | raise  | Frozen, so hashable
File "pydantic/dataclasses.py", line 106, in pydantic.dataclasses._process_class
#    +--- order= parameter
File "pydantic/main.py", line 736, in pydantic.main.create_model
TypeError: create_model() got multiple values for keyword argument 'model_name'

# Fixed code
def __class_getitem__(
    cls: Type[GenericModelT], params: Union[Type[Any], Tuple[Type[Any], ...]]
) -> Type[Any]:
    cached = _generic_types_cache.get((cls, params))
    if cached is not None:
        return cached
    if cls.__concrete__:
        raise TypeError(
            "Cannot parameterize a concrete instantiation of a generic model"
        )
    if not isinstance(params, tuple):
        params = (params,)
    if cls is GenericModel and any(isinstance(param, TypeVar) for param in params):  # type: ignore
        raise TypeError(
            "Type parameters should be placed on typing.Generic, not GenericModel"
        )
    if not hasattr(cls, "__parameters__"):
        raise TypeError(
            f"Type {cls.__name__} must inherit from typing.Generic before being parameterized"
        )

    check_parameters_count(cls, params)
    typevars_map: Dict[TypeVarType, Type[Any]] = dict(zip(cls.__parameters__, params))
    type_hints = get_type_hints(cls).items()
    instance_type_hints = {
        k: v for k, v in type_hints if getattr(v, "__origin__", None) is not ClassVar
    }
    concrete_type_hints: Dict[str, Type[Any]] = {
        k: resolve_type_hint(v, typevars_map) for k, v in instance_type_hints.items()
    }

    model_name = cls.__concrete_name__(params)
    validators = gather_all_validators(cls)
    fields = _build_generic_fields(cls.__fields__, concrete_type_hints, typevars_map)
    created_model = cast(
        Type[
            GenericModel
        ],  # casting ensures mypy is aware of the __concrete__ and __parameters__ attributes
        create_model(
            model_name,
            __module__=cls.__module__,
            __base__=cls,
            __config__=None,
            __validators__=validators,
            **fields,
        ),
    )
    created_model.Config = cls.Config
    concrete = all(not _is_typevar(v) for v in concrete_type_hints.values())
    created_model.__concrete__ = concrete
    if not concrete:
        parameters = tuple(v for v in concrete_type_hints.values() if _is_typevar(v))
        parameters = tuple(
            {k: None for k in parameters}.keys()
        )  # get unique params while maintaining order
        created_model.__parameters__ = parameters
    _generic_types_cache[(cls, params)] = created_model
    if len(params) == 1:
        _generic_types_cache[(cls, params[0])] = created_model
    return created_model