Skip to content

Commit 6864469

Browse files
committed
Merge branch 'main' into 0928-yuluo/feat-mermaid-1
2 parents d803b06 + 9868dbb commit 6864469

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+3142
-468
lines changed

.github/workflows/docker-publish.yml

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Create and publish Docker image for extproc
1+
name: Create and publish Docker images
22

33
on:
44
workflow_dispatch:
@@ -18,7 +18,7 @@ on:
1818
branches: [ "main" ]
1919

2020
jobs:
21-
build_and_push:
21+
build_and_push_extproc:
2222
runs-on: ubuntu-latest
2323
permissions:
2424
contents: read
@@ -43,7 +43,7 @@ jobs:
4343
- name: Set lowercase repository owner
4444
run: echo "REPOSITORY_OWNER_LOWER=$(echo $GITHUB_REPOSITORY_OWNER | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
4545

46-
- name: Build and push Docker image
46+
- name: Build and push extproc Docker image
4747
uses: docker/build-push-action@v5
4848
with:
4949
context: .
@@ -52,3 +52,45 @@ jobs:
5252
tags: |
5353
${{ inputs.is_nightly == true && format('ghcr.io/{0}/semantic-router/extproc:nightly-{1}', env.REPOSITORY_OWNER_LOWER, steps.date.outputs.date_tag) || format('ghcr.io/{0}/semantic-router/extproc:{1}', env.REPOSITORY_OWNER_LOWER, github.sha) }}
5454
${{ inputs.is_nightly != true && format('ghcr.io/{0}/semantic-router/extproc:latest', env.REPOSITORY_OWNER_LOWER) || '' }}
55+
56+
build_and_push_llm_katan:
57+
runs-on: ubuntu-latest
58+
permissions:
59+
contents: read
60+
packages: write
61+
62+
steps:
63+
- name: Check out the repo
64+
uses: actions/checkout@v4
65+
66+
- name: Log in to GitHub Container Registry
67+
uses: docker/login-action@v3
68+
with:
69+
registry: ghcr.io
70+
username: ${{ github.actor }}
71+
password: ${{ secrets.GITHUB_TOKEN }}
72+
73+
- name: Generate date tag for nightly builds
74+
id: date
75+
if: inputs.is_nightly == true
76+
run: echo "date_tag=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
77+
78+
- name: Set lowercase repository owner
79+
run: echo "REPOSITORY_OWNER_LOWER=$(echo $GITHUB_REPOSITORY_OWNER | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
80+
81+
- name: Extract version from pyproject.toml
82+
id: version
83+
run: |
84+
VERSION=$(grep '^version = ' e2e-tests/llm-katan/pyproject.toml | sed 's/version = "\(.*\)"/\1/')
85+
echo "version=$VERSION" >> $GITHUB_OUTPUT
86+
87+
- name: Build and push llm-katan Docker image
88+
uses: docker/build-push-action@v5
89+
with:
90+
context: ./e2e-tests/llm-katan
91+
file: ./e2e-tests/llm-katan/Dockerfile
92+
push: ${{ github.event_name != 'pull_request' }} # Only push on merge to main, not on PRs
93+
tags: |
94+
${{ inputs.is_nightly == true && format('ghcr.io/{0}/semantic-router/llm-katan:nightly-{1}', env.REPOSITORY_OWNER_LOWER, steps.date.outputs.date_tag) || format('ghcr.io/{0}/semantic-router/llm-katan:{1}', env.REPOSITORY_OWNER_LOWER, github.sha) }}
95+
${{ inputs.is_nightly != true && format('ghcr.io/{0}/semantic-router/llm-katan:latest', env.REPOSITORY_OWNER_LOWER) || '' }}
96+
${{ inputs.is_nightly != true && format('ghcr.io/{0}/semantic-router/llm-katan:v{1}', env.REPOSITORY_OWNER_LOWER, steps.version.outputs.version) || '' }}

.github/workflows/docker-release.yml

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
name: Create and publish Docker release image
1+
name: Create and publish Docker release images
22

33
on:
44
push:
55
tags:
66
- 'v*' # Triggers on version tags like v1.0.0, v2.1.3, etc.
77

88
jobs:
9-
build_and_push:
9+
build_and_push_extproc:
1010
runs-on: ubuntu-latest
1111
permissions:
1212
contents: read
@@ -30,7 +30,7 @@ jobs:
3030
username: ${{ github.actor }}
3131
password: ${{ secrets.GITHUB_TOKEN }}
3232

