Skip to content

Conversation

@cdoern
Copy link
Contributor

@cdoern cdoern commented Oct 20, 2025

What does this PR do?

Warning message on every command:

╰─ llama stack list-deps starter
/Users/charliedoern/projects/Documents/llama-stack/venv/lib/python3.12/site-packages/pydantic/_internal/_generate_schema.py:2249: UnsupportedFieldAttributeWarning: The 'default' attribute with value 'sqlite' was provided to the `Field()` function, which has no effect in the context it was used. 'default' is field-specific metadata, and can only be attached to a model field using `Annotated` metadata or by assignment. This may have happened because an `Annotated` type alias using the `type` statement was used, or if the `Field()` function was attached to a single member of a union type.
  warnings.warn(

Remove invalid default parameters from KVStoreConfig and SqlStoreConfig
Annotated types which were causing UnsupportedFieldAttributeWarning and
producing incorrect string values instead of proper config objects.

Add proper default_factory to all KVStoreConfig and SqlStoreConfig fields
across core datatypes and provider configs, ensuring they instantiate
SqliteKVStoreConfig or SqliteSqlStoreConfig objects with correct defaults.

This improves usability by allowing configs to be instantiated without
explicitly providing storage configuration while maintaining type safety
and discriminated union functionality.

The warning is now gone, and the types are accurate.

  Remove invalid default parameters from KVStoreConfig and SqlStoreConfig
  Annotated types which were causing UnsupportedFieldAttributeWarning and
  producing incorrect string values instead of proper config objects.

  Add proper default_factory to all KVStoreConfig and SqlStoreConfig fields
  across core datatypes and provider configs, ensuring they instantiate
  SqliteKVStoreConfig or SqliteSqlStoreConfig objects with correct defaults.

  This improves usability by allowing configs to be instantiated without
  explicitly providing storage configuration while maintaining type safety
  and discriminated union functionality.

Signed-off-by: Charlie Doern <[email protected]>
@cdoern
Copy link
Contributor Author

cdoern commented Oct 20, 2025

majority of this is doc updates from pre-commit. the change here is pretty limited

@ashwinb
Copy link
Contributor

ashwinb commented Oct 20, 2025

Please hold on to this while I land the persistence storage backends refactor. Thank you 🙏

@cdoern
Copy link
Contributor Author

cdoern commented Oct 21, 2025

this was all taken care of in the refactor. closing

@cdoern cdoern closed this Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants