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
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,48 @@ jobs:
- name: Run tests
run: make -C packages/ai-providers/server-ai-openai test

server-ai-bedrock-linux:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/ci
with:
workspace_path: packages/ai-providers/server-ai-bedrock
python_version: ${{ matrix.python-version }}

- uses: ./.github/actions/build
with:
workspace_path: packages/ai-providers/server-ai-bedrock

server-ai-bedrock-windows:
runs-on: windows-latest
defaults:
run:
shell: powershell

strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v4

- name: Set up uv
uses: astral-sh/setup-uv@6ee6290f1cbc4156c0bdd66691b2c144ef8df19a # v7.4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: make -C packages/ai-providers/server-ai-bedrock install

- name: Run tests
run: make -C packages/ai-providers/server-ai-bedrock test

server-ai-optimization-linux:
runs-on: ubuntu-latest
strategy:
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ on:
- packages/sdk/server-ai
- packages/ai-providers/server-ai-langchain
- packages/ai-providers/server-ai-openai
- packages/ai-providers/server-ai-bedrock
- packages/optimization
dry_run:
description: 'Is this a dry run. If so no package will be published.'
Expand All @@ -47,6 +48,8 @@ jobs:
package-server-ai-langchain-tag-name: ${{ steps.release.outputs['packages/ai-providers/server-ai-langchain--tag_name'] }}
package-server-ai-openai-released: ${{ steps.release.outputs['packages/ai-providers/server-ai-openai--release_created'] }}
package-server-ai-openai-tag-name: ${{ steps.release.outputs['packages/ai-providers/server-ai-openai--tag_name'] }}
package-server-ai-bedrock-released: ${{ steps.release.outputs['packages/ai-providers/server-ai-bedrock--release_created'] }}
package-server-ai-bedrock-tag-name: ${{ steps.release.outputs['packages/ai-providers/server-ai-bedrock--tag_name'] }}
package-server-ai-optimization-released: ${{ steps.release.outputs['packages/optimization--release_created'] }}
package-server-ai-optimization-tag-name: ${{ steps.release.outputs['packages/optimization--tag_name'] }}
steps:
Expand Down Expand Up @@ -193,6 +196,42 @@ jobs:
password: ${{ env.PYPI_AUTH_TOKEN }}
packages-dir: packages/ai-providers/server-ai-openai/dist/

release-server-ai-bedrock:
runs-on: ubuntu-latest
needs: ['release-please']
permissions:
id-token: write # Needed for OIDC to get release secrets from AWS.
attestations: write # Needed for actions/attest.
if: ${{ needs.release-please.outputs.package-server-ai-bedrock-released == 'true' }}
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/ci
with:
workspace_path: packages/ai-providers/server-ai-bedrock

- uses: ./.github/actions/build
id: build
with:
workspace_path: packages/ai-providers/server-ai-bedrock

- name: Attest build provenance
uses: actions/attest@v4
with:
subject-path: 'packages/ai-providers/server-ai-bedrock/dist/*'

- uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.2.0
name: 'Get PyPI token'
with:
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
ssm_parameter_pairs: '/production/common/releasing/pypi/token = PYPI_AUTH_TOKEN'

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
with:
password: ${{ env.PYPI_AUTH_TOKEN }}
packages-dir: packages/ai-providers/server-ai-bedrock/dist/

release-server-ai-optimization:
runs-on: ubuntu-latest
needs: ['release-please']
Expand Down
1 change: 1 addition & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"packages/sdk/server-ai": "1.0.1",
"packages/ai-providers/server-ai-langchain": "0.8.0",
"packages/ai-providers/server-ai-openai": "0.7.0",
"packages/ai-providers/server-ai-bedrock": "0.1.0",
"packages/optimization": "0.1.0"
}
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ BUILDDIR = $(SOURCEDIR)/build
SERVER_AI_PKG = packages/sdk/server-ai
LANGCHAIN_PKG = packages/ai-providers/server-ai-langchain
OPENAI_PKG = packages/ai-providers/server-ai-openai
BEDROCK_PKG = packages/ai-providers/server-ai-bedrock

.PHONY: help
help: #! Show this help message
Expand Down Expand Up @@ -38,6 +39,10 @@ install-langchain: #! Install langchain provider package
install-openai: #! Install openai provider package
$(MAKE) -C $(OPENAI_PKG) install

.PHONY: install-bedrock
install-bedrock: #! Install bedrock provider package
$(MAKE) -C $(BEDROCK_PKG) install

#
# Quality control checks
#
Expand All @@ -47,6 +52,7 @@ test: #! Run unit tests for all packages
$(MAKE) test-server-ai
$(MAKE) test-langchain
$(MAKE) test-openai
$(MAKE) test-bedrock

.PHONY: test-server-ai
test-server-ai: #! Run unit tests for server-ai package
Expand All @@ -60,11 +66,16 @@ test-langchain: #! Run unit tests for langchain provider package
test-openai: #! Run unit tests for openai provider package
$(MAKE) -C $(OPENAI_PKG) test

.PHONY: test-bedrock
test-bedrock: #! Run unit tests for bedrock provider package
$(MAKE) -C $(BEDROCK_PKG) test

.PHONY: lint
lint: #! Run type analysis and linting checks for all packages
$(MAKE) lint-server-ai
$(MAKE) lint-langchain
$(MAKE) lint-openai
$(MAKE) lint-bedrock

.PHONY: lint-server-ai
lint-server-ai: #! Run type analysis and linting checks for server-ai package
Expand All @@ -78,6 +89,10 @@ lint-langchain: #! Run type analysis and linting checks for langchain provider p
lint-openai: #! Run type analysis and linting checks for openai provider package
$(MAKE) -C $(OPENAI_PKG) lint

.PHONY: lint-bedrock
lint-bedrock: #! Run type analysis and linting checks for bedrock provider package
$(MAKE) -C $(BEDROCK_PKG) lint

#
# Build targets
#
Expand All @@ -87,6 +102,7 @@ build: #! Build all packages
$(MAKE) build-server-ai
$(MAKE) build-langchain
$(MAKE) build-openai
$(MAKE) build-bedrock

.PHONY: build-server-ai
build-server-ai: #! Build server-ai package
Expand All @@ -100,6 +116,10 @@ build-langchain: #! Build langchain provider package
build-openai: #! Build openai provider package
$(MAKE) -C $(OPENAI_PKG) build

.PHONY: build-bedrock
build-bedrock: #! Build bedrock provider package
$(MAKE) -C $(BEDROCK_PKG) build

#
# Documentation generation
#
Expand Down
29 changes: 29 additions & 0 deletions packages/ai-providers/server-ai-bedrock/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
PYTEST_FLAGS=-W error::SyntaxWarning

.PHONY: help
help: #! Show this help message
@echo 'Usage: make [target] ... '
@echo ''
@echo 'Targets:'
@grep -h -F '#!' $(MAKEFILE_LIST) | grep -v grep | sed 's/:.*#!/:/' | column -t -s":"

.PHONY: install
install: #! Install package dependencies
uv sync --all-groups

.PHONY: test
test: #! Run unit tests
test: install
uv run pytest $(PYTEST_FLAGS)

.PHONY: lint
lint: #! Run type analysis and linting checks
lint: install
uv run mypy src/ldai_bedrock
uv run isort --check --atomic src/ldai_bedrock
uv run pycodestyle src/ldai_bedrock

.PHONY: build
build: #! Build distribution files
build: install
uv build --out-dir dist
Loading
Loading