def track_all_costs(
        __func: asynchro_utils.CallableMaybeAwaitable[A, T],
        *args,
        with_openai: bool = True,
        with_hugs: bool = True,
        with_litellm: bool = True,
        with_bedrock: bool = True,
        with_cortex: bool = True,
        with_dummy: bool = True,
        **kwargs,
    ) -> Tuple[T, Sequence[EndpointCallback]]:
        """Track costs of all of the apis we can currently track, over the
        execution of thunk."""

        endpoints = []

        for endpoint_setup in Endpoint.ENDPOINT_SETUPS:
            if locals().get(endpoint_setup.arg_flag):
                try:
                    mod = importlib.import_module(endpoint_setup.module_name)
                    cls: Type[Endpoint] = python_utils.safe_getattr(
                        mod, endpoint_setup.class_name
                    )
                except ImportError:
                    # If endpoint uses optional packages, will get either module
                    # not found error, or we will have a dummy which will fail
                    # at getattr. Skip either way.
                    continue
                except Exception as e:
                    logger.debug(
                        "Could not import tracking module %s. "
                        "trulens will not track costs/usage of this endpoint. %s",
                        endpoint_setup.module_name,
                        e,
                    )
                    continue

                try:
                    endpoint = next(iter(cls.get_instances()))
                except StopIteration:
                    endpoint = None

                try:
                    if endpoint is None:
                        if cls.__name__ not in Endpoint.BASE_ENDPOINTS:
                            logger.debug(
                                "Could not find an instance of %s. "
                                "trulens will create an endpoint for cost tracking.",
                                cls.__name__,
                            )
                            Endpoint.BASE_ENDPOINTS[cls.__name__] = cls(
                                _register_instance=False
                            )
                        endpoint = Endpoint.BASE_ENDPOINTS[cls.__name__]

                    endpoints.append(endpoint)
                except Exception as e:
                    logger.debug(
                        "Could not initialize endpoint %s. "
                        "Possibly missing key(s). "
                        "trulens will not track costs/usage of this endpoint. %s",
                        cls.__name__,
                        e,
                    )

        return Endpoint._track_costs(
            __func, *args, with_endpoints=endpoints, **kwargs
        )
Track costs of all of the apis we can currently track, over the
        execution of thunk.
src/core/trulens/core/feedback/endpoint.py