Repository: meta-llama/llama-stack
File: src/llama_stack/core/library_client.py (Python)

Code before:
import inspect
import json
import logging  # allow-direct-logging
import os
import sys
from enum import Enum
from io import BytesIO
from pathlib import Path
from typing import Any, TypeVar, Union, get_args, get_origin

import httpx
import yaml
from fastapi import Response as FastAPIResponse

try:
    from llama_stack_client import (
        NOT_GIVEN,
        APIResponse,
        AsyncAPIResponse,
        AsyncLlamaStackClient,
        AsyncStream,
        LlamaStackClient,
    )
except ImportError as e:
    raise ImportError(
        "llama-stack-client is not installed. Please install it with `pip install llama-stack-client`."
    ) from e

from pydantic import BaseModel, TypeAdapter
from rich.console import Console
from termcolor import cprint

from llama_stack.core.build import print_pip_install_help
from llama_stack.core.configure import parse_and_maybe_upgrade_config
from llama_stack.core.datatypes import BuildConfig, BuildProvider, DistributionSpec
from llama_stack.core.request_headers import (
    PROVIDER_DATA_VAR,
    request_provider_data_context,
)
from llama_stack.core.resolver import ProviderRegistry
from llama_stack.core.server.routes import RouteImpls, find_matching_route, initialize_route_impls
from llama_stack.core.stack import (
    Stack,
    get_stack_run_config_from_distro,
    replace_env_vars,
)
from llama_stack.core.telemetry import Telemetry
from llama_stack.core.telemetry.tracing import CURRENT_TRACE_CONTEXT, end_trace, setup_logger, start_trace
from llama_stack.core.utils.config import redact_sensitive_fields
from llama_stack.core.utils.context import preserve_contexts_async_generator
from llama_stack.core.utils.exec import in_notebook

Review comment (suggestion):
```suggestion
        "llama-stack-client is not installed. Please install it with `pip install llama-stack-client` 'uv pip install llama-stack[client]'"
```

Code after:
import inspect
import json
import logging  # allow-direct-logging
import os
import sys
from enum import Enum
from io import BytesIO
from pathlib import Path
from typing import Any, TypeVar, Union, get_args, get_origin

import httpx
import yaml
from fastapi import Response as FastAPIResponse

try:
    from llama_stack_client import (
        NOT_GIVEN,
        APIResponse,
        AsyncAPIResponse,
        AsyncLlamaStackClient,
        AsyncStream,
        LlamaStackClient,
    )
except ImportError as e:
    raise ImportError(
        "llama-stack-client is not installed. Please install it with `uv pip install llama-stack[client]`."
    ) from e

from pydantic import BaseModel, TypeAdapter
from rich.console import Console
from termcolor import cprint

from llama_stack.core.build import print_pip_install_help
from llama_stack.core.configure import parse_and_maybe_upgrade_config
from llama_stack.core.datatypes import BuildConfig, BuildProvider, DistributionSpec
from llama_stack.core.request_headers import (
    PROVIDER_DATA_VAR,
    request_provider_data_context,
)
from llama_stack.core.resolver import ProviderRegistry
from llama_stack.core.server.routes import RouteImpls, find_matching_route, initialize_route_impls
from llama_stack.core.stack import (
    Stack,
    get_stack_run_config_from_distro,
    replace_env_vars,
)
from llama_stack.core.telemetry import Telemetry
from llama_stack.core.telemetry.tracing import CURRENT_TRACE_CONTEXT, end_trace, setup_logger, start_trace
from llama_stack.core.utils.config import redact_sensitive_fields
from llama_stack.core.utils.context import preserve_contexts_async_generator
from llama_stack.core.utils.exec import in_notebook