chore: use empty SecretStr values as default

Better than using SecretStr | None so we centralize the null handling.

Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
Sébastien Han 2025-09-22 14:21:10 +02:00
parent c4cb6aa8d9
commit 4af141292f
No known key found for this signature in database
51 changed files with 103 additions and 93 deletions

View file

@ -12,17 +12,17 @@ from llama_stack.schema_utils import json_schema_type
class GroqProviderDataValidator(BaseModel):
groq_api_key: SecretStr | None = Field(
default=None,
groq_api_key: SecretStr = Field(
default=SecretStr(""),
description="API key for Groq models",
)
@json_schema_type
class GroqConfig(BaseModel):
api_key: SecretStr | None = Field(
api_key: SecretStr = Field(
# The Groq client library loads the GROQ_API_KEY environment variable by default
default=None,
default=SecretStr(""),
description="The Groq API key",
)