llama-stack-mirror/llama_stack/core
Sébastien Han bc64635835
feat: load config class when doing variable substitution
When using bash style substitution env variable in distribution
template, we are processing the string and convert it to the type
associated with the provider's config class. This allows us to return
the proper type. This is crucial for api key since they are not strings
anymore but SecretStr. If the key is unset we will get an empty string
which will result in a Pydantic error like:

```
ERROR    2025-09-25 21:40:44,565 __main__:527 core::server: Error creating app: 1 validation error for AnthropicConfig
         api_key
           Input should be a valid string
             For further information visit
             https://errors.pydantic.dev/2.11/v/string_type
```

Signed-off-by: Sébastien Han <seb@redhat.com>
2025-09-29 09:55:19 +02:00
..
access_control chore(rename): move llama_stack.distribution to llama_stack.core (#2975) 2025-07-30 23:30:53 -07:00
prompts feat: Adding OpenAI Prompts API (#3319) 2025-09-08 11:05:13 -04:00
routers chore(api): remove batch inference (#3261) 2025-09-26 14:35:34 -07:00
routing_tables fix: Gracefully handle errors when listing MCP tools (#2544) 2025-09-26 18:09:48 +02:00
server feat: load config class when doing variable substitution 2025-09-29 09:55:19 +02:00
store fix: Revert "fix: Added a bug fix when registering new models" (#3473) 2025-09-26 16:19:21 -04:00
ui docs: update documentation links (#3459) 2025-09-17 10:37:35 -07:00
utils refactor(logging): rename llama_stack logger categories (#3065) 2025-08-21 17:31:04 -07:00
__init__.py chore(rename): move llama_stack.distribution to llama_stack.core (#2975) 2025-07-30 23:30:53 -07:00
build.py feat(distro): no huggingface provider for starter (#3258) 2025-08-26 14:06:36 -07:00
build_container.sh chore: fix build (#3522) 2025-09-22 22:53:48 -07:00
build_venv.sh fix(ci, tests): ensure uv environments in CI are kosher, record tests (#3193) 2025-08-18 17:02:24 -07:00
client.py feat: introduce API leveling, post_training, eval to v1alpha (#3449) 2025-09-26 16:18:07 +02:00
common.sh refactor: remove Conda support from Llama Stack (#2969) 2025-08-02 15:52:59 -07:00
configure.py feat: load config class when doing variable substitution 2025-09-29 09:55:19 +02:00
datatypes.py feat: combine ProviderSpec datatypes (#3378) 2025-09-18 16:10:00 +02:00
distribution.py feat: combine ProviderSpec datatypes (#3378) 2025-09-18 16:10:00 +02:00
external.py chore(rename): move llama_stack.distribution to llama_stack.core (#2975) 2025-07-30 23:30:53 -07:00
inspect.py chore(rename): move llama_stack.distribution to llama_stack.core (#2975) 2025-07-30 23:30:53 -07:00
library_client.py feat: load config class when doing variable substitution 2025-09-29 09:55:19 +02:00
providers.py chore(rename): move llama_stack.distribution to llama_stack.core (#2975) 2025-07-30 23:30:53 -07:00
request_headers.py chore(pre-commit): add pre-commit hook to enforce llama_stack logger usage (#3061) 2025-08-20 07:15:35 -04:00
resolver.py feat: Adding OpenAI Prompts API (#3319) 2025-09-08 11:05:13 -04:00
secret_types.py feat: load config class when doing variable substitution 2025-09-29 09:55:19 +02:00
stack.py feat: load config class when doing variable substitution 2025-09-29 09:55:19 +02:00
start_stack.sh docs: update documentation links (#3459) 2025-09-17 10:37:35 -07:00