From 2efaecd8871144165800044db93af23ae8905104 Mon Sep 17 00:00:00 2001 From: Roy Belio Date: Wed, 5 Nov 2025 16:05:48 +0200 Subject: [PATCH] fix: configure batches provider to use kv_postgres backend The batches provider was still referencing kv_default backend which doesn't exist in the postgres configuration. This would cause runtime failures when using the batches API with postgres store enabled. Now properly configured to use kv_postgres backend with batches namespace. --- .../starter/run-with-postgres-store.yaml | 2 +- src/llama_stack/distributions/starter/starter.py | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/llama_stack/distributions/starter/run-with-postgres-store.yaml b/src/llama_stack/distributions/starter/run-with-postgres-store.yaml index 502f0d7b1..530084bd9 100644 --- a/src/llama_stack/distributions/starter/run-with-postgres-store.yaml +++ b/src/llama_stack/distributions/starter/run-with-postgres-store.yaml @@ -231,7 +231,7 @@ providers: config: kvstore: namespace: batches - backend: kv_default + backend: kv_postgres storage: backends: kv_postgres: diff --git a/src/llama_stack/distributions/starter/starter.py b/src/llama_stack/distributions/starter/starter.py index 7d1a55141..88cd3a4fe 100644 --- a/src/llama_stack/distributions/starter/starter.py +++ b/src/llama_stack/distributions/starter/starter.py @@ -282,6 +282,18 @@ def get_distribution_template(name: str = "starter") -> DistributionTemplate: ), ) ], + "batches": [ + Provider( + provider_id="reference", + provider_type="inline::reference", + config=dict( + kvstore=KVStoreReference( + backend="kv_postgres", + namespace="batches", + ).model_dump(exclude_none=True), + ), + ) + ], }, storage_backends={ "kv_postgres": PostgresKVStoreConfig.sample_run_config(),