Simplify to single 'default' backend name

- Replace kvstore/sqlstore backend names with unified 'default'
- Context-aware parsing handles KVStore vs SqlStore based on usage
- Provider configs use 'backend: default' everywhere
- Much cleaner: kvstore { backend: default } instead of { backend: kvstore }
This commit is contained in:
Ashwin Bharambe 2025-10-05 19:06:47 -07:00
parent d15fa60c1b
commit 490110eba2
4 changed files with 27 additions and 43 deletions

View file

@ -95,28 +95,28 @@ providers:
provider_type: inline::faiss
config:
kvstore:
backend: kvstore
backend: default
namespace: faiss
- provider_id: sqlite-vec
provider_type: inline::sqlite-vec
config:
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ci-tests}/sqlite_vec.db
kvstore:
backend: kvstore
backend: default
namespace: sqlite_vec
- provider_id: ${env.MILVUS_URL:+milvus}
provider_type: inline::milvus
config:
db_path: ${env.MILVUS_DB_PATH:=~/.llama/distributions/ci-tests}/milvus.db
kvstore:
backend: kvstore
backend: default
namespace: milvus
- provider_id: ${env.CHROMADB_URL:+chromadb}
provider_type: remote::chromadb
config:
url: ${env.CHROMADB_URL:=}
kvstore:
backend: kvstore
backend: default
namespace: chromadb
- provider_id: ${env.PGVECTOR_DB:+pgvector}
provider_type: remote::pgvector
@ -127,7 +127,7 @@ providers:
user: ${env.PGVECTOR_USER:=}
password: ${env.PGVECTOR_PASSWORD:=}
kvstore:
backend: kvstore
backend: default
namespace: pgvector
files:
- provider_id: meta-reference-files
@ -135,7 +135,7 @@ providers:
config:
storage_dir: ${env.FILES_STORAGE_DIR:=~/.llama/distributions/ci-tests/files}
metadata_store:
backend: kvstore
backend: default
namespace: files
safety:
- provider_id: llama-guard
@ -149,10 +149,10 @@ providers:
provider_type: inline::meta-reference
config:
persistence_store:
backend: sqlstore
backend: default
namespace: agents
responses_store:
backend: sqlstore
backend: default
namespace: responses
telemetry:
- provider_id: meta-reference
@ -172,20 +172,20 @@ providers:
provider_type: inline::meta-reference
config:
kvstore:
backend: kvstore
backend: default
namespace: eval
datasetio:
- provider_id: huggingface
provider_type: remote::huggingface
config:
kvstore:
backend: kvstore
backend: default
namespace: huggingface
- provider_id: localfs
provider_type: inline::localfs
config:
kvstore:
backend: kvstore
backend: default
namespace: localfs_datasetio
scoring:
- provider_id: basic
@ -216,21 +216,18 @@ providers:
provider_type: inline::reference
config:
kvstore:
backend: kvstore
backend: default
namespace: batches
persistence:
backends:
kvstore:
default:
type: sqlite
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ci-tests}/kvstore.db
sqlstore:
type: sqlite
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ci-tests}/sqlstore.db
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ci-tests}/store.db
stores:
metadata:
backend: kvstore
backend: default
inference:
backend: sqlstore
backend: default
models: []
shields:
- shield_id: llama-guard

View file

@ -73,14 +73,7 @@ providers:
provider_type: remote::model-context-protocol
persistence:
backends:
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:
default:
type: postgres
host: ${env.POSTGRES_HOST:=localhost}
port: ${env.POSTGRES_PORT:=5432}
@ -89,9 +82,9 @@ persistence:
password: ${env.POSTGRES_PASSWORD:=llamastack}
stores:
metadata:
backend: kvstore
backend: default
inference:
backend: sqlstore
backend: default
models:
- metadata: {}
model_id: ${env.INFERENCE_MODEL}

View file

@ -220,17 +220,14 @@ providers:
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/batches.db
persistence:
backends:
kvstore:
default:
type: sqlite
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/kvstore.db
sqlstore:
type: sqlite
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/sqlstore.db
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/store.db
stores:
metadata:
backend: kvstore
backend: default
inference:
backend: sqlstore
backend: default
models: []
shields:
- shield_id: llama-guard

View file

@ -105,17 +105,14 @@ providers:
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/watsonx}/files_metadata.db
persistence:
backends:
kvstore:
default:
type: sqlite
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
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/watsonx}/store.db
stores:
metadata:
backend: kvstore
backend: default
inference:
backend: sqlstore
backend: default
models:
- metadata: {}
model_id: meta-llama/llama-3-3-70b-instruct