Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/_build-engine-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ on:
smg_commit:
description: 'SMG commit/ref ("latest" for HEAD)'
required: false
default: 'v1.1.0'
default: 'v1.2.0'
Comment on lines 32 to +35

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Call sites for _build-engine-image and smg_commit =="
rg -n -C3 'uses:\s*\.\/\.github\/workflows\/_build-engine-image\.yml|smg_commit:' .github/workflows

echo
echo "== SMG_COMMIT handling in docker/engine.Dockerfile =="
if [ -f docker/engine.Dockerfile ]; then
  rg -n -C3 'ARG\s+SMG_COMMIT|SMG_COMMIT|git\s+(clone|checkout|fetch)' docker/engine.Dockerfile
else
  echo "docker/engine.Dockerfile not found"
fi

Repository: lightseekorg/smg

Length of output: 278


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Call sites for _build-engine-image reusable workflow =="
rg -n '_build-engine-image' .github/workflows

echo
echo "== smg_commit input usage in callers =="
rg -n -C5 'smg_commit' .github/workflows

echo
echo "== SMG_COMMIT handling in docker/engine.Dockerfile =="
if [ -f docker/engine.Dockerfile ]; then
  rg -n 'SMG_COMMIT\|ARG SMG_COMMIT' docker/engine.Dockerfile
else
  echo "docker/engine.Dockerfile not found"
fi

Repository: lightseekorg/smg

Length of output: 12024


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Checking for docker/engine.Dockerfile =="
find . -name "engine.Dockerfile" -o -name "*engine*.Dockerfile" | head -20

echo
echo "== All Dockerfiles in docker/ directory =="
ls -la docker/ 2>/dev/null | grep -i dockerfile || echo "docker/ directory or Dockerfiles not found"

echo
echo "== Search for SMG_COMMIT in all Dockerfiles =="
find . -name "*.Dockerfile" -o -name "Dockerfile*" | xargs grep -l "SMG_COMMIT" 2>/dev/null || echo "SMG_COMMIT not found in any Dockerfile"

Repository: lightseekorg/smg

Length of output: 378


🏁 Script executed:

cat docker/engine.Dockerfile

Repository: lightseekorg/smg

Length of output: 2588


Don't pin smg_commit default to a release tag when auto-triggered on push to main.

Line 35 defaults to v1.2.0, and the caller workflows (release-vllm-docker.yml, release-trtllm-docker.yml, release-sglang-docker.yml) that invoke this reusable workflow also default to v1.2.0. When these workflows auto-trigger on push to main, the tag may not exist yet, causing docker/engine.Dockerfile to fail at git checkout v1.2.0. Use latest as the default to allow the Dockerfile to clone HEAD instead, and let release-tag callers pass the tag explicitly.

Suggested fix
-        default: 'v1.2.0'
+        default: 'latest'

Note: The same timing risk exists in the caller workflows themselves (release-vllm-docker.yml, release-trtllm-docker.yml, release-sglang-docker.yml), which also default smg_commit to v1.2.0.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
smg_commit:
description: 'SMG commit/ref ("latest" for HEAD)'
required: false
default: 'v1.1.0'
default: 'v1.2.0'
smg_commit:
description: 'SMG commit/ref ("latest" for HEAD)'
required: false
default: 'latest'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/_build-engine-image.yml around lines 32 - 35, Change the
smg_commit input default from 'v1.2.0' to 'latest' so auto-triggered runs on
push use HEAD instead of a potentially-nonexistent release tag; update the input
declaration for smg_commit in this reusable workflow (the "smg_commit" input
block) to default: 'latest', and also mirror this change or ensure explicit tag
passing in the caller workflows (release-vllm-docker.yml,
release-trtllm-docker.yml, release-sglang-docker.yml) so release-tagged runs can
still supply a fixed tag.

type: string
tag:
description: 'Override image tag'
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/release-sglang-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ run-name: >-
SMG+SGLang |
base=${{ inputs.base_image_ref || 'lmsysorg/sglang:v0.5.9' }} |
engine=${{ inputs.sglang_commit || 'latest' }} |
smg=${{ inputs.smg_commit || 'v1.1.0' }} |
smg=${{ inputs.smg_commit || 'v1.2.0' }} |
by @${{ github.actor }}

