SparkGen Config
Manage project configuration — providers, deployment modes, and environment files.
Dynamic Context
Before any action:
- •Read current
.env(if exists) for DEPLOYMENT_MODE, LLM_PROVIDER, MODEL_ID - •List available env files:
ls .env.* - •Read
config/ai_workflow.yamlfor current LLM and embedding config
Actions
Show Config (/sparkgen-config show)
Display current configuration:
code
=== Current Configuration === Deployment Mode: <from .env or 'not set'> LLM Provider: <provider> LLM Model: <model_id> Embed Provider: <embed_provider> Embed Model: <embed_model> RAG Enabled: <yes/no> Guardrails: <yes/no> API Key: <masked> Server Port: <port>
Switch Provider (/sparkgen-config switch-provider <bedrock|ollama|openai>)
To Ollama:
- •Update
.env:LLM_PROVIDER=ollama,OLLAMA_MODEL=llama3.2:3b,OLLAMA_BASE_URL=http://localhost:11434 - •Check Ollama is running:
curl -sf http://localhost:11434/api/tags - •Check model is pulled:
ollama list | grep <model> - •Update
EMBEDDING_PROVIDER=sentence-transformer
To Bedrock:
- •Update
.env:LLM_PROVIDER=bedrock,AWS_MODEL_ID=eu.amazon.nova-lite-v1:0 - •Check AWS credentials:
aws sts get-caller-identity - •Update
EMBEDDING_PROVIDER=bedrock,AWS_EMBED_MODEL_ID=amazon.titan-embed-text-v2:0
To OpenAI:
- •Update
.env:LLM_PROVIDER=openai,OPENAI_MODEL=gpt-4o-mini - •Check
OPENAI_API_KEYis set - •Update
EMBEDDING_PROVIDER=openai
After switch: remind user to restart the server.
Switch Mode (/sparkgen-config switch-mode <local|docker|aws>)
- •Copy the appropriate env file:
cp .env.<mode> .env - •Show what changed (diff the key variables)
- •Remind user of prerequisites for the mode:
- •local: Ollama running + model pulled
- •docker: Docker running
- •aws: AWS credentials configured
Environment (/sparkgen-config env)
Show all environment variables from current .env with descriptions, grouped by section:
- •Deployment settings
- •LLM provider settings
- •Embedding settings
- •Storage settings
- •RAG settings
- •Security settings