feat: allow for provider immutability

being able to update providers means that admins should have the ability to turn this feature off. introduce `immutable` as a field in the Provider class. Defauling to false means all providers can be updated by default, but an admin at runtime can choose to set this to True to disable provider updating

Signed-off-by: Charlie Doern <cdoern@redhat.com>
This commit is contained in:
Charlie Doern 2025-06-30 15:07:09 -04:00
parent 436f8ade9e
commit e4b040d5cc
35 changed files with 554 additions and 0 deletions

View file

@ -16,19 +16,23 @@ providers:
max_tokens: ${env.VLLM_MAX_TOKENS:=4096}
api_token: ${env.VLLM_API_TOKEN:=fake}
tls_verify: ${env.VLLM_TLS_VERIFY:=true}
immutable: false
- provider_id: sentence-transformers
provider_type: inline::sentence-transformers
config: {}
immutable: false
vector_io:
- provider_id: ${env.ENABLE_CHROMADB:+chromadb}
provider_type: remote::chromadb
config:
url: ${env.CHROMADB_URL:=}
immutable: false
safety:
- provider_id: llama-guard
provider_type: inline::llama-guard
config:
excluded_categories: []
immutable: false
agents:
- provider_id: meta-reference
provider_type: inline::meta-reference
@ -47,6 +51,7 @@ providers:
db: ${env.POSTGRES_DB:=llamastack}
user: ${env.POSTGRES_USER:=llamastack}
password: ${env.POSTGRES_PASSWORD:=llamastack}
immutable: false
telemetry:
- provider_id: meta-reference
provider_type: inline::meta-reference
@ -54,23 +59,28 @@ providers:
service_name: ${env.OTEL_SERVICE_NAME:=}
sinks: ${env.TELEMETRY_SINKS:=console,otel_trace}
otel_trace_endpoint: ${env.OTEL_TRACE_ENDPOINT:=http://localhost:4318/v1/traces}
immutable: false
tool_runtime:
- provider_id: brave-search
provider_type: remote::brave-search
config:
api_key: ${env.BRAVE_SEARCH_API_KEY:=}
max_results: 3
immutable: false
- provider_id: tavily-search
provider_type: remote::tavily-search
config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3
immutable: false
- provider_id: rag-runtime
provider_type: inline::rag-runtime
config: {}
immutable: false
- provider_id: model-context-protocol
provider_type: remote::model-context-protocol
config: {}
immutable: false
metadata_store:
type: postgres
host: ${env.POSTGRES_HOST:=localhost}