33-
- name: Build and push Docker image
33+
- name: Build and push extproc Docker image
3434
uses: docker/build-push-action@v5
3535
with:
3636
context: .
@@ -39,3 +39,44 @@ jobs:
3939
tags: |
4040
ghcr.io/${{ env.REPOSITORY_OWNER_LOWER }}/semantic-router/extproc:${{ steps.extract_tag.outputs.tag }}
4141
ghcr.io/${{ env.REPOSITORY_OWNER_LOWER }}/semantic-router/extproc:latest
42+
43+
build_and_push_llm_katan:
44+
runs-on: ubuntu-latest
45+
permissions:
46+
contents: read
47+
packages: write
48+
49+
steps:
50+
- name: Check out the repo
51+
uses: actions/checkout@v4
52+
53+
- name: Extract tag name
54+
id: extract_tag
55+
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
56+
57+
- name: Set lowercase repository owner
58+
run: echo "REPOSITORY_OWNER_LOWER=$(echo $GITHUB_REPOSITORY_OWNER | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
59+
60+
- name: Log in to GitHub Container Registry
61+
uses: docker/login-action@v3
62+
with:
63+
registry: ghcr.io
64+
username: ${{ github.actor }}
65+
password: ${{ secrets.GITHUB_TOKEN }}
66+
67+
- name: Extract version from pyproject.toml
68+
id: version
69+
run: |
70+
VERSION=$(grep '^version = ' e2e-tests/llm-katan/pyproject.toml | sed 's/version = "\(.*\)"/\1/')
71+
echo "version=$VERSION" >> $GITHUB_OUTPUT
72+
73+
- name: Build and push llm-katan Docker image
74+
uses: docker/build-push-action@v5
75+
with:
76+
context: ./e2e-tests/llm-katan
77+
file: ./e2e-tests/llm-katan/Dockerfile
78+
push: true
79+
tags: |
80+
ghcr.io/${{ env.REPOSITORY_OWNER_LOWER }}/semantic-router/llm-katan:${{ steps.extract_tag.outputs.tag }}
81+
ghcr.io/${{ env.REPOSITORY_OWNER_LOWER }}/semantic-router/llm-katan:v${{ steps.version.outputs.version }}
82+
ghcr.io/${{ env.REPOSITORY_OWNER_LOWER }}/semantic-router/llm-katan:latest

.github/workflows/test-and-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272

7373
- name: Install HuggingFace CLI
7474
run: |
75-
pip install -U "huggingface_hub[cli]"
75+
pip install -U "huggingface_hub[cli]" hf_transfer
7676
7777
7878
- name: Download models (minimal on PRs)

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ _run:
1414
-f tools/make/milvus.mk \
1515
-f tools/make/models.mk \
1616
-f tools/make/pre-commit.mk \
17+
-f tools/make/docker.mk \
18+
-f tools/make/kube.mk \
1719
$(MAKECMDGOALS)
1820

1921
.PHONY: _run

config/envoy-docker.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static_resources:
3131
upstream_local_address: "%UPSTREAM_LOCAL_ADDRESS%"
3232
request_id: "%REQ(X-REQUEST-ID)%"
3333
selected_model: "%REQ(X-SELECTED-MODEL)%"
34-
selected_endpoint: "%REQ(X-SEMANTIC-DESTINATION-ENDPOINT)%"
34+
selected_endpoint: "%REQ(X-GATEWAY-DESTINATION-ENDPOINT)%"
3535
route_config:
3636
name: local_route
3737
virtual_hosts:
@@ -106,7 +106,7 @@ static_resources:
106106
lb_policy: CLUSTER_PROVIDED
107107
original_dst_lb_config:
108108
use_http_header: true
109-
http_header_name: "x-semantic-destination-endpoint"
109+
http_header_name: "x-gateway-destination-endpoint"
110110
typed_extension_protocol_options:
111111
envoy.extensions.upstreams.http.v3.HttpProtocolOptions:
112112
"@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions

config/envoy.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static_resources:
3131
upstream_local_address: "%UPSTREAM_LOCAL_ADDRESS%"
3232
request_id: "%REQ(X-REQUEST-ID)%"
3333
selected_model: "%REQ(X-SELECTED-MODEL)%"
34-
selected_endpoint: "%REQ(X-SEMANTIC-DESTINATION-ENDPOINT)%"
34+
selected_endpoint: "%REQ(X-GATEWAY-DESTINATION-ENDPOINT)%"
3535
route_config:
3636
name: local_route
3737
virtual_hosts:
@@ -106,7 +106,7 @@ static_resources:
106106
lb_policy: CLUSTER_PROVIDED
107107
original_dst_lb_config:
108108
use_http_header: true
109-
http_header_name: "x-semantic-destination-endpoint"
109+
http_header_name: "x-gateway-destination-endpoint"
110110
typed_extension_protocol_options:
111111
envoy.extensions.upstreams.http.v3.HttpProtocolOptions:
112112
"@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions

0 commit comments

Comments
 (0)