Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,065 changes: 1,065 additions & 0 deletions docs/design/llama-stack-config-merge/llama-stack-config-merge-spike.md

Large diffs are not rendered by default.

523 changes: 523 additions & 0 deletions docs/design/llama-stack-config-merge/llama-stack-config-merge.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Library-mode PoC evidence

Command:
```bash
export OPENAI_API_KEY=<redacted>
export E2E_OPENAI_MODEL=gpt-4o-mini
uv run lightspeed-stack -c docs/design/llama-stack-config-merge/poc-results/lightspeed-stack-unified-library.yaml
```
Comment thread
coderabbitai[bot] marked this conversation as resolved.

## What the unified config does

- `llama_stack.config.profile: /abs/path/to/tests/e2e/configs/run-ci.yaml` — baseline loaded from the CI profile
- `llama_stack.config.native_override.safety.default_shield_id: llama-guard` — override proves merge works

## Evidence

- `synthesized-run.yaml` — the full run.yaml LCORE produced from the unified config
- `query-response.json` — a successful `/v1/query` round-trip

## Proves

- `llama_stack.library_client_config_path` was NOT used (no external run.yaml needed)
- `llama_stack.config.profile` was used as the synthesis baseline (path resolution works with absolute paths)
- `llama_stack.config.native_override` was merged onto the baseline
- `AsyncLlamaStackAsLibraryClient` accepts the synthesized file path (answered item #24: file-only, not dict)
- `/v1/query` succeeded end-to-end through the synthesized stack
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"conversation_id":"976ef32527283085ba2f1d0cfb4c16d97071bf64391a8200","response":"The three primary colors are red, blue, and yellow.","rag_chunks":[],"referenced_documents":[],"truncated":false,"input_tokens":24,"output_tokens":12,"available_quotas":{},"tool_calls":[],"tool_results":[]}
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
apis:
- agents
- batches
- datasetio
- eval
- files
- inference
- safety
- scoring
- tool_runtime
- vector_io
benchmarks: []
datasets: []
image_name: starter
providers:
agents:
- config:
persistence:
agent_state:
backend: kv_default
namespace: agents_state
responses:
backend: sql_default
table_name: agents_responses
provider_id: meta-reference
provider_type: inline::meta-reference
batches:
- config:
kvstore:
backend: kv_default
namespace: batches_store
provider_id: reference
provider_type: inline::reference
datasetio:
- config:
kvstore:
backend: kv_default
namespace: huggingface_datasetio
provider_id: huggingface
provider_type: remote::huggingface
- config:
kvstore:
backend: kv_default
namespace: localfs_datasetio
provider_id: localfs
provider_type: inline::localfs
eval:
- config:
kvstore:
backend: kv_default
namespace: eval_store
provider_id: meta-reference
provider_type: inline::meta-reference
files:
- config:
metadata_store:
backend: sql_default
table_name: files_metadata
storage_dir: ~/.llama/storage/files
provider_id: meta-reference-files
provider_type: inline::localfs
inference:
- config:
allowed_models:
- ${env.E2E_OPENAI_MODEL:=gpt-4o-mini}
api_key: ${env.OPENAI_API_KEY}
provider_id: openai
provider_type: remote::openai
- config: {}
provider_id: sentence-transformers
provider_type: inline::sentence-transformers
safety:
- config:
excluded_categories: []
provider_id: llama-guard
provider_type: inline::llama-guard
scoring:
- config: {}
provider_id: basic
provider_type: inline::basic
- config: {}
provider_id: llm-as-judge
provider_type: inline::llm-as-judge
- config:
openai_api_key: '********'
provider_id: braintrust
provider_type: inline::braintrust
tool_runtime:
- config: {}
provider_id: rag-runtime
provider_type: inline::rag-runtime
- config: {}
provider_id: model-context-protocol
provider_type: remote::model-context-protocol
vector_io: []
registered_resources:
benchmarks: []
datasets: []
models:
- metadata:
embedding_dimension: 768
model_id: all-mpnet-base-v2
model_type: embedding
provider_id: sentence-transformers
provider_model_id: all-mpnet-base-v2
scoring_fns: []
shields:
- provider_id: llama-guard
provider_shield_id: openai/gpt-4o-mini
shield_id: llama-guard
Comment thread
coderabbitai[bot] marked this conversation as resolved.
tool_groups:
- provider_id: rag-runtime
toolgroup_id: builtin::rag
vector_stores: []
safety:
default_shield_id: llama-guard
scoring_fns: []
server:
port: 8321
storage:
backends:
kv_default:
db_path: ${env.KV_STORE_PATH:=~/.llama/storage/kv_store.db}
type: kv_sqlite
sql_default:
db_path: ${env.SQL_STORE_PATH:=~/.llama/storage/sql_store.db}
type: sql_sqlite
stores:
conversations:
backend: sql_default
table_name: openai_conversations
inference:
backend: sql_default
max_write_queue_size: 10000
num_writers: 4
table_name: inference_store
metadata:
backend: kv_default
namespace: registry
prompts:
backend: kv_default
namespace: prompts
vector_stores:
default_embedding_model:
model_id: all-mpnet-base-v2
provider_id: sentence-transformers
default_provider_id: faiss
version: 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Lightspeed Core Service (LCS) - Unified PoC
service:
host: 0.0.0.0
port: 8080
base_url: http://localhost:8080
auth_enabled: false
workers: 1
color_log: true
access_log: true
# Unified mode: no `library_client_config_path`. Operational LS config is
# synthesized by LCORE from `llama_stack.config` below.
llama_stack:
use_as_library_client: true
config:
# Use the CI-friendly baseline via `profile` (no EXTERNAL_PROVIDERS_DIR
# env var required). Equivalent to what tests/e2e/configs/run-ci.yaml
# provides; this exercises the `profile:` path of the synthesizer.
profile: /home/msvistun/repos/lightspeed/stack/tests/e2e/configs/run-ci.yaml
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove the machine-local profile path before merge.

