Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2031297
Auto-merge main back to develop post release
estohlmann Oct 8, 2025
a5036de
adding access denied page when required "user" group is set and user …
estohlmann Oct 9, 2025
d101c5c
Don't return VPC gateways when looking one up
estohlmann Oct 9, 2025
996485a
Add Nix flake for development environment configuration (#506)
dustins Oct 14, 2025
b5603ad
gpt oss compatability
batzela Oct 14, 2025
3ebc5cf
Add mcp image override
bedanley Oct 15, 2025
18bc5e2
Allow MCP Image overrides
bedanley Oct 17, 2025
b686bb6
Move MCP to separate stack (#525)
bedanley Oct 27, 2025
b8d459d
updated flake
dustins Oct 27, 2025
e4b3565
Improve MCP Workbench UX with tool validation, error display, and the…
dustins Oct 27, 2025
f0797ac
Feature/mcp stack tests
bedanley Oct 28, 2025
d097498
Update scaling to cluster level (#532)
bedanley Oct 28, 2025
51f73aa
Update make BASE_URL
bedanley Oct 28, 2025
5a71df4
Add function name validation (#533)
bedanley Nov 4, 2025
efa19df
Add offline/air-gapped deployment support for REST API and MCP Workbe…
dustins Nov 4, 2025
52e3257
Feature - bedrock guardrails
estohlmann Nov 6, 2025
5857f8e
added defaults to fix issue of copying the wrong thing for nodeenv
dustins Nov 6, 2025
0040d2e
guardrails table relocation
jmharold Nov 6, 2025
7d52bb9
add applyGuardrail permission
Nov 6, 2025
ee23b3b
Updating version for release v5.4.0
estohlmann Nov 7, 2025
7e14b8d
Merge branch 'main' into release/v5.4.0
estohlmann Nov 7, 2025
cadaa80
changelog
estohlmann Nov 7, 2025
8593af9
guardrails documentation
jmharold Nov 7, 2025
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 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
6 changes: 6 additions & 0 deletions .github/workflows/code.release.branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ jobs:
echo ${RELEASE_TAG:1} > VERSION
# Update package-lock.json to reflect new version
npm install
# Regenerate CDK baselines from MockApp
echo "📝 Regenerating CDK baselines..."
rm -rf test/cdk/stacks/__baselines__
mkdir -p test/cdk/stacks/__baselines__
npm test -- test/cdk/stacks/snapshot.test.ts --testNamePattern="is compatible with baseline"
echo "✅ CDK baselines regenerated"
# Add the generated PR description to the top of CHANGELOG.md
echo "📝 Adding release notes to CHANGELOG.md..."
# Create a temporary file with the new content
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ jobs:
fi
pip install -e ./lisa-sdk
- name: Run tests
env:
ACCOUNT_NUMBER: '012345678901'
REGION: us-east-1
run: |
make test-coverage
pre-commit:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.direnv
*.js
!tailwind.config.js
!postcss.config.js
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ repos:
hooks:
- id: bandit
args: [--recursive, -c=pyproject.toml]
additional_dependencies: ['bandit[toml]', 'pbr']
additional_dependencies: ['bandit[toml]', 'pbr', 'PyYAML']

- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
exclude: (?x)^(
.*.ipynb|config.yaml|.*.md|.*test.*.py
.*.ipynb|config.yaml|.*.md|.*test.*.py|test/cdk/stacks/__baselines__/.*\.json
)$

- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down
38 changes: 37 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
# v5.4.0

## Key Features

### Bedrock Guardrails Integration
LISA Administrators can now Bedrock Guardrails to any models via the Model Management page or API
- **Comprehensive Protection**: Integrated with Bedrock Guardrails through LiteLLM's proxy support of the ApplyGuardrail API, enabling guardrails during prompt input, response generation, and prompt output.
- **Advanced Capabilities**: Supports topic denial, word filtering, sensitive information limitation, contextual grounding checks, and automated reasoning for factual accuracy.
- **Flexible Administration**: Administrators can apply Guardrails to any LISA model (self hosted or 3rd party) via the Model Management UI or API, with customizable permissions for different user groups.
- **Adaptive Policies**: Guardrails and group permissions can be updated anytime to evolve content moderation alongside organizational needs.

### Offline/Air-gapped Deployment Support
Enhanced the platform to support offline and air-gapped deployments by enabling pre-caching of external dependencies for the REST API and MCP Workbench.
- **Nodeenv Pre-caching**: Added support for pre-caching the required nodeenv in the REST API container to enable offline deployments.
- **Offline Deployment**: Enabled configuration of pre-cached external dependencies for the MCP Workbench via to support offline and air-gapped deployments.

### MCP Workbench Refactoring
Migrated the MCP Workbench deployment to use the shared LisaServe ECS cluster, improving modularity and enabling conditional deployment.
- **MCP Workbench Stack**: Created a dedicated stack that deploys the MCP Workbench as a separate ECS service on the shared cluster.
- **Conditional Deployment**: Introduced a configuration flag to control the optional deployment of the MCP Workbench.
- **Container Overrides**: Added support for overriding the MCP Workbench container image during deployment..

### MCP Workbench UX Improvements
Enhanced the user experience of the MCP Workbench with tool validation, error display, and theme support.
- **Validation**: Implemented tool validation to improve the user experience.
- **Theming**: Introduced theme support for the MCP Workbench UI.

## Acknowledgements
* @batzela
* @bedanley
* @dustins
* @estohlmann
* @jmharold

**Full Changelog**: https://github.com/awslabs/LISA/compare/v5.3.2..v5.4.0

# v5.3.2

## Key Features
Expand All @@ -20,7 +56,7 @@ This release includes updates to our [documentation site](https://awslabs.github

## Acknowledgements
* @bedanley
* @dustinps
* @dustins
* @estohlmann
* @jmharold

Expand Down
72 changes: 28 additions & 44 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,30 @@ PROJECT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
HEADLESS = false
DOCKER_CMD ?= $(or $(CDK_DOCKER),docker)

# Function to read config with fallback to base config and default value
# Usage: VAR := $(call get_config,property,default_value)
define get_config
$(shell test -f $(PROJECT_DIR)/config-custom.yaml && yq -r $(1) $(PROJECT_DIR)/config-custom.yaml 2>/dev/null | grep -v '^null$$' || \
(test -f $(PROJECT_DIR)/config-base.yaml && yq -r $(1) $(PROJECT_DIR)/config-base.yaml 2>/dev/null | grep -v '^null$$') || \
echo "$(2)")
endef

# PROFILE (optional argument)
ifeq (${PROFILE},)
TEMP_PROFILE := $(shell cat $(PROJECT_DIR)/config-custom.yaml | yq .profile)
ifneq ($(TEMP_PROFILE), null)
PROFILE := ${TEMP_PROFILE}
else
$(warning profile is not set in the command line using PROFILE variable or config files, attempting deployment without this variable)
PROFILE := $(call get_config,.profile,)
ifeq ($(PROFILE),)
$(warning profile is not set in command line using PROFILE variable or config files, attempting deployment without this variable)
endif
endif

# DEPLOYMENT_NAME
ifeq (${DEPLOYMENT_NAME},)
DEPLOYMENT_NAME := $(shell cat $(PROJECT_DIR)/config-custom.yaml | yq .deploymentName)
endif

ifeq (${DEPLOYMENT_NAME}, null)
DEPLOYMENT_NAME := $(shell cat $(PROJECT_DIR)/config-base.yaml | yq .deploymentName)
endif

ifeq (${DEPLOYMENT_NAME}, null)
DEPLOYMENT_NAME := prod
DEPLOYMENT_NAME := $(call get_config,.deploymentName,prod)
endif

# ACCOUNT_NUMBER
ifeq (${ACCOUNT_NUMBER},)
ACCOUNT_NUMBER := $(shell cat $(PROJECT_DIR)/config-custom.yaml | yq .accountNumber)
ACCOUNT_NUMBER := $(call get_config,.accountNumber,)
endif

ifeq (${ACCOUNT_NUMBER},)
Expand All @@ -48,18 +45,16 @@ endif

# REGION
ifeq (${REGION},)
REGION := $(shell cat $(PROJECT_DIR)/config-custom.yaml | yq .region)
REGION := $(call get_config,.region,)
endif

ifeq (${REGION},)
$(error region must be set in command line using REGION variable or config files)
endif

# PARTITION
ifeq (${PARTITION},)
PARTITION := $(shell cat $(PROJECT_DIR)/config-custom.yaml | yq .partition )
endif
ifeq (${PARTITION}, null)
PARTITION := aws
PARTITION := $(call get_config,.partition,aws)
endif

# DOMAIN - used for the docker login
Expand All @@ -76,29 +71,13 @@ endif
# Arguments defined through config files

# APP_NAME
APP_NAME := $(shell cat $(PROJECT_DIR)/config-custom.yaml | yq .appName)
ifeq (${APP_NAME}, null)
APP_NAME := $(shell cat $(PROJECT_DIR)/config-base.yaml | yq .appName)
endif

ifeq (${APP_NAME}, null)
APP_NAME := lisa
endif
APP_NAME := $(call get_config,.appName,lisa)

# DEPLOYMENT_STAGE
DEPLOYMENT_STAGE := $(shell cat $(PROJECT_DIR)/config-custom.yaml | yq .deploymentStage)
ifeq (${DEPLOYMENT_STAGE}, null)
DEPLOYMENT_STAGE := $(shell cat $(PROJECT_DIR)/config-base.yaml | yq .deploymentStage)
endif

ifeq (${DEPLOYMENT_STAGE}, null)
DEPLOYMENT_STAGE := prod
endif
DEPLOYMENT_STAGE := $(call get_config,.deploymentStage,prod)

# ACCOUNT_NUMBERS_ECR - AWS account numbers that need to be logged into with Docker CLI to use ECR
ifneq ($(shell cat $(PROJECT_DIR)/config-custom.yaml | yq '.accountNumbersEcr'), null)
ACCOUNT_NUMBERS_ECR := $(shell cat $(PROJECT_DIR)/config-custom.yaml | yq .accountNumbersEcr[])
endif
ACCOUNT_NUMBERS_ECR := $(shell test -f $(PROJECT_DIR)/config-custom.yaml && yq '.accountNumbersEcr[]' $(PROJECT_DIR)/config-custom.yaml 2>/dev/null || echo "")

# Append deployed account number to array for dockerLogin rule
ACCOUNT_NUMBERS_ECR := $(ACCOUNT_NUMBERS_ECR) $(ACCOUNT_NUMBER)
Expand All @@ -113,13 +92,18 @@ ifneq ($(findstring $(DEPLOYMENT_STAGE),$(STACK)),$(DEPLOYMENT_STAGE))
endif

# MODEL_IDS - IDs of models to deploy
ifneq ($(shell cat $(PROJECT_DIR)/config-custom.yaml | yq '.ecsModels'), null)
MODEL_IDS := $(shell cat $(PROJECT_DIR)/config-custom.yaml | yq '.ecsModels[].modelName')
endif
MODEL_IDS := $(shell test -f $(PROJECT_DIR)/config-custom.yaml && yq '.ecsModels[].modelName' $(PROJECT_DIR)/config-custom.yaml 2>/dev/null || echo "")

# MODEL_BUCKET - S3 bucket containing model artifacts
MODEL_BUCKET := $(shell cat $(PROJECT_DIR)/config-custom.yaml | yq '.s3BucketModels')
MODEL_BUCKET := $(call get_config,.s3BucketModels,)

# BASE_URL - Base URL for web UI assets based on domain name and deployment stage
DOMAIN_NAME := $(call get_config,.apiGatewayConfig.domainName,)
ifeq ($(DOMAIN_NAME),)
BASE_URL := /$(DEPLOYMENT_STAGE)/
else
BASE_URL := /
endif

#################################################################################
# COMMANDS #
Expand Down Expand Up @@ -269,7 +253,7 @@ listStacks:
@npx cdk list

buildNpmModules:
npm run build
BASE_URL=$(BASE_URL) npm run build

buildArchive:
BUILD_ASSETS=true npm run build
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.3.2
5.4.0
18 changes: 18 additions & 0 deletions bin/build-images
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ ecr_login() {
fi
}

# Function to check if a config parameter is enabled (defaults to true if not present)
should_build_image() {
local param="$1"
local value=$(yq ".${param}" "$ROOT/custom-config.yaml" 2>/dev/null)
[[ "$value" != "false" ]]
}

# Main function to build all images
build_all_images() {
echo "Starting Docker image builds..."
Expand Down Expand Up @@ -117,6 +124,17 @@ build_all_images() {
rsync -av --exclude='__pycache__' ./lambda/ "$BUILD_DIR/"
build_image "Dockerfile" "lisa-batch-ingestion" "$LISA_VERSION" "$RAG_DIR" "NODE_ENV=production"

# lisa-mcp-workbench (conditional)
if should_build_image "deployMcpWorkbench"; then
MCP_DIR="./lib/serve/mcp-workbench"
build_image "Dockerfile" "lisa-mcp-workbench" "$LISA_VERSION" "$MCP_DIR" \
"NODE_ENV=production" \
"BASE_IMAGE=python:3.13.7-slim"
else
echo "deployMcpWorkbench is disabled, skipping lisa-mcp-workbench build"
echo ""
fi

# lisa-tei
build_image "Dockerfile" "lisa-tei" "latest" "./lib/serve/ecs-model/embedding/tei" \
"NODE_ENV=production" \
Expand Down
3 changes: 2 additions & 1 deletion ecs_model_deployer/src/lib/ecsCluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ export class ECSCluster extends Construct {
environment,
logging: LogDriver.awsLogs({ streamPrefix: identifier }),
gpuCount: Ec2Metadata.get(ecsConfig.instanceType).gpuCount,
memoryReservationMiB: Ec2Metadata.get(ecsConfig.instanceType).memory - ecsConfig.containerMemoryBuffer,
memoryReservationMiB: taskDefinition.containerConfig.memoryReservation ??
(Ec2Metadata.get(ecsConfig.instanceType).memory - ecsConfig.containerMemoryBuffer),
portMappings: [{ hostPort: 80, containerPort: 8080, protocol: Protocol.TCP }],
healthCheck: containerHealthCheck,
// Model containers need to run with privileged set to true
Expand Down
3 changes: 2 additions & 1 deletion ecs_model_deployer/src/lib/lisa_model_stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ export class LisaModelStack extends Stack {
super(scope, id, props);

const vpc = Vpc.fromLookup(this, `${id}-vpc`, {
vpcId: props.vpcId
vpcId: props.vpcId,
returnVpnGateways: false,
});

let subnetSelection: SubnetSelection | undefined;
Expand Down
36 changes: 19 additions & 17 deletions eslint.config.js → eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -142,30 +142,32 @@ export default [
},
{
ignores: [
'dist/**',
'node_modules/**',
'**/*.bundle.js',
'**/*.d.ts',
'**/*.min.js',
'**/.venv/**',
'**/build/**',
'**/coverage/**',
'**/dist/**',
'**/venv/**',
'*.bundle.js',
'*.min.js',
'.venv/**',
'build/**',
'coverage/**',
'cypress/dist/**',
'dist/**',
'ecs_model_deployer/dist/**',
'htmlcov/**',
'lib/docs/.vitepress/cache/**',
'lib/docs/dist/**',
'lib/user-interface/react/dist/**',
'lib/user-interface/react/public/**',
'lib/docs/dist/**',
'lib/docs/.vitepress/cache/**',
'ecs_model_deployer/dist/**',
'node_modules/**',
'pnpm-lock.yaml',
'pnpm-workspace.yaml',
'vector_store_deployer/dist/**',
'cypress/dist/**',
'.venv/**',
'venv/**',
'*.min.js',
'*.bundle.js',
'**/*.min.js',
'**/*.bundle.js',
'**/dist/**',
'**/build/**',
'**/coverage/**',
'**/.venv/**',
'**/venv/**',
'**/*.d.ts'
]
}
];
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading