From 2d87a055e19fe20ace1d57346e456d1a9b3ab8b9 Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Sun, 5 Oct 2025 14:17:40 -0700 Subject: [PATCH] Update all distributions to use separate kvstore/sqlstore backends - Ensures context-aware parsing works correctly - Metadata uses kvstore backend, inference uses sqlstore backend - Both can share same postgres/sqlite config but parsed as correct type --- llama_stack/distributions/postgres-demo/run.yaml | 13 ++++++++++--- llama_stack/distributions/watsonx/run.yaml | 11 +++++++---- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/llama_stack/distributions/postgres-demo/run.yaml b/llama_stack/distributions/postgres-demo/run.yaml index 75dc3f3f8..ea6b8575d 100644 --- a/llama_stack/distributions/postgres-demo/run.yaml +++ b/llama_stack/distributions/postgres-demo/run.yaml @@ -73,7 +73,14 @@ providers: provider_type: remote::model-context-protocol persistence: backends: - default: + kvstore: + type: postgres + host: ${env.POSTGRES_HOST:=localhost} + port: ${env.POSTGRES_PORT:=5432} + db: ${env.POSTGRES_DB:=llamastack} + user: ${env.POSTGRES_USER:=llamastack} + password: ${env.POSTGRES_PASSWORD:=llamastack} + sqlstore: type: postgres host: ${env.POSTGRES_HOST:=localhost} port: ${env.POSTGRES_PORT:=5432} @@ -82,9 +89,9 @@ persistence: password: ${env.POSTGRES_PASSWORD:=llamastack} stores: metadata: - backend: default + backend: kvstore inference: - backend: default + backend: sqlstore models: - metadata: {} model_id: ${env.INFERENCE_MODEL} diff --git a/llama_stack/distributions/watsonx/run.yaml b/llama_stack/distributions/watsonx/run.yaml index 7eb127964..bd101d27e 100644 --- a/llama_stack/distributions/watsonx/run.yaml +++ b/llama_stack/distributions/watsonx/run.yaml @@ -105,14 +105,17 @@ providers: db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/watsonx}/files_metadata.db persistence: backends: - default: + kvstore: type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/watsonx}/registry.db + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/watsonx}/kvstore.db + sqlstore: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/watsonx}/sqlstore.db stores: metadata: - backend: default + backend: kvstore inference: - backend: default + backend: sqlstore models: - metadata: {} model_id: meta-llama/llama-3-3-70b-instruct