Skip to content

Commit 5e39461

Browse files
committed
Upgrade to llama-stack 0.3.0 and LCORE/OLS compatibility fixes
1 parent e209fa4 commit 5e39461

38 files changed

Lines changed: 1757 additions & 1573 deletions

.github/workflows/e2e_tests.yaml

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -93,51 +93,44 @@ jobs:
9393
9494
- name: Select and configure run.yaml
9595
env:
96-
CONFIG_ENVIRONMENT: ${{ matrix.environment }}
96+
CONFIG_MODE: ${{ matrix.mode }}
9797
run: |
9898
CONFIGS_DIR="tests/e2e/configs"
99-
ENVIRONMENT="$CONFIG_ENVIRONMENT"
99+
MODE="$CONFIG_MODE"
100100
101-
echo "Looking for configurations in $CONFIGS_DIR/"
101+
echo "Deployment mode: $MODE"
102102
103-
# List available configurations
104-
if [ -d "$CONFIGS_DIR" ]; then
105-
echo "Available configurations:"
106-
ls -la "$CONFIGS_DIR"/*.yaml 2>/dev/null || echo "No YAML files found in $CONFIGS_DIR/"
103+
# Select config based on mode:
104+
# - library mode: run-library.yaml (llama-stack 0.3.0 format)
105+
# - server mode: run-ci.yaml (original format)
106+
if [ "$MODE" == "library" ]; then
107+
CONFIG_FILE="$CONFIGS_DIR/run-library.yaml"
107108
else
108-
echo "Configs directory '$CONFIGS_DIR' not found!"
109-
exit 1
109+
CONFIG_FILE="$CONFIGS_DIR/run-ci.yaml"
110110
fi
111111
112-
# Determine which config file to use
113-
CONFIG_FILE="$CONFIGS_DIR/run-$ENVIRONMENT.yaml"
114-
115-
echo "Looking for: $CONFIG_FILE"
112+
echo "Using configuration: $CONFIG_FILE"
116113
117-
if [ -f "$CONFIG_FILE" ]; then
118-
echo "Found config for $ENVIRONMENT environment"
119-
cp "$CONFIG_FILE" run.yaml
120-
else
121-
echo "Configuration file not found: $CONFIG_FILE"
122-
echo "Available files:"
123-
find "$CONFIGS_DIR" -name "*.yaml"
114+
if [ ! -f "$CONFIG_FILE" ]; then
115+
echo "❌ Configuration not found: $CONFIG_FILE"
116+
echo "Available configs:"
117+
ls -la "$CONFIGS_DIR"/*.yaml
124118
exit 1
125119
fi
126120
127-
# Update paths for container environment (relative -> absolute)
128-
sed -i 's|db_path: \.llama/distributions|db_path: /app-root/.llama/distributions|g' run.yaml
129-
sed -i 's|db_path: tmp/|db_path: /app-root/.llama/distributions/|g' run.yaml
130-
131-
echo "Successfully configured for $ENVIRONMENT environment"
132-
echo "Using configuration: $(basename "$CONFIG_FILE")"
121+
cp "$CONFIG_FILE" run.yaml
122+
echo "✅ Configuration copied to run.yaml"
133123
134124
- name: Show final configuration
135125
run: |
136126
echo "=== Configuration Summary ==="
137127
echo "Deployment mode: ${{ matrix.mode }}"
138128
echo "Environment: ${{ matrix.environment }}"
139-
echo "Source config: tests/e2e/configs/run-${{ matrix.environment }}.yaml"
140-
echo "Final file: run.yaml"
129+
if [ "${{ matrix.mode }}" == "library" ]; then
130+
echo "Source config: tests/e2e/configs/run-library.yaml"
131+
else
132+
echo "Source config: tests/e2e/configs/run-ci.yaml"
133+
fi
141134
echo ""
142135
echo "=== Configuration Preview ==="
143136
echo "Providers: $(grep -c "provider_id:" run.yaml)"

docker-compose.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ services:
2323
- RHEL_AI_PORT=${RHEL_AI_PORT}
2424
- RHEL_AI_API_KEY=${RHEL_AI_API_KEY}
2525
- RHEL_AI_MODEL=${RHEL_AI_MODEL}
26-
- LLAMA_STACK_LOGGING=all=debug # enable llama-stack debug log
2726
networks:
2827
- lightspeednet
2928
healthcheck:

docs/openapi.json

Lines changed: 330 additions & 764 deletions
Large diffs are not rendered by default.

run.yaml

Lines changed: 106 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
version: '2'
2-
image_name: minimal-viable-llama-stack-configuration
1+
version: 2
2+
33
apis:
44
- agents
55
- batches
@@ -11,103 +11,131 @@ apis:
1111
- scoring
1212
- tool_runtime
1313
- vector_io
14+
15+
benchmarks: []
16+
conversations_store:
17+
db_path: /tmp/conversations.db
18+
type: sqlite
19+
datasets: []
20+
image_name: starter
21+
# external_providers_dir: /opt/app-root/src/.llama/providers.d
22+
inference_store:
23+
db_path: /tmp/inference_store.db
24+
type: sqlite
25+
metadata_store:
26+
db_path: /tmp/registry.db
27+
type: sqlite
28+
29+
models:
30+
- model_id: sentence-transformers/all-mpnet-base-v2
31+
model_type: embedding
32+
provider_id: sentence-transformers
33+
provider_model_id: sentence-transformers/all-mpnet-base-v2
34+
metadata:
35+
embedding_dimension: 768
36+
# - model_id: gpt-4o-mini
37+
# provider_id: openai
38+
# model_type: llm
39+
# provider_model_id: gpt-4o-mini
1440

1541
providers:
16-
inference:
17-
- provider_id: openai
18-
provider_type: remote::openai
19-
config:
20-
api_key: ${env.OPENAI_API_KEY}
21-
- provider_id: sentence-transformers
22-
provider_type: inline::sentence-transformers
23-
config: {}
24-
vector_io:
25-
- provider_id: documentation_faiss
26-
provider_type: inline::faiss
27-
config:
28-
persistence:
29-
namespace: vector_io::faiss
30-
backend: kv_default
31-
files:
32-
- provider_id: meta-reference-files
33-
provider_type: inline::localfs
34-
config:
35-
storage_dir: /tmp/llama-stack-files
36-
metadata_store:
37-
table_name: files_metadata
38-
backend: sql_default
39-
ttl_secs: 604800
40-
safety:
41-
- provider_id: llama-guard
42-
provider_type: inline::llama-guard
43-
config:
44-
excluded_categories: []
4542
agents:
46-
- provider_id: meta-reference
43+
- config:
44+
persistence_store:
45+
db_path: /tmp/agents_store.db
46+
type: sqlite
47+
responses_store:
48+
db_path: /tmp/responses_store.db
49+
type: sqlite
50+
provider_id: meta-reference
4751
provider_type: inline::meta-reference
48-
config:
49-
persistence:
50-
agent_state:
51-
namespace: agents
52-
backend: kv_default
53-
responses:
54-
table_name: responses
55-
backend: sql_default
56-
max_write_queue_size: 10000
57-
num_writers: 4
58-
eval:
59-
- provider_id: meta-reference
60-
provider_type: inline::meta-reference
61-
config:
52+
batches:
53+
- config:
6254
kvstore:
63-
namespace: eval
64-
backend: kv_default
55+
db_path: /tmp/batches.db
56+
type: sqlite
57+
provider_id: reference
58+
provider_type: inline::reference
6559
datasetio:
66-
- provider_id: huggingface
60+
- config:
61+
kvstore:
62+
db_path: /tmp/huggingface_datasetio.db
63+
type: sqlite
64+
provider_id: huggingface
6765
provider_type: remote::huggingface
68-
config:
66+
- config:
6967
kvstore:
70-
namespace: datasetio::huggingface
71-
backend: kv_default
72-
- provider_id: localfs
68+
db_path: /tmp/localfs_datasetio.db
69+
type: sqlite
70+
provider_id: localfs
7371
provider_type: inline::localfs
74-
config:
72+
eval:
73+
- config:
7574
kvstore:
76-
namespace: datasetio::localfs
77-
backend: kv_default
75+
db_path: /tmp/meta_reference_eval.db
76+
type: sqlite
77+
provider_id: meta-reference
78+
provider_type: inline::meta-reference
79+
files:
80+
- config:
81+
metadata_store:
82+
db_path: /tmp/files_metadata.db
83+
type: sqlite
84+
storage_dir: /tmp/files
85+
provider_id: meta-reference-files
86+
provider_type: inline::localfs
87+
inference:
88+
- provider_id: openai
89+
provider_type: remote::openai
90+
config:
91+
api_key: ${env.OPENAI_API_KEY}
92+
- config: {}
93+
provider_id: sentence-transformers
94+
provider_type: inline::sentence-transformers
95+
safety:
96+
- config:
97+
excluded_categories: []
98+
provider_id: llama-guard
99+
provider_type: inline::llama-guard
78100
scoring:
79-
- provider_id: basic
101+
- config: {}
102+
provider_id: basic
80103
provider_type: inline::basic
81-
config: {}
82-
- provider_id: llm-as-judge
104+
- config: {}
105+
provider_id: llm-as-judge
83106
provider_type: inline::llm-as-judge
84-
config: {}
85-
- provider_id: braintrust
86-
provider_type: inline::braintrust
87-
config:
88-
openai_api_key: ${env.OPENAI_API_KEY:}
107+
# telemetry:
108+
# - config:
109+
# service_name: "\u200B"
110+
# provider_id: meta-reference
111+
# provider_type: inline::meta-reference
89112
tool_runtime:
90-
- provider_id: rag-runtime
113+
- config: {}
114+
provider_id: rag-runtime
91115
provider_type: inline::rag-runtime
92-
config: {}
93-
- provider_id: model-context-protocol
94-
provider_type: remote::model-context-protocol
95-
config: {}
96-
batches:
97-
- provider_id: reference
98-
provider_type: inline::reference
99-
config:
116+
vector_io:
117+
- config:
100118
kvstore:
101-
namespace: batches
102-
backend: kv_default
119+
db_path: /tmp/faiss_store.db
120+
type: sqlite
121+
provider_id: faiss
122+
provider_type: inline::faiss
123+
scoring_fns: []
124+
server:
125+
port: 8321
126+
shields: []
127+
tool_groups:
128+
- provider_id: rag-runtime
129+
toolgroup_id: builtin::rag
130+
vector_dbs: []
103131
storage:
104132
backends:
105133
kv_default:
106134
type: kv_sqlite
107-
db_path: .llama/distributions/starter/kv_store.db
135+
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/kv_store.db
108136
sql_default:
109137
type: sql_sqlite
110-
db_path: .llama/distributions/starter/sql_store.db
138+
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/sql_store.db
111139
stores:
112140
metadata:
113141
namespace: registry
@@ -122,34 +150,4 @@ storage:
122150
backend: sql_default
123151
prompts:
124152
namespace: prompts
125-
backend: kv_default
126-
registered_resources:
127-
models:
128-
- model_id: all-mpnet-base-v2
129-
provider_id: sentence-transformers
130-
provider_model_id: all-mpnet-base-v2
131-
model_type: embedding
132-
metadata:
133-
embedding_dimension: 768
134-
shields:
135-
- shield_id: llama-guard
136-
provider_id: ${env.SAFETY_MODEL:+llama-guard}
137-
provider_shield_id: ${env.SAFETY_MODEL:=}
138-
datasets: []
139-
scoring_fns: []
140-
benchmarks: []
141-
external_providers_dir: /opt/app-root/src/.llama/providers.d
142-
tool_groups:
143-
- toolgroup_id: builtin::rag
144-
provider_id: rag-runtime
145-
server:
146-
port: 8321
147-
telemetry:
148-
enabled: true
149-
vector_stores:
150-
default_provider_id: documentation_faiss
151-
default_embedding_model:
152-
provider_id: sentence-transformers
153-
model_id: all-mpnet-base-v2
154-
safety:
155-
default_shield_id: llama-guard
153+
backend: kv_default

0 commit comments

Comments
 (0)