This config will fail anywhere except the author’s workstation and should not be committed as reusable evidence. If this PoC artifact must remain, use a repo-relative path instead.

Suggested portable path if the artifact is retained
-    profile: /home/msvistun/repos/lightspeed/stack/tests/e2e/configs/run-ci.yaml
+    profile: ../../../../tests/e2e/configs/run-ci.yaml
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
profile: /home/msvistun/repos/lightspeed/stack/tests/e2e/configs/run-ci.yaml
profile: ../../../../tests/e2e/configs/run-ci.yaml
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@docs/design/llama-stack-config-merge/poc-evidence/lightspeed-stack-unified-library.yaml`
at line 18, The committed YAML contains a machine-local absolute path in the
profile key ('profile:
/home/msvistun/repos/lightspeed/stack/tests/e2e/configs/run-ci.yaml'); remove or
replace this with a portable repo-relative path (for example
'./tests/e2e/configs/run-ci.yaml') or delete the profile entry if not needed so
the PoC artifact is reusable outside the author’s workstation; update any
references that expect the old absolute path (search for the profile key) to use
the new relative path.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acknowledged. Local-machine path baked into PoC evidence; scheduled for removal pre-merge per the "Before merge" section. The production design uses profile: <repo-relative-or-absolute path> — R8 in the spec doc covers relative-path resolution rules.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@max-svistunov, understood — thanks for the context. The pre-merge cleanup note and the R8 spec coverage make sense. I'll leave the comment open as a reminder until the path is removed/replaced before merge.

# Small native_override: prove overrides take effect end-to-end.
native_override:
safety:
default_shield_id: llama-guard
user_data_collection:
feedback_enabled: false
feedback_storage: "/tmp/lcore-836-poc/feedback"
transcripts_enabled: false
transcripts_storage: "/tmp/lcore-836-poc/transcripts"
conversation_cache:
type: "sqlite"
sqlite:
db_path: "/tmp/lcore-836-poc/conversation-cache.db"
authentication:
module: "noop"
Loading
Loading