fix: OpenAPI with provider get (#1627)

# What does this PR do?
- https://github.com/meta-llama/llama-stack/pull/1429 introduces
GetProviderResponse in OpenAPI, which is not needed, and not correctly
defined.

cc @cdoern 


[//]: # (If resolving an issue, uncomment and update the line below)
[//]: # (Closes #[issue-number])

## Test Plan
```
llama-stack-client providers list
```
<img width="610" alt="image"
src="https://github.com/user-attachments/assets/2f7b62a5-daf2-4bf9-9505-69755c7025fc"
/>


[//]: # (## Documentation)
This commit is contained in:
Xi Yan 2025-03-13 19:56:32 -07:00 committed by GitHub
parent 9e73341008
commit 33b096cc21
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 166 additions and 179 deletions

View file

@ -4,11 +4,10 @@
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
from typing import List, Protocol, runtime_checkable
from typing import Any, Dict, List, Protocol, runtime_checkable
from pydantic import BaseModel
from llama_stack.distribution.datatypes import Provider
from llama_stack.schema_utils import json_schema_type, webmethod
@ -17,10 +16,7 @@ class ProviderInfo(BaseModel):
api: str
provider_id: str
provider_type: str
class GetProviderResponse(BaseModel):
data: Provider | None
config: Dict[str, Any]
class ListProvidersResponse(BaseModel):
@ -37,4 +33,4 @@ class Providers(Protocol):
async def list_providers(self) -> ListProvidersResponse: ...
@webmethod(route="/providers/{provider_id}", method="GET")
async def inspect_provider(self, provider_id: str) -> GetProviderResponse: ...
async def inspect_provider(self, provider_id: str) -> ProviderInfo: ...