on:
push:
branches: [main]
paths:
- bindings/python/pyproject.toml
pull_request:
branches: [main]
paths:
Expand Down Expand Up @@ -39,10 +43,10 @@ on:
smg_commit:
description: 'SMG commit/ref ("latest" for HEAD)'
required: false
default: 'v1.1.0'
default: 'v1.2.0'
type: string
tag:
description: 'Override image tag (e.g. v1.1.0-sglang-v0.5.9)'
description: 'Override image tag (e.g. v1.2.0-sglang-v0.5.9)'
required: false
type: string

Expand All @@ -55,7 +59,7 @@ jobs:
engine_repo: ${{ inputs.sglang_repo }}
engine_commit: ${{ inputs.sglang_commit || 'latest' }}
smg_repo: ${{ inputs.smg_repo || 'https://github.com/lightseekorg/smg' }}
smg_commit: ${{ inputs.smg_commit || 'v1.1.0' }}
smg_commit: ${{ inputs.smg_commit || 'v1.2.0' }}
tag: ${{ inputs.tag }}
dry_run: ${{ github.event_name == 'pull_request' }}
secrets: inherit
19 changes: 12 additions & 7 deletions .github/workflows/release-trtllm-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ run-name: >-
by @${{ github.actor }}

on:
push:
branches: [main]
paths:
- bindings/python/pyproject.toml
workflow_dispatch:
inputs:
base_image_ref:
description: 'Base image (e.g. nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc6). Empty = build from source.'
default: 'nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc6'
required: false
Comment on lines 18 to 20

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

In GitHub Actions, if a workflow_dispatch string input is intentionally left empty and the workflow passes ${{ inputs.base_image_ref || 'fallback' }}, does the expression resolve to fallback? What pattern preserves an empty manual input while still defaulting only for push-triggered runs?

💡 Result:

Yes. In GitHub Actions expressions, an empty string ("") is falsy, so ${{ inputs.base_image_ref || 'fallback' }} will resolve to 'fallback' when the manual workflow_dispatch input is intentionally cleared. [1]

To preserve an intentionally empty manual input, but still default for non-manual runs (e.g., push, where inputs are null/absent), use case():

base_image_ref: ${{ case(github.event_name == 'workflow_dispatch', inputs.base_image_ref, 'fallback') }}

case() returns the value for the first true predicate without treating "" as a reason to fall back, and only uses 'fallback' for non-workflow_dispatch events. [1], [2]


Keep the "build from source" path reachable on manual runs.

An empty workflow_dispatch input for base_image_ref is falsy and will trigger the fallback, preventing users from actually building from source as documented on line 18. Default only for push events, and pass manual inputs through unchanged.

Suggested fix
-      base_image_ref: ${{ inputs.base_image_ref || 'nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc6' }}
+      base_image_ref: ${{ case(github.event_name == 'workflow_dispatch', inputs.base_image_ref, 'nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc6') }}

Also applies to: 51-52

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release-trtllm-docker.yml around lines 18 - 20, The
workflow input base_image_ref currently has a default which makes an empty
manual input falsy and prevents "build from source"; change the logic so the
default value is used only for push events and manual runs accept an empty
string. Specifically, remove the unconditional default behavior for the workflow
input base_image_ref and in the places where it's consumed (referencing the
input name base_image_ref) use a conditional expression that uses the NVCR
default only when github.event_name == 'push' (e.g. github.event_name == 'push'
? 'nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc6' : inputs.base_image_ref) and
apply the same change for the second occurrence of base_image_ref to ensure
manual workflow_dispatch runs can pass an empty value to trigger building from
source.

type: string
trtllm_repo:
Expand All @@ -31,10 +36,10 @@ on:
smg_commit:
description: 'SMG commit/ref ("latest" for HEAD)'
required: false
default: 'v1.1.0'
default: 'v1.2.0'
type: string
tag:
description: 'Override image tag (e.g. v1.1.0-trtllm-1.3.0)'
description: 'Override image tag (e.g. v1.2.0-trtllm-1.3.0)'
required: false
type: string

