diff --git a/llama_stack/providers/datatypes.py b/llama_stack/providers/datatypes.py index 384582423..86dc3207a 100644 --- a/llama_stack/providers/datatypes.py +++ b/llama_stack/providers/datatypes.py @@ -113,8 +113,7 @@ Fully-qualified name of the module to import. The module is expected to have: default_factory=list, description="The pip dependencies needed for this implementation", ) - config_class: Optional[str] = Field( - default=None, + config_class: str = Field( description="Fully-qualified classname of the config for this provider", ) provider_data_validator: Optional[str] = Field( @@ -162,7 +161,8 @@ class RemoteProviderConfig(BaseModel): @classmethod def from_url(cls, url: str) -> "RemoteProviderConfig": parsed = urlparse(url) - return cls(host=parsed.hostname, port=parsed.port, protocol=parsed.scheme) + attrs = {k: v for k, v in parsed._asdict().items() if v is not None} + return cls(**attrs) @json_schema_type diff --git a/pyproject.toml b/pyproject.toml index 990d365b1..18a4a8ace 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -211,7 +211,6 @@ exclude = [ "^llama_stack/models/llama/llama3/tool_utils\\.py$", "^llama_stack/models/llama/llama3_3/prompts\\.py$", "^llama_stack/models/llama/sku_list\\.py$", - "^llama_stack/providers/datatypes\\.py$", "^llama_stack/providers/inline/agents/meta_reference/", "^llama_stack/providers/inline/agents/meta_reference/agent_instance\\.py$", "^llama_stack/providers/inline/agents/meta_reference/agents\\.py$",