diff --git a/llama_stack/distribution/inspect.py b/llama_stack/distribution/inspect.py index 5822070ad..d6a598982 100644 --- a/llama_stack/distribution/inspect.py +++ b/llama_stack/distribution/inspect.py @@ -54,6 +54,7 @@ class DistributionInspectImpl(Inspect): provider_types=[], # These APIs don't have "real" providers - they're internal to the stack ) for e in endpoints + if e.methods is not None ] ) else: @@ -67,6 +68,7 @@ class DistributionInspectImpl(Inspect): provider_types=[p.provider_type for p in providers], ) for e in endpoints + if e.methods is not None ] ) diff --git a/llama_stack/distribution/library_client.py b/llama_stack/distribution/library_client.py index 5dc0078d4..6503c13b2 100644 --- a/llama_stack/distribution/library_client.py +++ b/llama_stack/distribution/library_client.py @@ -445,8 +445,9 @@ class AsyncLlamaStackAsLibraryClient(AsyncLlamaStackClient): # we use asynchronous impl always internally and channel all requests to AsyncLlamaStackClient # however, the top-level caller may be a SyncAPIClient -- so its stream_cls might be a Stream (SyncStream) # so we need to convert it to AsyncStream + # mypy can't track runtime variables inside the [...] of a generic, so ignore that check args = get_args(stream_cls) - stream_cls = AsyncStream[args[0]] + stream_cls = AsyncStream[args[0]] # type: ignore[valid-type] response = AsyncAPIResponse( raw=mock_response, client=self,