Expand All @@ -43,12 +48,12 @@ jobs:
uses: ./.github/workflows/_build-engine-image.yml
with:
engine: trtllm
base_image_ref: ${{ inputs.base_image_ref }}
base_image_ref: ${{ inputs.base_image_ref || 'nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc6' }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep base_image_ref empty for TRTLLM source builds

Using inputs.base_image_ref || 'nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc6' makes it impossible to pass an empty base_image_ref from workflow_dispatch, even though this workflow documents “Empty = build from source.” In this repo, _build-engine-image.yml only takes the source-build path when inputs.base_image_ref == '', so manual runs that are supposed to build TRT-LLM from source will now always use the default base image and skip source builds.

Useful? React with 👍 / 👎.

engine_repo: ${{ inputs.trtllm_repo }}
engine_commit: ${{ inputs.trtllm_commit }}
smg_repo: ${{ inputs.smg_repo }}
smg_commit: ${{ inputs.smg_commit }}
engine_commit: ${{ inputs.trtllm_commit || 'latest' }}
smg_repo: ${{ inputs.smg_repo || 'https://github.com/lightseekorg/smg' }}
smg_commit: ${{ inputs.smg_commit || 'v1.2.0' }}
tag: ${{ inputs.tag }}
source_build_repo: ${{ inputs.trtllm_repo }}
source_build_ref: ${{ inputs.trtllm_commit }}
source_build_ref: ${{ inputs.trtllm_commit || 'latest' }}
secrets: inherit
20 changes: 12 additions & 8 deletions .github/workflows/release-vllm-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ run-name: >-
by @${{ github.actor }}

on:
push:
branches: [main]
paths:
- bindings/python/pyproject.toml
workflow_dispatch:
inputs:
base_image_ref:
description: 'Base image (e.g. vllm/vllm-openai:v0.16.0)'
default: 'vllm/vllm-openai:v0.16.0'
description: 'Base image (e.g. vllm/vllm-openai:v0.17.0)'
default: 'vllm/vllm-openai:v0.17.0'
required: true
type: string
vllm_repo:
Expand All @@ -32,10 +36,10 @@ on:
smg_commit:
description: 'SMG commit/ref ("latest" for HEAD)'
required: false
default: 'v1.1.0'
default: 'v1.2.0'
type: string
tag:
description: 'Override image tag (e.g. v1.1.0-vllm-v0.16.0)'
description: 'Override image tag (e.g. v1.2.0-vllm-v0.17.0)'
required: false
type: string

Expand All @@ -44,10 +48,10 @@ jobs:
uses: ./.github/workflows/_build-engine-image.yml
with:
engine: vllm
base_image_ref: ${{ inputs.base_image_ref }}
base_image_ref: ${{ inputs.base_image_ref || 'vllm/vllm-openai:v0.17.0' }}
engine_repo: ${{ inputs.vllm_repo }}
engine_commit: ${{ inputs.vllm_commit }}
smg_repo: ${{ inputs.smg_repo }}
smg_commit: ${{ inputs.smg_commit }}
engine_commit: ${{ inputs.vllm_commit || 'latest' }}
smg_repo: ${{ inputs.smg_repo || 'https://github.com/lightseekorg/smg' }}
smg_commit: ${{ inputs.smg_commit || 'v1.2.0' }}
tag: ${{ inputs.tag }}
secrets: inherit
24 changes: 12 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ resolver = "2"

[workspace.dependencies]
# Internal workspace crates
openai-protocol = { version = "1.2.0", path = "crates/protocols" }
reasoning-parser = { version = "1.2.0", path = "crates/reasoning_parser" }
tool-parser = { version = "1.1.1", path = "crates/tool_parser" }
wfaas = { version = "1.0.2", path = "crates/workflow" }
llm-tokenizer = { version = "1.2.0", path = "crates/tokenizer" }
openai-protocol = { version = "1.3.0", path = "crates/protocols" }
reasoning-parser = { version = "1.2.1", path = "crates/reasoning_parser" }
tool-parser = { version = "1.1.2", path = "crates/tool_parser" }
wfaas = { version = "1.0.3", path = "crates/workflow" }
llm-tokenizer = { version = "1.3.0", path = "crates/tokenizer" }
smg-auth = { version = "1.1.1", path = "crates/auth" }
smg-mcp = { version = "2.1.0", path = "crates/mcp" }
kv-index = { version = "1.0.1", path = "crates/kv_index" }
smg-data-connector = { version = "2.0.0", path = "crates/data_connector", package = "data-connector" }
llm-multimodal = { version = "1.2.0", path = "crates/multimodal" }
smg-wasm = { version = "1.0.1", path = "crates/wasm", package = "smg-wasm" }
smg-mesh = { version = "1.1.1", path = "crates/mesh", package = "smg-mesh" }
smg-grpc-client = { version = "1.2.0", path = "crates/grpc_client" }
smg-mcp = { version = "2.1.1", path = "crates/mcp" }
kv-index = { version = "1.1.0", path = "crates/kv_index" }
smg-data-connector = { version = "2.1.0", path = "crates/data_connector", package = "data-connector" }
llm-multimodal = { version = "1.3.0", path = "crates/multimodal" }
smg-wasm = { version = "1.1.0", path = "crates/wasm", package = "smg-wasm" }
smg-mesh = { version = "1.1.2", path = "crates/mesh", package = "smg-mesh" }
smg-grpc-client = { version = "1.3.0", path = "crates/grpc_client" }

# Shared dependencies
anyhow = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion bindings/golang/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "smg-golang"
version = "1.1.0"
version = "1.2.0"
edition = "2021"

[lib]
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "smg-python"
version = "1.1.0"
version = "1.2.0"
edition = "2021"

[lib]
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "maturin"

[project]
name = "smg"
version = "1.1.0"
version = "1.2.0"
description = "High-performance Rust-based inference gateway for large-scale LLM deployments"
authors = [
{name = "Simo Lin", email = "linsimo.mark@gmail.com"},
Expand Down
2 changes: 1 addition & 1 deletion crates/data_connector/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "data-connector"
version = "2.0.0"
version = "2.1.0"
edition = "2021"
description = "Storage backends for conversations and responses"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/grpc_client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "smg-grpc-client"
version = "1.2.0"
version = "1.3.0"
edition = "2021"
description = "gRPC clients for SGLang and vLLM backends"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/kv_index/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kv-index"
version = "1.0.1"
version = "1.1.0"
edition = "2021"
description = "Radix tree implementations for prefix matching and cache-aware routing"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/mcp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "smg-mcp"
version = "2.1.0"
version = "2.1.1"
edition = "2021"
description = "Model Context Protocol (MCP) client implementation"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/mesh/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "smg-mesh"
version = "1.1.1"
version = "1.1.2"
edition = "2021"
description = "Mesh gossip protocol and distributed state synchronization for Shepherd Model Gateway"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/multimodal/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "llm-multimodal"
version = "1.2.0"
version = "1.3.0"
edition = "2021"
description = "Multimodal processing for vision and other modalities"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/protocols/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "openai-protocol"
version = "1.2.0"
version = "1.3.0"
edition = "2021"
description = "OpenAI-compatible API protocol definitions and types"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/reasoning_parser/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "reasoning-parser"
version = "1.2.0"
version = "1.2.1"
edition = "2021"
description = "Parser for AI model reasoning/thinking outputs (chain-of-thought, etc.)"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/tokenizer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "llm-tokenizer"
version = "1.2.0"
version = "1.3.0"
edition = "2021"
description = "LLM tokenizer library with caching and chat template support"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/tool_parser/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tool-parser"
version = "1.1.1"
version = "1.1.2"
edition = "2021"
description = "Tool/function call parser for LLM model outputs"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/wasm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "smg-wasm"
version = "1.0.1"
version = "1.1.0"
edition = "2021"
description = "WebAssembly runtime and module management for Shepherd Model Gateway"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/workflow/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wfaas"
version = "1.0.2"
version = "1.0.3"
edition = "2021"
description = "Workflow-as-a-Service engine for managing multi-step operations"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion model_gateway/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "smg"
version = "1.1.0"
version = "1.2.0"
edition = "2021"
description = "High-performance model-routing gateway for large-scale LLM deployments"
license = "Apache-2.0"
Expand Down
Loading
Loading