From cea19cb06acf03c911b84d5c147e519b60dd92a6 Mon Sep 17 00:00:00 2001
From: Connor Carpenter
Date: Sun, 12 Jul 2026 14:24:40 -0700
Subject: [PATCH] feat(protocol): add revision 2 bindings and packages
Signed-off-by: Connor Carpenter
---
.github/ISSUE_TEMPLATE/bug.yml | 2 +-
.github/workflows/buf.yml | 7 +-
.github/workflows/packages.yml | 137 +
.github/workflows/release.yml | 119 +
.gitignore | 10 +-
CHANGELOG.md | 24 +
CONTRIBUTING.md | 28 +-
Cargo.lock | 996 +++++
Cargo.toml | 13 +
README.md | 81 +-
RELEASING.md | 64 +
buf.yaml | 4 +
docs/api.md | 44 +-
packages/python/LICENSE | 201 +
packages/python/README.md | 32 +
packages/python/pyproject.toml | 41 +
packages/python/src/openengine/__init__.py | 22 +
packages/python/src/openengine/py.typed | 1 +
packages/python/src/openengine/v1/__init__.py | 1 +
.../src/openengine/v1/classification_pb2.py | 46 +
.../src/openengine/v1/classification_pb2.pyi | 77 +
.../python/src/openengine/v1/embedding_pb2.py | 50 +
.../src/openengine/v1/embedding_pb2.pyi | 105 +
.../python/src/openengine/v1/engine_pb2.py | 43 +
.../python/src/openengine/v1/engine_pb2.pyi | 62 +
.../python/src/openengine/v1/error_pb2.py | 39 +
.../python/src/openengine/v1/error_pb2.pyi | 51 +
.../src/openengine/v1/generation_pb2.py | 84 +
.../src/openengine/v1/generation_pb2.pyi | 276 ++
.../python/src/openengine/v1/input_pb2.py | 48 +
.../python/src/openengine/v1/input_pb2.pyi | 85 +
packages/python/src/openengine/v1/kv_pb2.py | 70 +
packages/python/src/openengine/v1/kv_pb2.pyi | 207 +
.../python/src/openengine/v1/lifecycle_pb2.py | 59 +
.../src/openengine/v1/lifecycle_pb2.pyi | 120 +
packages/python/src/openengine/v1/lora_pb2.py | 48 +
.../python/src/openengine/v1/lora_pb2.pyi | 53 +
.../python/src/openengine/v1/model_pb2.py | 56 +
.../python/src/openengine/v1/model_pb2.pyi | 148 +
.../src/openengine/v1/observability_pb2.py | 57 +
.../src/openengine/v1/observability_pb2.pyi | 116 +
.../src/openengine/v1/openengine_pb2.py | 46 +
.../src/openengine/v1/openengine_pb2.pyi | 14 +
.../src/openengine/v1/openengine_pb2_grpc.py | 801 ++++
.../python/src/openengine/v1/scoring_pb2.py | 52 +
.../python/src/openengine/v1/scoring_pb2.pyi | 129 +
.../python/src/openengine/v1/tasks_pb2.py | 48 +
.../python/src/openengine/v1/tasks_pb2.pyi | 73 +
packages/python/tests/test_bindings.py | 117 +
packages/rust/openengine-proto/Cargo.toml | 17 +
packages/rust/openengine-proto/LICENSE | 201 +
packages/rust/openengine-proto/README.md | 28 +
.../examples/cross_language_fixture.rs | 103 +
.../src/generated/openengine.v1.rs | 3369 +++++++++++++++++
.../src/generated/openengine_descriptor.bin | Bin 0 -> 73799 bytes
packages/rust/openengine-proto/src/lib.rs | 24 +
.../rust/openengine-proto/tests/bindings.rs | 95 +
proto/openengine/v1/README.md | 8 +
proto/openengine/v1/generation.proto | 7 +
proto/openengine/v1/input.proto | 9 +
proto/openengine/v1/model.proto | 19 +
scripts/check-generated.sh | 29 +
scripts/check_package_contents.py | 74 +
scripts/check_release_version.py | 42 +
scripts/cross_language_fixture.py | 58 +
scripts/generate-python.sh | 34 +
scripts/generate-rust.sh | 10 +
scripts/test-cross-language.sh | 25 +
tools/rust-codegen/Cargo.toml | 11 +
tools/rust-codegen/src/main.rs | 39 +
70 files changed, 9178 insertions(+), 31 deletions(-)
create mode 100644 .github/workflows/packages.yml
create mode 100644 .github/workflows/release.yml
create mode 100644 CHANGELOG.md
create mode 100644 Cargo.lock
create mode 100644 Cargo.toml
create mode 100644 RELEASING.md
create mode 100644 packages/python/LICENSE
create mode 100644 packages/python/README.md
create mode 100644 packages/python/pyproject.toml
create mode 100644 packages/python/src/openengine/__init__.py
create mode 100644 packages/python/src/openengine/py.typed
create mode 100644 packages/python/src/openengine/v1/__init__.py
create mode 100644 packages/python/src/openengine/v1/classification_pb2.py
create mode 100644 packages/python/src/openengine/v1/classification_pb2.pyi
create mode 100644 packages/python/src/openengine/v1/embedding_pb2.py
create mode 100644 packages/python/src/openengine/v1/embedding_pb2.pyi
create mode 100644 packages/python/src/openengine/v1/engine_pb2.py
create mode 100644 packages/python/src/openengine/v1/engine_pb2.pyi
create mode 100644 packages/python/src/openengine/v1/error_pb2.py
create mode 100644 packages/python/src/openengine/v1/error_pb2.pyi
create mode 100644 packages/python/src/openengine/v1/generation_pb2.py
create mode 100644 packages/python/src/openengine/v1/generation_pb2.pyi
create mode 100644 packages/python/src/openengine/v1/input_pb2.py
create mode 100644 packages/python/src/openengine/v1/input_pb2.pyi
create mode 100644 packages/python/src/openengine/v1/kv_pb2.py
create mode 100644 packages/python/src/openengine/v1/kv_pb2.pyi
create mode 100644 packages/python/src/openengine/v1/lifecycle_pb2.py
create mode 100644 packages/python/src/openengine/v1/lifecycle_pb2.pyi
create mode 100644 packages/python/src/openengine/v1/lora_pb2.py
create mode 100644 packages/python/src/openengine/v1/lora_pb2.pyi
create mode 100644 packages/python/src/openengine/v1/model_pb2.py
create mode 100644 packages/python/src/openengine/v1/model_pb2.pyi
create mode 100644 packages/python/src/openengine/v1/observability_pb2.py
create mode 100644 packages/python/src/openengine/v1/observability_pb2.pyi
create mode 100644 packages/python/src/openengine/v1/openengine_pb2.py
create mode 100644 packages/python/src/openengine/v1/openengine_pb2.pyi
create mode 100644 packages/python/src/openengine/v1/openengine_pb2_grpc.py
create mode 100644 packages/python/src/openengine/v1/scoring_pb2.py
create mode 100644 packages/python/src/openengine/v1/scoring_pb2.pyi
create mode 100644 packages/python/src/openengine/v1/tasks_pb2.py
create mode 100644 packages/python/src/openengine/v1/tasks_pb2.pyi
create mode 100644 packages/python/tests/test_bindings.py
create mode 100644 packages/rust/openengine-proto/Cargo.toml
create mode 100644 packages/rust/openengine-proto/LICENSE
create mode 100644 packages/rust/openengine-proto/README.md
create mode 100644 packages/rust/openengine-proto/examples/cross_language_fixture.rs
create mode 100644 packages/rust/openengine-proto/src/generated/openengine.v1.rs
create mode 100644 packages/rust/openengine-proto/src/generated/openengine_descriptor.bin
create mode 100644 packages/rust/openengine-proto/src/lib.rs
create mode 100644 packages/rust/openengine-proto/tests/bindings.rs
create mode 100755 scripts/check-generated.sh
create mode 100644 scripts/check_package_contents.py
create mode 100755 scripts/check_release_version.py
create mode 100755 scripts/cross_language_fixture.py
create mode 100755 scripts/generate-python.sh
create mode 100755 scripts/generate-rust.sh
create mode 100755 scripts/test-cross-language.sh
create mode 100644 tools/rust-codegen/Cargo.toml
create mode 100644 tools/rust-codegen/src/main.rs
diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml
index 967f38f..380b751 100644
--- a/.github/ISSUE_TEMPLATE/bug.yml
+++ b/.github/ISSUE_TEMPLATE/bug.yml
@@ -32,7 +32,7 @@ body:
attributes:
label: Schema revision or commit
description: Identify the schema revision, release tag, or commit where the problem occurs.
- placeholder: "Schema revision 1 or commit SHA"
+ placeholder: "Schema revision 2 or commit SHA"
- type: textarea
id: current-behavior
diff --git a/.github/workflows/buf.yml b/.github/workflows/buf.yml
index 08e9c52..81d0781 100644
--- a/.github/workflows/buf.yml
+++ b/.github/workflows/buf.yml
@@ -22,15 +22,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
- uses: actions/checkout@v4
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Lint schema
- uses: bufbuild/buf-action@v1
+ uses: bufbuild/buf-action@fd21066df7214747548607aaa45548ba2b9bc1ff # v1
with:
version: "1.71.0"
lint: true
format: false
- breaking: false
+ breaking: true
+ breaking_against: "https://github.com/ai-dynamo/openengine/archive/d0f29fec31f31db5cfd49cf3e0f67da84d10c709.tar.gz#strip_components=1"
push: false
archive: false
pr_comment: false
diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml
new file mode 100644
index 0000000..8dceace
--- /dev/null
+++ b/.github/workflows/packages.yml
@@ -0,0 +1,137 @@
+name: Packages
+
+on:
+ push:
+ branches:
+ - main
+ paths:
+ - "proto/**"
+ - "packages/**"
+ - "tools/rust-codegen/**"
+ - "scripts/**"
+ - "Cargo.toml"
+ - "Cargo.lock"
+ - ".github/workflows/packages.yml"
+ - ".github/workflows/release.yml"
+ pull_request:
+ paths:
+ - "proto/**"
+ - "packages/**"
+ - "tools/rust-codegen/**"
+ - "scripts/**"
+ - "Cargo.toml"
+ - "Cargo.lock"
+ - ".github/workflows/packages.yml"
+ - ".github/workflows/release.yml"
+
+permissions:
+ contents: read
+
+jobs:
+ generated:
+ name: Generated bindings
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check out repository
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
+
+ - name: Set up Python
+ uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
+ with:
+ python-version: "3.14"
+
+ - name: Set up Rust
+ uses: dtolnay/rust-toolchain@fa04a1451ff1842e2626ccb99004d0195b455a88 # master, 2026-07-12
+ with:
+ toolchain: stable
+
+ - name: Install Python generator
+ run: python -m pip install grpcio-tools==1.81.1
+
+ - name: Check generated bindings
+ run: ./scripts/check-generated.sh
+
+ python:
+ name: Python ${{ matrix.python-version }}
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ python-version: ["3.10", "3.14"]
+ steps:
+ - name: Check out repository
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
+
+ - name: Set up Python
+ uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
+ with:
+ python-version: ${{ matrix.python-version }}
+
+ - name: Install build tools
+ run: python -m pip install build==1.3.0 twine==6.2.0
+
+ - name: Build distributions
+ run: python -m build packages/python --outdir dist/python
+
+ - name: Check distribution metadata
+ run: python -m twine check dist/python/*
+
+ - name: Check Python package contents
+ run: python scripts/check_package_contents.py --python-only
+
+ - name: Install wheel
+ run: python -m pip install dist/python/*.whl
+
+ - name: Test installed bindings
+ run: python -m unittest discover --start-directory packages/python/tests
+
+ rust:
+ name: Rust ${{ matrix.toolchain }}
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ toolchain: ["1.88.0", "stable"]
+ steps:
+ - name: Check out repository
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
+
+ - name: Set up Rust
+ uses: dtolnay/rust-toolchain@fa04a1451ff1842e2626ccb99004d0195b455a88 # master, 2026-07-12
+ with:
+ toolchain: ${{ matrix.toolchain }}
+
+ - name: Test crate
+ run: cargo test --locked --package openengine-proto
+
+ - name: Build packaged crate
+ run: cargo package --locked --package openengine-proto
+
+ - name: List packaged files
+ run: cargo package --locked --package openengine-proto --list
+
+ - name: Check Rust package contents
+ run: python scripts/check_package_contents.py --rust-only
+
+ interoperability:
+ name: Python and Rust interoperability
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check out repository
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
+
+ - name: Set up Python
+ uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
+ with:
+ python-version: "3.14"
+
+ - name: Set up Rust
+ uses: dtolnay/rust-toolchain@fa04a1451ff1842e2626ccb99004d0195b455a88 # master, 2026-07-12
+ with:
+ toolchain: stable
+
+ - name: Install Python package
+ run: python -m pip install ./packages/python
+
+ - name: Test both serialization directions
+ run: ./scripts/test-cross-language.sh
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..3d0cc14
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,119 @@
+name: Release
+
+on:
+ push:
+ tags:
+ - "v[0-9]+.[0-9]+.[0-9]+"
+
+permissions:
+ contents: read
+
+jobs:
+ build:
+ name: Build and verify release
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check out repository
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
+
+ - name: Set up Python
+ uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
+ with:
+ python-version: "3.14"
+
+ - name: Set up Rust
+ uses: dtolnay/rust-toolchain@fa04a1451ff1842e2626ccb99004d0195b455a88 # master, 2026-07-12
+ with:
+ toolchain: stable
+
+ - name: Check release versions
+ run: python scripts/check_release_version.py "${GITHUB_REF_NAME}"
+
+ - name: Lint schema
+ uses: bufbuild/buf-action@fd21066df7214747548607aaa45548ba2b9bc1ff # v1
+ with:
+ version: "1.71.0"
+ lint: true
+ format: false
+ breaking: true
+ breaking_against: "https://github.com/ai-dynamo/openengine/archive/d0f29fec31f31db5cfd49cf3e0f67da84d10c709.tar.gz#strip_components=1"
+ push: false
+ archive: false
+ pr_comment: false
+
+ - name: Install Python tools
+ run: >-
+ python -m pip install
+ build==1.3.0
+ grpcio-tools==1.81.1
+ twine==6.2.0
+
+ - name: Check generated bindings
+ run: ./scripts/check-generated.sh
+
+ - name: Test Rust crate
+ run: cargo test --locked --package openengine-proto
+
+ - name: Build Rust crate
+ run: cargo package --locked --package openengine-proto
+
+ - name: Build Python distributions
+ run: python -m build packages/python --outdir dist/python
+
+ - name: Check Python distributions
+ run: python -m twine check dist/python/*
+
+ - name: Check package contents
+ run: python scripts/check_package_contents.py
+
+ - name: Install and test Python wheel
+ run: |
+ python -m pip install dist/python/*.whl
+ python -m unittest discover --start-directory packages/python/tests
+
+ - name: Test cross-language serialization
+ run: ./scripts/test-cross-language.sh
+
+ - name: Assemble release artifacts
+ run: |
+ mkdir -p dist/release
+ cp dist/python/* dist/release/
+ cp target/package/openengine-proto-*.crate dist/release/
+ cp packages/rust/openengine-proto/src/generated/openengine_descriptor.bin \
+ "dist/release/openengine-${GITHUB_REF_NAME}-descriptor.bin"
+ tar --create --gzip \
+ --file "dist/release/openengine-${GITHUB_REF_NAME}-proto.tar.gz" \
+ --directory proto \
+ openengine
+ cd dist/release
+ sha256sum openengine* > SHA256SUMS
+
+ - name: Upload release artifacts
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
+ with:
+ name: openengine-${{ github.ref_name }}
+ path: dist
+ if-no-files-found: error
+
+ github-release:
+ name: Create GitHub release
+ needs: build
+ runs-on: ubuntu-latest
+ permissions:
+ actions: read
+ contents: write
+ steps:
+ - name: Download release artifacts
+ uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
+ with:
+ name: openengine-${{ github.ref_name }}
+ path: dist
+
+ - name: Create release
+ env:
+ GH_TOKEN: ${{ github.token }}
+ run: >-
+ gh release create "${GITHUB_REF_NAME}"
+ dist/release/*
+ --generate-notes
+ --title "OpenEngine ${GITHUB_REF_NAME}"
diff --git a/.gitignore b/.gitignore
index ed1af5a..a681dea 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,10 @@
__pycache__/
*.py[cod]
-# Ignore generated Python gRPC stubs if the README example is run locally.
-*_pb2.py
-*_pb2_grpc.py
+# Local Python environments and package artifacts
+.venv/
+*.egg-info/
+dist/
+
+# Rust build artifacts
+target/
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..3611d71
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,24 @@
+
+
+# Changelog
+
+All notable changes to the OpenEngine schema and generated packages are
+documented here. OpenEngine uses the same version for its Git tag, Python
+distribution, and Rust crate.
+
+## [Unreleased]
+
+## [0.2.0] - 2026-07-12
+
+### Added
+
+- Generated Python protobuf and gRPC bindings.
+- Generated Rust Prost and Tonic client/server bindings.
+- Reproducible code generation, package CI, and tag-driven releases.
+- Revision-2 multimodal capability discovery and per-request media options.
+
+[Unreleased]: https://github.com/ai-dynamo/openengine/commits/main
+[0.2.0]: https://github.com/ai-dynamo/openengine/releases/tag/v0.2.0
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 85ece56..5cfe1f4 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -30,7 +30,33 @@ sending a PR.
- **Bugs / feedback / design questions**: open a [GitHub issue](https://github.com/ai-dynamo/openengine/issues).
- **Pull requests**: open against `main`. Keep changes focused (one logical change per PR).
-## Signing Your Work
+## Development checks
+
+The schema under `proto/openengine/v1/` is the source of truth. Generated Python
+and Rust bindings are checked in for package consumers and must be updated in
+the same pull request as a schema change.
+
+```bash
+buf build
+buf lint
+
+python -m pip install build==1.3.0 grpcio-tools==1.81.1 twine==6.2.0
+./scripts/generate-python.sh
+./scripts/generate-rust.sh
+./scripts/check-generated.sh
+
+cargo test --locked --package openengine-proto
+cargo package --allow-dirty --locked --package openengine-proto
+python -m build packages/python --outdir dist/python
+python -m twine check dist/python/*
+python scripts/check_package_contents.py
+./scripts/test-cross-language.sh
+```
+
+The Python generator and Rust code-generation toolchain are pinned. Do not edit
+generated files by hand; update the schema or generator and regenerate them.
+
+## Signing your work
We require that all contributors "sign off" on their commits. This certifies that
you wrote the contribution, or otherwise have the right to submit it under the
diff --git a/Cargo.lock b/Cargo.lock
new file mode 100644
index 0000000..50ea319
--- /dev/null
+++ b/Cargo.lock
@@ -0,0 +1,996 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 4
+
+[[package]]
+name = "aho-corasick"
+version = "1.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "anyhow"
+version = "1.0.103"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2a4385e2e34eb35d6b3efe798b9eb88096925d87726c0798709bf56d9ed84af3"
+
+[[package]]
+name = "async-trait"
+version = "0.1.89"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "atomic-waker"
+version = "1.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
+
+[[package]]
+name = "axum"
+version = "0.8.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "31b698c5f9a010f6573133b09e0de5408834d0c82f8d7475a89fc1867a71cd90"
+dependencies = [
+ "axum-core",
+ "bytes",
+ "futures-util",
+ "http",
+ "http-body",
+ "http-body-util",
+ "itoa",
+ "matchit",
+ "memchr",
+ "mime",
+ "percent-encoding",
+ "pin-project-lite",
+ "serde_core",
+ "sync_wrapper",
+ "tower",
+ "tower-layer",
+ "tower-service",
+]
+
+[[package]]
+name = "axum-core"
+version = "0.5.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1"
+dependencies = [
+ "bytes",
+ "futures-core",
+ "http",
+ "http-body",
+ "http-body-util",
+ "mime",
+ "pin-project-lite",
+ "sync_wrapper",
+ "tower-layer",
+ "tower-service",
+]
+
+[[package]]
+name = "base64"
+version = "0.22.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
+
+[[package]]
+name = "bitflags"
+version = "2.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8"
+
+[[package]]
+name = "bytes"
+version = "1.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
+
+[[package]]
+name = "cfg-if"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
+
+[[package]]
+name = "either"
+version = "1.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e"
+
+[[package]]
+name = "equivalent"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
+
+[[package]]
+name = "errno"
+version = "0.3.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
+dependencies = [
+ "libc",
+ "windows-sys",
+]
+
+[[package]]
+name = "fastrand"
+version = "2.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6"
+
+[[package]]
+name = "fixedbitset"
+version = "0.5.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99"
+
+[[package]]
+name = "fnv"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
+
+[[package]]
+name = "foldhash"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
+
+[[package]]
+name = "futures-channel"
+version = "0.3.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d"
+dependencies = [
+ "futures-core",
+]
+
+[[package]]
+name = "futures-core"
+version = "0.3.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d"
+
+[[package]]
+name = "futures-sink"
+version = "0.3.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893"
+
+[[package]]
+name = "futures-task"
+version = "0.3.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393"
+
+[[package]]
+name = "futures-util"
+version = "0.3.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6"
+dependencies = [
+ "futures-core",
+ "futures-task",
+ "pin-project-lite",
+ "slab",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "r-efi",
+]
+
+[[package]]
+name = "h2"
+version = "0.4.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6cb093c84e8bd9b188d4c4a8cb6579fc016968d14c99882163cd3ff402a4f155"
+dependencies = [
+ "atomic-waker",
+ "bytes",
+ "fnv",
+ "futures-core",
+ "futures-sink",
+ "http",
+ "indexmap",
+ "slab",
+ "tokio",
+ "tokio-util",
+ "tracing",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.15.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
+dependencies = [
+ "foldhash",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.17.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
+
+[[package]]
+name = "heck"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
+
+[[package]]
+name = "http"
+version = "1.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6970f50e31d6fc17d3fa27329444bfa74e196cf62e95052a3f6fee181dba6425"
+dependencies = [
+ "bytes",
+ "itoa",
+]
+
+[[package]]
+name = "http-body"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184"
+dependencies = [
+ "bytes",
+ "http",
+]
+
+[[package]]
+name = "http-body-util"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a"
+dependencies = [
+ "bytes",
+ "futures-core",
+ "http",
+ "http-body",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "httparse"
+version = "1.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
+
+[[package]]
+name = "httpdate"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
+
+[[package]]
+name = "hyper"
+version = "1.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "55281c53a1894c864990125767da440a4e630446785086f52523b20033b74498"
+dependencies = [
+ "atomic-waker",
+ "bytes",
+ "futures-channel",
+ "futures-core",
+ "h2",
+ "http",
+ "http-body",
+ "httparse",
+ "httpdate",
+ "itoa",
+ "pin-project-lite",
+ "smallvec",
+ "tokio",
+ "want",
+]
+
+[[package]]
+name = "hyper-timeout"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0"
+dependencies = [
+ "hyper",
+ "hyper-util",
+ "pin-project-lite",
+ "tokio",
+ "tower-service",
+]
+
+[[package]]
+name = "hyper-util"
+version = "0.1.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0"
+dependencies = [
+ "bytes",
+ "futures-channel",
+ "futures-util",
+ "http",
+ "http-body",
+ "hyper",
+ "libc",
+ "pin-project-lite",
+ "socket2",
+ "tokio",
+ "tower-service",
+ "tracing",
+]
+
+[[package]]
+name = "indexmap"
+version = "2.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9"
+dependencies = [
+ "equivalent",
+ "hashbrown 0.17.1",
+]
+
+[[package]]
+name = "itertools"
+version = "0.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285"
+dependencies = [
+ "either",
+]
+
+[[package]]
+name = "itoa"
+version = "1.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
+
+[[package]]
+name = "libc"
+version = "0.2.186"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
+
+[[package]]
+name = "linux-raw-sys"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
+
+[[package]]
+name = "log"
+version = "0.4.33"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad"
+
+[[package]]
+name = "matchit"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3"
+
+[[package]]
+name = "memchr"
+version = "2.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
+
+[[package]]
+name = "mime"
+version = "0.3.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
+
+[[package]]
+name = "mio"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "02bd0af71c67b473010cbbc60715ee815645a4dc942899111f494b4b737d6fda"
+dependencies = [
+ "libc",
+ "wasi",
+ "windows-sys",
+]
+
+[[package]]
+name = "multimap"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084"
+
+[[package]]
+name = "once_cell"
+version = "1.21.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
+
+[[package]]
+name = "openengine-proto"
+version = "0.2.0"
+dependencies = [
+ "prost",
+ "prost-types",
+ "tonic",
+ "tonic-prost",
+]
+
+[[package]]
+name = "openengine-rust-codegen"
+version = "0.0.0"
+dependencies = [
+ "protoc-bin-vendored",
+ "tonic-prost-build",
+]
+
+[[package]]
+name = "percent-encoding"
+version = "2.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
+
+[[package]]
+name = "petgraph"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455"
+dependencies = [
+ "fixedbitset",
+ "hashbrown 0.15.5",
+ "indexmap",
+]
+
+[[package]]
+name = "pin-project"
+version = "1.1.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924"
+dependencies = [
+ "pin-project-internal",
+]
+
+[[package]]
+name = "pin-project-internal"
+version = "1.1.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
+
+[[package]]
+name = "prettyplease"
+version = "0.2.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b"
+dependencies = [
+ "proc-macro2",
+ "syn",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.106"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "prost"
+version = "0.14.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "528ac67416ff8646872a3c02cad9cc4ee5dc9f9540c9b10771855c95cb2e5ae1"
+dependencies = [
+ "bytes",
+ "prost-derive",
+]
+
+[[package]]
+name = "prost-build"
+version = "0.14.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "03da047801ff44bb6a4d407d4860c05fd70bb81714e6b2f3812603d5b145b042"
+dependencies = [
+ "heck",
+ "itertools",
+ "log",
+ "multimap",
+ "petgraph",
+ "prettyplease",
+ "prost",
+ "prost-types",
+ "pulldown-cmark",
+ "pulldown-cmark-to-cmark",
+ "regex",
+ "syn",
+ "tempfile",
+]
+
+[[package]]
+name = "prost-derive"
+version = "0.14.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b570b25f7617e43d59005d0990ccb79e950a423952cea19671b7a876da390adf"
+dependencies = [
+ "anyhow",
+ "itertools",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "prost-types"
+version = "0.14.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f94967dc7688f3054c7fac87473ffae4cc4c3904800e2d9f5b857246d8963b0a"
+dependencies = [
+ "prost",
+]
+
+[[package]]
+name = "protoc-bin-vendored"
+version = "3.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d1c381df33c98266b5f08186583660090a4ffa0889e76c7e9a5e175f645a67fa"
+dependencies = [
+ "protoc-bin-vendored-linux-aarch_64",
+ "protoc-bin-vendored-linux-ppcle_64",
+ "protoc-bin-vendored-linux-s390_64",
+ "protoc-bin-vendored-linux-x86_32",
+ "protoc-bin-vendored-linux-x86_64",
+ "protoc-bin-vendored-macos-aarch_64",
+ "protoc-bin-vendored-macos-x86_64",
+ "protoc-bin-vendored-win32",
+]
+
+[[package]]
+name = "protoc-bin-vendored-linux-aarch_64"
+version = "3.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c350df4d49b5b9e3ca79f7e646fde2377b199e13cfa87320308397e1f37e1a4c"
+
+[[package]]
+name = "protoc-bin-vendored-linux-ppcle_64"
+version = "3.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a55a63e6c7244f19b5c6393f025017eb5d793fd5467823a099740a7a4222440c"
+
+[[package]]
+name = "protoc-bin-vendored-linux-s390_64"
+version = "3.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1dba5565db4288e935d5330a07c264a4ee8e4a5b4a4e6f4e83fad824cc32f3b0"
+
+[[package]]
+name = "protoc-bin-vendored-linux-x86_32"
+version = "3.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8854774b24ee28b7868cd71dccaae8e02a2365e67a4a87a6cd11ee6cdbdf9cf5"
+
+[[package]]
+name = "protoc-bin-vendored-linux-x86_64"
+version = "3.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b38b07546580df720fa464ce124c4b03630a6fb83e05c336fea2a241df7e5d78"
+
+[[package]]
+name = "protoc-bin-vendored-macos-aarch_64"
+version = "3.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "89278a9926ce312e51f1d999fee8825d324d603213344a9a706daa009f1d8092"
+
+[[package]]
+name = "protoc-bin-vendored-macos-x86_64"
+version = "3.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "81745feda7ccfb9471d7a4de888f0652e806d5795b61480605d4943176299756"
+
+[[package]]
+name = "protoc-bin-vendored-win32"
+version = "3.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "95067976aca6421a523e491fce939a3e65249bac4b977adee0ee9771568e8aa3"
+
+[[package]]
+name = "pulldown-cmark"
+version = "0.13.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e9f068eba8e7071c5f9511831b44f32c740d5adf574e990f946ddb53db2f314e"
+dependencies = [
+ "bitflags",
+ "memchr",
+ "unicase",
+]
+
+[[package]]
+name = "pulldown-cmark-to-cmark"
+version = "22.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "50793def1b900256624a709439404384204a5dc3a6ec580281bfaac35e882e90"
+dependencies = [
+ "pulldown-cmark",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.46"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "r-efi"
+version = "6.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
+
+[[package]]
+name = "regex"
+version = "1.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2a0e75113e14dc5acb068cd0786884f214f1312650a3d36d269f5c4f3cdee8a2"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-automata",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.4.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1f388202e4b80542a0921078cc23b6333bcf1409c1e3f86404cae4766a6131db"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.8.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
+
+[[package]]
+name = "rustix"
+version = "1.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190"
+dependencies = [
+ "bitflags",
+ "errno",
+ "libc",
+ "linux-raw-sys",
+ "windows-sys",
+]
+
+[[package]]
+name = "serde_core"
+version = "1.0.228"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.228"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "slab"
+version = "0.4.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
+
+[[package]]
+name = "smallvec"
+version = "1.15.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90"
+
+[[package]]
+name = "socket2"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "52d1cfed4120b4d927bf7c0f86d2087a4a7d6027c906d9f9d525a80573b9be51"
+dependencies = [
+ "libc",
+ "windows-sys",
+]
+
+[[package]]
+name = "syn"
+version = "2.0.118"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "sync_wrapper"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263"
+
+[[package]]
+name = "tempfile"
+version = "3.27.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
+dependencies = [
+ "fastrand",
+ "getrandom",
+ "once_cell",
+ "rustix",
+ "windows-sys",
+]
+
+[[package]]
+name = "tokio"
+version = "1.52.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fc7f01b389ac15039e4dc9531aa973a135d7a4135281b12d7c1bc79fd57fffe"
+dependencies = [
+ "bytes",
+ "libc",
+ "mio",
+ "pin-project-lite",
+ "socket2",
+ "tokio-macros",
+ "windows-sys",
+]
+
+[[package]]
+name = "tokio-macros"
+version = "2.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "tokio-stream"
+version = "0.1.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32da49809aab5c3bc678af03902d4ccddea2a87d028d86392a4b1560c6906c70"
+dependencies = [
+ "futures-core",
+ "pin-project-lite",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-util"
+version = "0.7.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098"
+dependencies = [
+ "bytes",
+ "futures-core",
+ "futures-sink",
+ "pin-project-lite",
+ "tokio",
+]
+
+[[package]]
+name = "tonic"
+version = "0.14.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac2a5518c70fa84342385732db33fb3f44bc4cc748936eb5833d2df34d6445ef"
+dependencies = [
+ "async-trait",
+ "axum",
+ "base64",
+ "bytes",
+ "h2",
+ "http",
+ "http-body",
+ "http-body-util",
+ "hyper",
+ "hyper-timeout",
+ "hyper-util",
+ "percent-encoding",
+ "pin-project",
+ "socket2",
+ "sync_wrapper",
+ "tokio",
+ "tokio-stream",
+ "tower",
+ "tower-layer",
+ "tower-service",
+ "tracing",
+]
+
+[[package]]
+name = "tonic-build"
+version = "0.14.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c68f61875ac5293cf72e6c8cf0158086428c82c37229e98c840878f1706b0322"
+dependencies = [
+ "prettyplease",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "tonic-prost"
+version = "0.14.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "50849f68853be452acf590cde0b146665b8d507b3b8af17261df47e02c209ea0"
+dependencies = [
+ "bytes",
+ "prost",
+ "tonic",
+]
+
+[[package]]
+name = "tonic-prost-build"
+version = "0.14.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "654e5643eff75d7f8c99197ce1440ed19a3474eada74c12bbac488b2cafdae27"
+dependencies = [
+ "prettyplease",
+ "proc-macro2",
+ "prost-build",
+ "prost-types",
+ "quote",
+ "syn",
+ "tempfile",
+ "tonic-build",
+]
+
+[[package]]
+name = "tower"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4"
+dependencies = [
+ "futures-core",
+ "futures-util",
+ "indexmap",
+ "pin-project-lite",
+ "slab",
+ "sync_wrapper",
+ "tokio",
+ "tokio-util",
+ "tower-layer",
+ "tower-service",
+ "tracing",
+]
+
+[[package]]
+name = "tower-layer"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e"
+
+[[package]]
+name = "tower-service"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
+
+[[package]]
+name = "tracing"
+version = "0.1.44"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
+dependencies = [
+ "pin-project-lite",
+ "tracing-attributes",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-attributes"
+version = "0.1.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "tracing-core"
+version = "0.1.36"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a"
+dependencies = [
+ "once_cell",
+]
+
+[[package]]
+name = "try-lock"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
+
+[[package]]
+name = "unicase"
+version = "2.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142"
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
+
+[[package]]
+name = "want"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"
+dependencies = [
+ "try-lock",
+]
+
+[[package]]
+name = "wasi"
+version = "0.11.1+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
+
+[[package]]
+name = "windows-link"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
+
+[[package]]
+name = "windows-sys"
+version = "0.61.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
+dependencies = [
+ "windows-link",
+]
diff --git a/Cargo.toml b/Cargo.toml
new file mode 100644
index 0000000..f298530
--- /dev/null
+++ b/Cargo.toml
@@ -0,0 +1,13 @@
+[workspace]
+members = [
+ "packages/rust/openengine-proto",
+ "tools/rust-codegen",
+]
+resolver = "2"
+
+[workspace.package]
+version = "0.2.0"
+edition = "2021"
+rust-version = "1.88"
+license = "Apache-2.0"
+repository = "https://github.com/ai-dynamo/openengine"
diff --git a/README.md b/README.md
index 5451c29..4634c97 100644
--- a/README.md
+++ b/README.md
@@ -28,13 +28,14 @@ SPDX-License-Identifier: Apache-2.0
Why OpenEngine?
· API reference
· Canonical schema
+ · Generated packages
· Contributing
> [!IMPORTANT]
> OpenEngine is experimental and pre-adoption. The contract is being refined
> before its first engine implementations and may make direct breaking changes
-> while it remains at schema revision `1`.
+> while it remains at schema revision `2`.
## Table of contents
@@ -43,6 +44,7 @@ SPDX-License-Identifier: Apache-2.0
- [Architecture](#architecture)
- [Capabilities](#capabilities)
- [Getting started](#getting-started)
+- [Generated packages](#generated-packages)
- [Project status](#project-status)
- [Contributing](#contributing)
- [Security](#security)
@@ -135,31 +137,71 @@ buf lint
Buf lint, Markdown lint, and link checks run in GitHub Actions for relevant
pull requests.
-### Generate Python bindings
+### Regenerate package bindings
-Use a proto3 toolchain with explicit-optional support (`protoc` 3.15 or newer).
-The contract imports protobuf well-known types, so their include path must be
-available to the compiler.
+The repository checks in generated Python and Rust bindings so that package
+users do not need a protobuf compiler. Contributors changing the schema must
+regenerate both packages:
```bash
-python -m pip install grpcio-tools
+python -m pip install grpcio-tools==1.81.1
+./scripts/generate-python.sh
+./scripts/generate-rust.sh
+./scripts/check-generated.sh
+```
+
+Other protobuf-supported languages can generate clients and servers from the
+same canonical package.
+
+## Generated packages
-OUT_DIR=/tmp/openengine-python
-mkdir -p "$OUT_DIR"
+Each OpenEngine release builds Python and Rust bindings from the same schema and
+version tag. The artifacts contain generated code; installing them does not run
+Buf or `protoc`. Initial consumers pin the OpenEngine repository at an immutable
+commit and use path dependencies from that checkout.
-PROTO_INCLUDE=$(python -c \
- 'import grpc_tools, os; print(os.path.join(os.path.dirname(grpc_tools.__file__), "_proto"))')
+### Python
-python -m grpc_tools.protoc \
- -I proto \
- -I "$PROTO_INCLUDE" \
- --python_out="$OUT_DIR" \
- --grpc_python_out="$OUT_DIR" \
- proto/openengine/v1/*.proto
+```bash
+pip install ./packages/python
```
-Other protobuf-supported languages can generate clients and servers from the
-same canonical package.
+```python
+import grpc
+
+from openengine.v1.generation_pb2 import GenerateRequest
+from openengine.v1.openengine_pb2_grpc import OpenEngineStub
+
+channel = grpc.aio.insecure_channel("localhost:50051")
+engine = OpenEngineStub(channel)
+request = GenerateRequest(request_id="example", model="model", prompt="Hello")
+```
+
+### Rust
+
+```toml
+openengine-proto = { path = "../openengine/packages/rust/openengine-proto" }
+```
+
+```rust
+use openengine_proto::openengine::v1::{
+ open_engine_client::OpenEngineClient,
+ GenerateRequest,
+};
+```
+
+The coordinated package version identifies the generated schema contents, but
+not the exact source of a path or Git dependency. Both packages expose schema
+revision `2`, minimum client revision `1`, and an `unreleased` identity sentinel.
+Engine servers must inject their immutable OpenEngine commit SHA (or signed
+release tag), and clients should inspect `EngineInfo` before accepting traffic.
+
+| Package release | Protobuf package | Schema revision |
+| --------------- | ---------------- | --------------- |
+| `0.2.x` | `openengine.v1` | `2` |
+
+See [`RELEASING.md`](RELEASING.md) for the coordinated release process and
+[`CHANGELOG.md`](CHANGELOG.md) for schema and package changes.
## Project status
@@ -190,7 +232,8 @@ git commit --signoff -m "docs: describe the change"
Please validate protobuf changes with Buf and keep
[`proto/openengine/v1/`](proto/openengine/v1/) and [`docs/api.md`](docs/api.md)
-synchronized.
+synchronized. Changes to the schema must also regenerate and commit both
+language packages.
## Security
diff --git a/RELEASING.md b/RELEASING.md
new file mode 100644
index 0000000..a0064e3
--- /dev/null
+++ b/RELEASING.md
@@ -0,0 +1,64 @@
+
+
+# Releasing OpenEngine
+
+OpenEngine builds the canonical schema and generated Python and Rust bindings
+from the same `vMAJOR.MINOR.PATCH` tag. Releases are immutable and all artifacts
+use the same version. Initial consumers use local path or immutable Git commit
+dependencies; publication to PyPI and crates.io is intentionally deferred.
+
+Release tooling requires Python 3.11 or newer.
+
+## Prepare a release
+
+1. Choose the release version and update both version declarations:
+ - `packages/python/pyproject.toml` under `[project]`.
+ - `Cargo.toml` under `[workspace.package]`.
+2. Move the relevant entries from `Unreleased` in `CHANGELOG.md` into a section
+ named for the version and release date.
+3. Install the pinned Python generator and regenerate bindings:
+
+ ```bash
+ python -m pip install build==1.3.0 grpcio-tools==1.81.1 twine==6.2.0
+ ./scripts/generate-python.sh
+ ./scripts/generate-rust.sh
+ ```
+
+4. Run the package checks:
+
+ ```bash
+ ./scripts/check-generated.sh
+ cargo test --locked --package openengine-proto
+ cargo package --allow-dirty --locked --package openengine-proto
+ python -m build packages/python --outdir dist/python
+ python -m twine check dist/python/*
+ python scripts/check_package_contents.py
+ ./scripts/test-cross-language.sh
+ ```
+
+5. Open and merge the release-preparation pull request.
+
+## Publish
+
+Create and push a signed tag from the release commit:
+
+```bash
+python scripts/check_release_version.py v0.2.0
+git tag --sign v0.2.0 -m "OpenEngine v0.2.0"
+git push origin v0.2.0
+```
+
+The `Release` workflow validates the schema, regenerates and tests both
+packages, and creates a GitHub release containing:
+
+- The Python wheel and source distribution.
+- The packaged Rust crate.
+- The canonical proto source archive.
+- The complete protobuf descriptor set.
+- SHA-256 checksums.
+
+Registry publication can be added later without changing package names or the
+coordinated versioning rule.
diff --git a/buf.yaml b/buf.yaml
index 592b8f1..f391dd2 100644
--- a/buf.yaml
+++ b/buf.yaml
@@ -12,3 +12,7 @@ lint:
# Discovery and event RPCs intentionally return their domain message type
# directly instead of adding one-field response wrappers.
- RPC_RESPONSE_STANDARD_NAME
+
+breaking:
+ use:
+ - FILE
diff --git a/docs/api.md b/docs/api.md
index 427441e..c6d2e50 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -90,16 +90,17 @@ message ParallelismInfo {
}
```
-Revision `1` is the schema in this repository. Every server must populate:
+Revision `2` is the schema in this repository. Every server must populate:
- `schema_revision` with the exact monotonically increasing contract revision it
implements. Zero is invalid.
- `minimum_client_revision` with the oldest client revision the server supports.
A client below this revision must reject the server as incompatible.
-- `schema_release` with an immutable OpenEngine repository release or source tag
- containing that revision. Moving branch names such as `main` are not valid.
+- `schema_release` with the immutable OpenEngine commit SHA containing that
+ revision. Release builds may use an immutable signed release tag instead;
+ moving branch names such as `main` are not valid.
-Servers implementing this contract advertise `schema_revision = 1` and
+Servers implementing this contract advertise `schema_revision = 2` and
`minimum_client_revision = 1`.
Clients should also define the oldest server revision they support and fail
@@ -149,6 +150,14 @@ message ModelInfo {
string reasoning_parser = 25;
string tool_call_parser = 26;
TaskCapabilities tasks = 27;
+ MultimodalCapabilities multimodal_capabilities = 28;
+}
+
+message MultimodalCapabilities {
+ repeated Modality aggregate_modalities = 1;
+ repeated Modality prefill_decode_modalities = 2;
+ repeated MediaSourceType source_types = 3;
+ optional bool supports_per_request_media_options = 4;
}
message GenerationCapabilities {
@@ -202,6 +211,16 @@ for the corresponding request options.
`supports_lora=true` means the engine accepts `GenerateRequest.lora_name` and
the LoRA lifecycle RPCs on `OpenEngine`.
+`supports_multimodal` remains the revision-1 compatibility signal. Revision-2
+clients use `multimodal_capabilities` to validate a request before scheduling.
+`aggregate_modalities` lists modalities accepted for normal generation;
+`prefill_decode_modalities` lists modalities accepted by the context-first
+prefill/decode path. The latter may be a strict subset, such as image and video
+for a model that only supports audio in aggregated mode. `source_types` lists
+the URL, data-URI, and raw-byte encodings the engine can consume. An absent
+`supports_per_request_media_options` is unreported, while an explicitly false
+value rejects non-empty `GenerateRequest.media_options`.
+
---
## Non-generative task API
@@ -618,6 +637,7 @@ message GenerateRequest {
string lora_name = 11;
optional int32 priority = 12;
map metadata = 13;
+ google.protobuf.Struct media_options = 14;
}
message TokenIds {
@@ -685,6 +705,13 @@ enum Modality {
MODALITY_AUDIO = 3;
}
+enum MediaSourceType {
+ MEDIA_SOURCE_TYPE_UNSPECIFIED = 0;
+ MEDIA_SOURCE_TYPE_URL = 1;
+ MEDIA_SOURCE_TYPE_DATA_URI = 2;
+ MEDIA_SOURCE_TYPE_RAW_BYTES = 3;
+}
+
// A single multimodal input. Exactly one `source` should be set. The engine
// owns fetch, decode, and preprocessing, so pre-decoded or RDMA media
// descriptors are not represented here.
@@ -732,6 +759,15 @@ candidates with `all {}` and JSON-object guidance with `json_object {}`.
`Generate` is always a server-streaming RPC, so response options do not carry a
second streaming switch.
+`media` order is significant and is preserved independently of modality. Each
+item uses exactly one source whose encoding is advertised in
+`ModelInfo.multimodal_capabilities.source_types`. `media_options` is keyed by
+the modality names `image`, `video`, and `audio`. The server applies its media
+processor defaults first, then shallow-merges request keys over the matching
+modality defaults. Existing modality-specific conflict rules continue to
+apply. Engines reject unsupported modalities, source types, option keys, or
+per-request options rather than silently ignoring them.
+
`include_stop_in_output` controls whether a matched caller-supplied stop token
or string remains in emitted output. `bypass_prefix_cache = true` skips prefix
cache reuse but does not prevent newly computed blocks from being cached.
diff --git a/packages/python/LICENSE b/packages/python/LICENSE
new file mode 100644
index 0000000..4c9ad98
--- /dev/null
+++ b/packages/python/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/packages/python/README.md b/packages/python/README.md
new file mode 100644
index 0000000..79f943b
--- /dev/null
+++ b/packages/python/README.md
@@ -0,0 +1,32 @@
+
+
+# OpenEngine Python bindings
+
+Generated protobuf messages and gRPC client/server bindings for the
+[`openengine.v1`](https://github.com/ai-dynamo/openengine/tree/main/proto/openengine/v1)
+protocol.
+
+```bash
+pip install ./packages/python
+```
+
+```python
+import grpc
+
+from openengine.v1.generation_pb2 import GenerateRequest
+from openengine.v1.openengine_pb2_grpc import OpenEngineStub
+
+channel = grpc.aio.insecure_channel("localhost:50051")
+engine = OpenEngineStub(channel)
+request = GenerateRequest(request_id="example", model="model", prompt="Hello")
+```
+
+The package contains generated code. Applications do not need Buf, `protoc`,
+or `grpcio-tools`.
+
+`SCHEMA_RELEASE` is deliberately `"unreleased"`: an engine server must inject
+the immutable OpenEngine commit SHA (or signed release tag) used by that build.
+The package version alone is not a source identity for path or Git dependencies.
diff --git a/packages/python/pyproject.toml b/packages/python/pyproject.toml
new file mode 100644
index 0000000..8b09de5
--- /dev/null
+++ b/packages/python/pyproject.toml
@@ -0,0 +1,41 @@
+[build-system]
+requires = ["hatchling==1.27.0"]
+build-backend = "hatchling.build"
+
+[project]
+name = "openengine-proto"
+version = "0.2.0"
+description = "Generated Python bindings for the OpenEngine gRPC protocol"
+readme = "README.md"
+requires-python = ">=3.10"
+license = "Apache-2.0"
+license-files = ["LICENSE"]
+authors = [{ name = "OpenEngine contributors" }]
+classifiers = [
+ "Development Status :: 3 - Alpha",
+ "Intended Audience :: Developers",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3 :: Only",
+ "Topic :: Software Development :: Libraries",
+ "Topic :: System :: Distributed Computing",
+]
+dependencies = [
+ "grpcio>=1.81.1,<2",
+ "protobuf>=6.33.5,<8",
+]
+
+[project.urls]
+Documentation = "https://github.com/ai-dynamo/openengine/tree/main/docs"
+Issues = "https://github.com/ai-dynamo/openengine/issues"
+Repository = "https://github.com/ai-dynamo/openengine"
+
+[tool.hatch.build.targets.sdist]
+include = [
+ "/LICENSE",
+ "/README.md",
+ "/pyproject.toml",
+ "/src",
+]
+
+[tool.hatch.build.targets.wheel]
+packages = ["src/openengine"]
diff --git a/packages/python/src/openengine/__init__.py b/packages/python/src/openengine/__init__.py
new file mode 100644
index 0000000..3e78d84
--- /dev/null
+++ b/packages/python/src/openengine/__init__.py
@@ -0,0 +1,22 @@
+"""Generated Python bindings for the OpenEngine protocol."""
+
+from importlib.metadata import PackageNotFoundError, version
+
+try:
+ __version__ = version("openengine-proto")
+except PackageNotFoundError:
+ __version__ = "0.0.0+local"
+
+SCHEMA_REVISION = 2
+MINIMUM_CLIENT_REVISION = 1
+# Package versions do not identify a path/Git dependency's exact source. Engine
+# servers must replace this sentinel with the immutable commit SHA or signed tag
+# they were built against.
+SCHEMA_RELEASE = "unreleased"
+
+__all__ = [
+ "MINIMUM_CLIENT_REVISION",
+ "SCHEMA_RELEASE",
+ "SCHEMA_REVISION",
+ "__version__",
+]
diff --git a/packages/python/src/openengine/py.typed b/packages/python/src/openengine/py.typed
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/packages/python/src/openengine/py.typed
@@ -0,0 +1 @@
+
diff --git a/packages/python/src/openengine/v1/__init__.py b/packages/python/src/openengine/v1/__init__.py
new file mode 100644
index 0000000..32b0339
--- /dev/null
+++ b/packages/python/src/openengine/v1/__init__.py
@@ -0,0 +1 @@
+"""The generated ``openengine.v1`` protobuf package."""
diff --git a/packages/python/src/openengine/v1/classification_pb2.py b/packages/python/src/openengine/v1/classification_pb2.py
new file mode 100644
index 0000000..3c8bebb
--- /dev/null
+++ b/packages/python/src/openengine/v1/classification_pb2.py
@@ -0,0 +1,46 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: openengine/v1/classification.proto
+# Protobuf Python Version: 6.33.5
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
+from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 6,
+ 33,
+ 5,
+ '',
+ 'openengine/v1/classification.proto'
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from openengine.v1 import input_pb2 as openengine_dot_v1_dot_input__pb2
+from openengine.v1 import tasks_pb2 as openengine_dot_v1_dot_tasks__pb2
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"openengine/v1/classification.proto\x12\ropenengine.v1\x1a\x19openengine/v1/input.proto\x1a\x19openengine/v1/tasks.proto\"\xeb\x03\n\x14\x43lassifyCapabilities\x12\x16\n\tsupported\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x31\n\x0binput_types\x18\x02 \x03(\x0e\x32\x1c.openengine.v1.TaskInputType\x12;\n\rgranularities\x18\x03 \x03(\x0e\x32$.openengine.v1.TaskOutputGranularity\x12\x34\n\tsemantics\x18\x04 \x03(\x0e\x32!.openengine.v1.TaskValueSemantics\x12\x1b\n\x0emax_batch_size\x18\x05 \x01(\rH\x01\x88\x01\x01\x12\'\n\x1amax_output_values_per_item\x18\x06 \x01(\x04H\x02\x88\x01\x01\x12\x1e\n\x11supports_priority\x18\x07 \x01(\x08H\x03\x88\x01\x01\x12\x1a\n\rsupports_lora\x18\x08 \x01(\x08H\x04\x88\x01\x01\x12+\n\nmodalities\x18\t \x03(\x0e\x32\x17.openengine.v1.ModalityB\x0c\n\n_supportedB\x11\n\x0f_max_batch_sizeB\x1d\n\x1b_max_output_values_per_itemB\x14\n\x12_supports_priorityB\x10\n\x0e_supports_lora\"\xa0\x01\n\x0f\x43lassifyRequest\x12\x32\n\x07\x63ontext\x18\x01 \x01(\x0b\x32!.openengine.v1.TaskRequestContext\x12(\n\x06inputs\x18\x02 \x03(\x0b\x32\x18.openengine.v1.TaskInput\x12/\n\x07options\x18\x03 \x01(\x0b\x32\x1e.openengine.v1.ClassifyOptions\"\xb8\x01\n\x0f\x43lassifyOptions\x12>\n\x0bgranularity\x18\x01 \x01(\x0e\x32$.openengine.v1.TaskOutputGranularityH\x00\x88\x01\x01\x12@\n\x10output_semantics\x18\x02 \x01(\x0e\x32!.openengine.v1.TaskValueSemanticsH\x01\x88\x01\x01\x42\x0e\n\x0c_granularityB\x13\n\x11_output_semantics\"\x85\x01\n\x10\x43lassifyResponse\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\x34\n\x07outputs\x18\x02 \x03(\x0b\x32#.openengine.v1.ClassificationOutput\x12\'\n\x05usage\x18\x03 \x01(\x0b\x32\x18.openengine.v1.TaskUsage\"\x96\x02\n\x14\x43lassificationOutput\x12\x0f\n\x07item_id\x18\x01 \x01(\t\x12\x18\n\x0binput_index\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x39\n\x0bgranularity\x18\x03 \x01(\x0e\x32$.openengine.v1.TaskOutputGranularity\x12\x34\n\tsemantics\x18\x04 \x01(\x0e\x32!.openengine.v1.TaskValueSemantics\x12/\n\x06scores\x18\x05 \x01(\x0b\x32\x1f.openengine.v1.DenseFloatTensor\x12\x0e\n\x06labels\x18\x06 \x03(\t\x12\x11\n\ttoken_ids\x18\x07 \x03(\rB\x0e\n\x0c_input_indexb\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'openengine.v1.classification_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ DESCRIPTOR._loaded_options = None
+ _globals['_CLASSIFYCAPABILITIES']._serialized_start=108
+ _globals['_CLASSIFYCAPABILITIES']._serialized_end=599
+ _globals['_CLASSIFYREQUEST']._serialized_start=602
+ _globals['_CLASSIFYREQUEST']._serialized_end=762
+ _globals['_CLASSIFYOPTIONS']._serialized_start=765
+ _globals['_CLASSIFYOPTIONS']._serialized_end=949
+ _globals['_CLASSIFYRESPONSE']._serialized_start=952
+ _globals['_CLASSIFYRESPONSE']._serialized_end=1085
+ _globals['_CLASSIFICATIONOUTPUT']._serialized_start=1088
+ _globals['_CLASSIFICATIONOUTPUT']._serialized_end=1366
+# @@protoc_insertion_point(module_scope)
diff --git a/packages/python/src/openengine/v1/classification_pb2.pyi b/packages/python/src/openengine/v1/classification_pb2.pyi
new file mode 100644
index 0000000..0e3f726
--- /dev/null
+++ b/packages/python/src/openengine/v1/classification_pb2.pyi
@@ -0,0 +1,77 @@
+from openengine.v1 import input_pb2 as _input_pb2
+from openengine.v1 import tasks_pb2 as _tasks_pb2
+from google.protobuf.internal import containers as _containers
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from collections.abc import Iterable as _Iterable, Mapping as _Mapping
+from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
+
+DESCRIPTOR: _descriptor.FileDescriptor
+
+class ClassifyCapabilities(_message.Message):
+ __slots__ = ("supported", "input_types", "granularities", "semantics", "max_batch_size", "max_output_values_per_item", "supports_priority", "supports_lora", "modalities")
+ SUPPORTED_FIELD_NUMBER: _ClassVar[int]
+ INPUT_TYPES_FIELD_NUMBER: _ClassVar[int]
+ GRANULARITIES_FIELD_NUMBER: _ClassVar[int]
+ SEMANTICS_FIELD_NUMBER: _ClassVar[int]
+ MAX_BATCH_SIZE_FIELD_NUMBER: _ClassVar[int]
+ MAX_OUTPUT_VALUES_PER_ITEM_FIELD_NUMBER: _ClassVar[int]
+ SUPPORTS_PRIORITY_FIELD_NUMBER: _ClassVar[int]
+ SUPPORTS_LORA_FIELD_NUMBER: _ClassVar[int]
+ MODALITIES_FIELD_NUMBER: _ClassVar[int]
+ supported: bool
+ input_types: _containers.RepeatedScalarFieldContainer[_input_pb2.TaskInputType]
+ granularities: _containers.RepeatedScalarFieldContainer[_tasks_pb2.TaskOutputGranularity]
+ semantics: _containers.RepeatedScalarFieldContainer[_tasks_pb2.TaskValueSemantics]
+ max_batch_size: int
+ max_output_values_per_item: int
+ supports_priority: bool
+ supports_lora: bool
+ modalities: _containers.RepeatedScalarFieldContainer[_input_pb2.Modality]
+ def __init__(self, supported: _Optional[bool] = ..., input_types: _Optional[_Iterable[_Union[_input_pb2.TaskInputType, str]]] = ..., granularities: _Optional[_Iterable[_Union[_tasks_pb2.TaskOutputGranularity, str]]] = ..., semantics: _Optional[_Iterable[_Union[_tasks_pb2.TaskValueSemantics, str]]] = ..., max_batch_size: _Optional[int] = ..., max_output_values_per_item: _Optional[int] = ..., supports_priority: _Optional[bool] = ..., supports_lora: _Optional[bool] = ..., modalities: _Optional[_Iterable[_Union[_input_pb2.Modality, str]]] = ...) -> None: ...
+
+class ClassifyRequest(_message.Message):
+ __slots__ = ("context", "inputs", "options")
+ CONTEXT_FIELD_NUMBER: _ClassVar[int]
+ INPUTS_FIELD_NUMBER: _ClassVar[int]
+ OPTIONS_FIELD_NUMBER: _ClassVar[int]
+ context: _tasks_pb2.TaskRequestContext
+ inputs: _containers.RepeatedCompositeFieldContainer[_input_pb2.TaskInput]
+ options: ClassifyOptions
+ def __init__(self, context: _Optional[_Union[_tasks_pb2.TaskRequestContext, _Mapping]] = ..., inputs: _Optional[_Iterable[_Union[_input_pb2.TaskInput, _Mapping]]] = ..., options: _Optional[_Union[ClassifyOptions, _Mapping]] = ...) -> None: ...
+
+class ClassifyOptions(_message.Message):
+ __slots__ = ("granularity", "output_semantics")
+ GRANULARITY_FIELD_NUMBER: _ClassVar[int]
+ OUTPUT_SEMANTICS_FIELD_NUMBER: _ClassVar[int]
+ granularity: _tasks_pb2.TaskOutputGranularity
+ output_semantics: _tasks_pb2.TaskValueSemantics
+ def __init__(self, granularity: _Optional[_Union[_tasks_pb2.TaskOutputGranularity, str]] = ..., output_semantics: _Optional[_Union[_tasks_pb2.TaskValueSemantics, str]] = ...) -> None: ...
+
+class ClassifyResponse(_message.Message):
+ __slots__ = ("request_id", "outputs", "usage")
+ REQUEST_ID_FIELD_NUMBER: _ClassVar[int]
+ OUTPUTS_FIELD_NUMBER: _ClassVar[int]
+ USAGE_FIELD_NUMBER: _ClassVar[int]
+ request_id: str
+ outputs: _containers.RepeatedCompositeFieldContainer[ClassificationOutput]
+ usage: _tasks_pb2.TaskUsage
+ def __init__(self, request_id: _Optional[str] = ..., outputs: _Optional[_Iterable[_Union[ClassificationOutput, _Mapping]]] = ..., usage: _Optional[_Union[_tasks_pb2.TaskUsage, _Mapping]] = ...) -> None: ...
+
+class ClassificationOutput(_message.Message):
+ __slots__ = ("item_id", "input_index", "granularity", "semantics", "scores", "labels", "token_ids")
+ ITEM_ID_FIELD_NUMBER: _ClassVar[int]
+ INPUT_INDEX_FIELD_NUMBER: _ClassVar[int]
+ GRANULARITY_FIELD_NUMBER: _ClassVar[int]
+ SEMANTICS_FIELD_NUMBER: _ClassVar[int]
+ SCORES_FIELD_NUMBER: _ClassVar[int]
+ LABELS_FIELD_NUMBER: _ClassVar[int]
+ TOKEN_IDS_FIELD_NUMBER: _ClassVar[int]
+ item_id: str
+ input_index: int
+ granularity: _tasks_pb2.TaskOutputGranularity
+ semantics: _tasks_pb2.TaskValueSemantics
+ scores: _tasks_pb2.DenseFloatTensor
+ labels: _containers.RepeatedScalarFieldContainer[str]
+ token_ids: _containers.RepeatedScalarFieldContainer[int]
+ def __init__(self, item_id: _Optional[str] = ..., input_index: _Optional[int] = ..., granularity: _Optional[_Union[_tasks_pb2.TaskOutputGranularity, str]] = ..., semantics: _Optional[_Union[_tasks_pb2.TaskValueSemantics, str]] = ..., scores: _Optional[_Union[_tasks_pb2.DenseFloatTensor, _Mapping]] = ..., labels: _Optional[_Iterable[str]] = ..., token_ids: _Optional[_Iterable[int]] = ...) -> None: ...
diff --git a/packages/python/src/openengine/v1/embedding_pb2.py b/packages/python/src/openengine/v1/embedding_pb2.py
new file mode 100644
index 0000000..90f85a0
--- /dev/null
+++ b/packages/python/src/openengine/v1/embedding_pb2.py
@@ -0,0 +1,50 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: openengine/v1/embedding.proto
+# Protobuf Python Version: 6.33.5
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
+from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 6,
+ 33,
+ 5,
+ '',
+ 'openengine/v1/embedding.proto'
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from openengine.v1 import input_pb2 as openengine_dot_v1_dot_input__pb2
+from openengine.v1 import tasks_pb2 as openengine_dot_v1_dot_tasks__pb2
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dopenengine/v1/embedding.proto\x12\ropenengine.v1\x1a\x19openengine/v1/input.proto\x1a\x19openengine/v1/tasks.proto\"C\n\x11SparseFloatTensor\x12\r\n\x05shape\x18\x01 \x03(\x04\x12\x0f\n\x07indices\x18\x02 \x03(\x04\x12\x0e\n\x06values\x18\x03 \x03(\x02\"\x97\x05\n\x11\x45mbedCapabilities\x12\x16\n\tsupported\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x31\n\x0binput_types\x18\x02 \x03(\x0e\x32\x1c.openengine.v1.TaskInputType\x12;\n\rgranularities\x18\x03 \x03(\x0e\x32$.openengine.v1.TaskOutputGranularity\x12\x33\n\tencodings\x18\x04 \x03(\x0e\x32 .openengine.v1.EmbeddingEncoding\x12\x16\n\tdimension\x18\x05 \x01(\rH\x01\x88\x01\x01\x12\x1b\n\x0emax_batch_size\x18\x06 \x01(\rH\x02\x88\x01\x01\x12\'\n\x1amax_output_values_per_item\x18\x07 \x01(\x04H\x03\x88\x01\x01\x12\x1e\n\x11supports_priority\x18\x08 \x01(\x08H\x04\x88\x01\x01\x12\x1a\n\rsupports_lora\x18\t \x01(\x08H\x05\x88\x01\x01\x12#\n\x16supports_normalization\x18\n \x01(\x08H\x06\x88\x01\x01\x12(\n\x1bsupports_dimension_override\x18\x0b \x01(\x08H\x07\x88\x01\x01\x12+\n\nmodalities\x18\x0c \x03(\x0e\x32\x17.openengine.v1.ModalityB\x0c\n\n_supportedB\x0c\n\n_dimensionB\x11\n\x0f_max_batch_sizeB\x1d\n\x1b_max_output_values_per_itemB\x14\n\x12_supports_priorityB\x10\n\x0e_supports_loraB\x19\n\x17_supports_normalizationB\x1e\n\x1c_supports_dimension_override\"\x9a\x01\n\x0c\x45mbedRequest\x12\x32\n\x07\x63ontext\x18\x01 \x01(\x0b\x32!.openengine.v1.TaskRequestContext\x12(\n\x06inputs\x18\x02 \x03(\x0b\x32\x18.openengine.v1.TaskInput\x12,\n\x07options\x18\x03 \x01(\x0b\x32\x1b.openengine.v1.EmbedOptions\"\xf2\x01\n\x0c\x45mbedOptions\x12>\n\x0bgranularity\x18\x01 \x01(\x0e\x32$.openengine.v1.TaskOutputGranularityH\x00\x88\x01\x01\x12\x16\n\tnormalize\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x17\n\ndimensions\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x37\n\x08\x65ncoding\x18\x04 \x01(\x0e\x32 .openengine.v1.EmbeddingEncodingH\x03\x88\x01\x01\x42\x0e\n\x0c_granularityB\x0c\n\n_normalizeB\r\n\x0b_dimensionsB\x0b\n\t_encoding\"}\n\rEmbedResponse\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12/\n\x07outputs\x18\x02 \x03(\x0b\x32\x1e.openengine.v1.EmbeddingOutput\x12\'\n\x05usage\x18\x03 \x01(\x0b\x32\x18.openengine.v1.TaskUsage\"\x8d\x02\n\x0f\x45mbeddingOutput\x12\x0f\n\x07item_id\x18\x01 \x01(\t\x12\x18\n\x0binput_index\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x39\n\x0bgranularity\x18\x03 \x01(\x0e\x32$.openengine.v1.TaskOutputGranularity\x12\x30\n\x05\x64\x65nse\x18\x04 \x01(\x0b\x32\x1f.openengine.v1.DenseFloatTensorH\x00\x12\x32\n\x06sparse\x18\x05 \x01(\x0b\x32 .openengine.v1.SparseFloatTensorH\x00\x12\x11\n\ttoken_ids\x18\x06 \x03(\rB\x0b\n\tembeddingB\x0e\n\x0c_input_index*t\n\x11\x45mbeddingEncoding\x12\"\n\x1e\x45MBEDDING_ENCODING_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x45MBEDDING_ENCODING_DENSE\x10\x01\x12\x1d\n\x19\x45MBEDDING_ENCODING_SPARSE\x10\x02\x62\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'openengine.v1.embedding_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ DESCRIPTOR._loaded_options = None
+ _globals['_EMBEDDINGENCODING']._serialized_start=1638
+ _globals['_EMBEDDINGENCODING']._serialized_end=1754
+ _globals['_SPARSEFLOATTENSOR']._serialized_start=102
+ _globals['_SPARSEFLOATTENSOR']._serialized_end=169
+ _globals['_EMBEDCAPABILITIES']._serialized_start=172
+ _globals['_EMBEDCAPABILITIES']._serialized_end=835
+ _globals['_EMBEDREQUEST']._serialized_start=838
+ _globals['_EMBEDREQUEST']._serialized_end=992
+ _globals['_EMBEDOPTIONS']._serialized_start=995
+ _globals['_EMBEDOPTIONS']._serialized_end=1237
+ _globals['_EMBEDRESPONSE']._serialized_start=1239
+ _globals['_EMBEDRESPONSE']._serialized_end=1364
+ _globals['_EMBEDDINGOUTPUT']._serialized_start=1367
+ _globals['_EMBEDDINGOUTPUT']._serialized_end=1636
+# @@protoc_insertion_point(module_scope)
diff --git a/packages/python/src/openengine/v1/embedding_pb2.pyi b/packages/python/src/openengine/v1/embedding_pb2.pyi
new file mode 100644
index 0000000..1d8990c
--- /dev/null
+++ b/packages/python/src/openengine/v1/embedding_pb2.pyi
@@ -0,0 +1,105 @@
+from openengine.v1 import input_pb2 as _input_pb2
+from openengine.v1 import tasks_pb2 as _tasks_pb2
+from google.protobuf.internal import containers as _containers
+from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from collections.abc import Iterable as _Iterable, Mapping as _Mapping
+from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
+
+DESCRIPTOR: _descriptor.FileDescriptor
+
+class EmbeddingEncoding(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ EMBEDDING_ENCODING_UNSPECIFIED: _ClassVar[EmbeddingEncoding]
+ EMBEDDING_ENCODING_DENSE: _ClassVar[EmbeddingEncoding]
+ EMBEDDING_ENCODING_SPARSE: _ClassVar[EmbeddingEncoding]
+EMBEDDING_ENCODING_UNSPECIFIED: EmbeddingEncoding
+EMBEDDING_ENCODING_DENSE: EmbeddingEncoding
+EMBEDDING_ENCODING_SPARSE: EmbeddingEncoding
+
+class SparseFloatTensor(_message.Message):
+ __slots__ = ("shape", "indices", "values")
+ SHAPE_FIELD_NUMBER: _ClassVar[int]
+ INDICES_FIELD_NUMBER: _ClassVar[int]
+ VALUES_FIELD_NUMBER: _ClassVar[int]
+ shape: _containers.RepeatedScalarFieldContainer[int]
+ indices: _containers.RepeatedScalarFieldContainer[int]
+ values: _containers.RepeatedScalarFieldContainer[float]
+ def __init__(self, shape: _Optional[_Iterable[int]] = ..., indices: _Optional[_Iterable[int]] = ..., values: _Optional[_Iterable[float]] = ...) -> None: ...
+
+class EmbedCapabilities(_message.Message):
+ __slots__ = ("supported", "input_types", "granularities", "encodings", "dimension", "max_batch_size", "max_output_values_per_item", "supports_priority", "supports_lora", "supports_normalization", "supports_dimension_override", "modalities")
+ SUPPORTED_FIELD_NUMBER: _ClassVar[int]
+ INPUT_TYPES_FIELD_NUMBER: _ClassVar[int]
+ GRANULARITIES_FIELD_NUMBER: _ClassVar[int]
+ ENCODINGS_FIELD_NUMBER: _ClassVar[int]
+ DIMENSION_FIELD_NUMBER: _ClassVar[int]
+ MAX_BATCH_SIZE_FIELD_NUMBER: _ClassVar[int]
+ MAX_OUTPUT_VALUES_PER_ITEM_FIELD_NUMBER: _ClassVar[int]
+ SUPPORTS_PRIORITY_FIELD_NUMBER: _ClassVar[int]
+ SUPPORTS_LORA_FIELD_NUMBER: _ClassVar[int]
+ SUPPORTS_NORMALIZATION_FIELD_NUMBER: _ClassVar[int]
+ SUPPORTS_DIMENSION_OVERRIDE_FIELD_NUMBER: _ClassVar[int]
+ MODALITIES_FIELD_NUMBER: _ClassVar[int]
+ supported: bool
+ input_types: _containers.RepeatedScalarFieldContainer[_input_pb2.TaskInputType]
+ granularities: _containers.RepeatedScalarFieldContainer[_tasks_pb2.TaskOutputGranularity]
+ encodings: _containers.RepeatedScalarFieldContainer[EmbeddingEncoding]
+ dimension: int
+ max_batch_size: int
+ max_output_values_per_item: int
+ supports_priority: bool
+ supports_lora: bool
+ supports_normalization: bool
+ supports_dimension_override: bool
+ modalities: _containers.RepeatedScalarFieldContainer[_input_pb2.Modality]
+ def __init__(self, supported: _Optional[bool] = ..., input_types: _Optional[_Iterable[_Union[_input_pb2.TaskInputType, str]]] = ..., granularities: _Optional[_Iterable[_Union[_tasks_pb2.TaskOutputGranularity, str]]] = ..., encodings: _Optional[_Iterable[_Union[EmbeddingEncoding, str]]] = ..., dimension: _Optional[int] = ..., max_batch_size: _Optional[int] = ..., max_output_values_per_item: _Optional[int] = ..., supports_priority: _Optional[bool] = ..., supports_lora: _Optional[bool] = ..., supports_normalization: _Optional[bool] = ..., supports_dimension_override: _Optional[bool] = ..., modalities: _Optional[_Iterable[_Union[_input_pb2.Modality, str]]] = ...) -> None: ...
+
+class EmbedRequest(_message.Message):
+ __slots__ = ("context", "inputs", "options")
+ CONTEXT_FIELD_NUMBER: _ClassVar[int]
+ INPUTS_FIELD_NUMBER: _ClassVar[int]
+ OPTIONS_FIELD_NUMBER: _ClassVar[int]
+ context: _tasks_pb2.TaskRequestContext
+ inputs: _containers.RepeatedCompositeFieldContainer[_input_pb2.TaskInput]
+ options: EmbedOptions
+ def __init__(self, context: _Optional[_Union[_tasks_pb2.TaskRequestContext, _Mapping]] = ..., inputs: _Optional[_Iterable[_Union[_input_pb2.TaskInput, _Mapping]]] = ..., options: _Optional[_Union[EmbedOptions, _Mapping]] = ...) -> None: ...
+
+class EmbedOptions(_message.Message):
+ __slots__ = ("granularity", "normalize", "dimensions", "encoding")
+ GRANULARITY_FIELD_NUMBER: _ClassVar[int]
+ NORMALIZE_FIELD_NUMBER: _ClassVar[int]
+ DIMENSIONS_FIELD_NUMBER: _ClassVar[int]
+ ENCODING_FIELD_NUMBER: _ClassVar[int]
+ granularity: _tasks_pb2.TaskOutputGranularity
+ normalize: bool
+ dimensions: int
+ encoding: EmbeddingEncoding
+ def __init__(self, granularity: _Optional[_Union[_tasks_pb2.TaskOutputGranularity, str]] = ..., normalize: _Optional[bool] = ..., dimensions: _Optional[int] = ..., encoding: _Optional[_Union[EmbeddingEncoding, str]] = ...) -> None: ...
+
+class EmbedResponse(_message.Message):
+ __slots__ = ("request_id", "outputs", "usage")
+ REQUEST_ID_FIELD_NUMBER: _ClassVar[int]
+ OUTPUTS_FIELD_NUMBER: _ClassVar[int]
+ USAGE_FIELD_NUMBER: _ClassVar[int]
+ request_id: str
+ outputs: _containers.RepeatedCompositeFieldContainer[EmbeddingOutput]
+ usage: _tasks_pb2.TaskUsage
+ def __init__(self, request_id: _Optional[str] = ..., outputs: _Optional[_Iterable[_Union[EmbeddingOutput, _Mapping]]] = ..., usage: _Optional[_Union[_tasks_pb2.TaskUsage, _Mapping]] = ...) -> None: ...
+
+class EmbeddingOutput(_message.Message):
+ __slots__ = ("item_id", "input_index", "granularity", "dense", "sparse", "token_ids")
+ ITEM_ID_FIELD_NUMBER: _ClassVar[int]
+ INPUT_INDEX_FIELD_NUMBER: _ClassVar[int]
+ GRANULARITY_FIELD_NUMBER: _ClassVar[int]
+ DENSE_FIELD_NUMBER: _ClassVar[int]
+ SPARSE_FIELD_NUMBER: _ClassVar[int]
+ TOKEN_IDS_FIELD_NUMBER: _ClassVar[int]
+ item_id: str
+ input_index: int
+ granularity: _tasks_pb2.TaskOutputGranularity
+ dense: _tasks_pb2.DenseFloatTensor
+ sparse: SparseFloatTensor
+ token_ids: _containers.RepeatedScalarFieldContainer[int]
+ def __init__(self, item_id: _Optional[str] = ..., input_index: _Optional[int] = ..., granularity: _Optional[_Union[_tasks_pb2.TaskOutputGranularity, str]] = ..., dense: _Optional[_Union[_tasks_pb2.DenseFloatTensor, _Mapping]] = ..., sparse: _Optional[_Union[SparseFloatTensor, _Mapping]] = ..., token_ids: _Optional[_Iterable[int]] = ...) -> None: ...
diff --git a/packages/python/src/openengine/v1/engine_pb2.py b/packages/python/src/openengine/v1/engine_pb2.py
new file mode 100644
index 0000000..30df65b
--- /dev/null
+++ b/packages/python/src/openengine/v1/engine_pb2.py
@@ -0,0 +1,43 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: openengine/v1/engine.proto
+# Protobuf Python Version: 6.33.5
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
+from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 6,
+ 33,
+ 5,
+ '',
+ 'openengine/v1/engine.proto'
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from openengine.v1 import kv_pb2 as openengine_dot_v1_dot_kv__pb2
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1aopenengine/v1/engine.proto\x12\ropenengine.v1\x1a\x16openengine/v1/kv.proto\"\x16\n\x14GetEngineInfoRequest\"\xce\x02\n\nEngineInfo\x12\x13\n\x0b\x65ngine_name\x18\x01 \x01(\t\x12\x16\n\x0e\x65ngine_version\x18\x02 \x01(\t\x12\'\n\x04role\x18\x03 \x01(\x0e\x32\x19.openengine.v1.EngineRole\x12\x13\n\x0binstance_id\x18\x04 \x01(\t\x12\x18\n\x10supported_models\x18\x05 \x03(\t\x12\x33\n\x0bparallelism\x18\x06 \x01(\x0b\x32\x1e.openengine.v1.ParallelismInfo\x12\x34\n\x0ckv_connector\x18\x07 \x01(\x0b\x32\x1e.openengine.v1.KvConnectorInfo\x12\x17\n\x0fschema_revision\x18\x08 \x01(\r\x12\x1f\n\x17minimum_client_revision\x18\t \x01(\r\x12\x16\n\x0eschema_release\x18\n \x01(\t\"\xc1\x02\n\x0fParallelismInfo\x12!\n\x14tensor_parallel_size\x18\x01 \x01(\rH\x00\x88\x01\x01\x12#\n\x16pipeline_parallel_size\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1f\n\x12\x64\x61ta_parallel_size\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x1f\n\x12\x64\x61ta_parallel_rank\x18\x04 \x01(\rH\x03\x88\x01\x01\x12%\n\x18\x64\x61ta_parallel_start_rank\x18\x05 \x01(\rH\x04\x88\x01\x01\x42\x17\n\x15_tensor_parallel_sizeB\x19\n\x17_pipeline_parallel_sizeB\x15\n\x13_data_parallel_sizeB\x15\n\x13_data_parallel_rankB\x1b\n\x19_data_parallel_start_rank*v\n\nEngineRole\x12\x1b\n\x17\x45NGINE_ROLE_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x45NGINE_ROLE_AGGREGATED\x10\x01\x12\x17\n\x13\x45NGINE_ROLE_PREFILL\x10\x02\x12\x16\n\x12\x45NGINE_ROLE_DECODE\x10\x03\x62\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'openengine.v1.engine_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ DESCRIPTOR._loaded_options = None
+ _globals['_ENGINEROLE']._serialized_start=754
+ _globals['_ENGINEROLE']._serialized_end=872
+ _globals['_GETENGINEINFOREQUEST']._serialized_start=69
+ _globals['_GETENGINEINFOREQUEST']._serialized_end=91
+ _globals['_ENGINEINFO']._serialized_start=94
+ _globals['_ENGINEINFO']._serialized_end=428
+ _globals['_PARALLELISMINFO']._serialized_start=431
+ _globals['_PARALLELISMINFO']._serialized_end=752
+# @@protoc_insertion_point(module_scope)
diff --git a/packages/python/src/openengine/v1/engine_pb2.pyi b/packages/python/src/openengine/v1/engine_pb2.pyi
new file mode 100644
index 0000000..e07e53b
--- /dev/null
+++ b/packages/python/src/openengine/v1/engine_pb2.pyi
@@ -0,0 +1,62 @@
+from openengine.v1 import kv_pb2 as _kv_pb2
+from google.protobuf.internal import containers as _containers
+from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from collections.abc import Iterable as _Iterable, Mapping as _Mapping
+from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
+
+DESCRIPTOR: _descriptor.FileDescriptor
+
+class EngineRole(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ ENGINE_ROLE_UNSPECIFIED: _ClassVar[EngineRole]
+ ENGINE_ROLE_AGGREGATED: _ClassVar[EngineRole]
+ ENGINE_ROLE_PREFILL: _ClassVar[EngineRole]
+ ENGINE_ROLE_DECODE: _ClassVar[EngineRole]
+ENGINE_ROLE_UNSPECIFIED: EngineRole
+ENGINE_ROLE_AGGREGATED: EngineRole
+ENGINE_ROLE_PREFILL: EngineRole
+ENGINE_ROLE_DECODE: EngineRole
+
+class GetEngineInfoRequest(_message.Message):
+ __slots__ = ()
+ def __init__(self) -> None: ...
+
+class EngineInfo(_message.Message):
+ __slots__ = ("engine_name", "engine_version", "role", "instance_id", "supported_models", "parallelism", "kv_connector", "schema_revision", "minimum_client_revision", "schema_release")
+ ENGINE_NAME_FIELD_NUMBER: _ClassVar[int]
+ ENGINE_VERSION_FIELD_NUMBER: _ClassVar[int]
+ ROLE_FIELD_NUMBER: _ClassVar[int]
+ INSTANCE_ID_FIELD_NUMBER: _ClassVar[int]
+ SUPPORTED_MODELS_FIELD_NUMBER: _ClassVar[int]
+ PARALLELISM_FIELD_NUMBER: _ClassVar[int]
+ KV_CONNECTOR_FIELD_NUMBER: _ClassVar[int]
+ SCHEMA_REVISION_FIELD_NUMBER: _ClassVar[int]
+ MINIMUM_CLIENT_REVISION_FIELD_NUMBER: _ClassVar[int]
+ SCHEMA_RELEASE_FIELD_NUMBER: _ClassVar[int]
+ engine_name: str
+ engine_version: str
+ role: EngineRole
+ instance_id: str
+ supported_models: _containers.RepeatedScalarFieldContainer[str]
+ parallelism: ParallelismInfo
+ kv_connector: _kv_pb2.KvConnectorInfo
+ schema_revision: int
+ minimum_client_revision: int
+ schema_release: str
+ def __init__(self, engine_name: _Optional[str] = ..., engine_version: _Optional[str] = ..., role: _Optional[_Union[EngineRole, str]] = ..., instance_id: _Optional[str] = ..., supported_models: _Optional[_Iterable[str]] = ..., parallelism: _Optional[_Union[ParallelismInfo, _Mapping]] = ..., kv_connector: _Optional[_Union[_kv_pb2.KvConnectorInfo, _Mapping]] = ..., schema_revision: _Optional[int] = ..., minimum_client_revision: _Optional[int] = ..., schema_release: _Optional[str] = ...) -> None: ...
+
+class ParallelismInfo(_message.Message):
+ __slots__ = ("tensor_parallel_size", "pipeline_parallel_size", "data_parallel_size", "data_parallel_rank", "data_parallel_start_rank")
+ TENSOR_PARALLEL_SIZE_FIELD_NUMBER: _ClassVar[int]
+ PIPELINE_PARALLEL_SIZE_FIELD_NUMBER: _ClassVar[int]
+ DATA_PARALLEL_SIZE_FIELD_NUMBER: _ClassVar[int]
+ DATA_PARALLEL_RANK_FIELD_NUMBER: _ClassVar[int]
+ DATA_PARALLEL_START_RANK_FIELD_NUMBER: _ClassVar[int]
+ tensor_parallel_size: int
+ pipeline_parallel_size: int
+ data_parallel_size: int
+ data_parallel_rank: int
+ data_parallel_start_rank: int
+ def __init__(self, tensor_parallel_size: _Optional[int] = ..., pipeline_parallel_size: _Optional[int] = ..., data_parallel_size: _Optional[int] = ..., data_parallel_rank: _Optional[int] = ..., data_parallel_start_rank: _Optional[int] = ...) -> None: ...
diff --git a/packages/python/src/openengine/v1/error_pb2.py b/packages/python/src/openengine/v1/error_pb2.py
new file mode 100644
index 0000000..907d15a
--- /dev/null
+++ b/packages/python/src/openengine/v1/error_pb2.py
@@ -0,0 +1,39 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: openengine/v1/error.proto
+# Protobuf Python Version: 6.33.5
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
+from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 6,
+ 33,
+ 5,
+ '',
+ 'openengine/v1/error.proto'
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19openengine/v1/error.proto\x12\ropenengine.v1\x1a\x1cgoogle/protobuf/struct.proto\"\xb3\x01\n\x0b\x45ngineError\x12&\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x18.openengine.v1.ErrorCode\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x11\n\tretryable\x18\x03 \x01(\x08\x12\x1b\n\x0eretry_after_ms\x18\x04 \x01(\x04H\x00\x88\x01\x01\x12(\n\x07\x64\x65tails\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x11\n\x0f_retry_after_ms*\x9d\x03\n\tErrorCode\x12\x1a\n\x16\x45RROR_CODE_UNSPECIFIED\x10\x00\x12\x1f\n\x1b\x45RROR_CODE_INVALID_ARGUMENT\x10\x01\x12\"\n\x1e\x45RROR_CODE_UNSUPPORTED_FEATURE\x10\x02\x12\x1c\n\x18\x45RROR_CODE_ROLE_MISMATCH\x10\x03\x12\x1e\n\x1a\x45RROR_CODE_MODEL_NOT_FOUND\x10\x04\x12\x19\n\x15\x45RROR_CODE_OVERLOADED\x10\x05\x12 \n\x1c\x45RROR_CODE_REQUEST_NOT_FOUND\x10\x06\x12 \n\x1c\x45RROR_CODE_DUPLICATE_REQUEST\x10\x07\x12#\n\x1f\x45RROR_CODE_KV_SESSION_NOT_FOUND\x10\x08\x12!\n\x1d\x45RROR_CODE_KV_TRANSFER_FAILED\x10\t\x12\x18\n\x14\x45RROR_CODE_CANCELLED\x10\n\x12\x17\n\x13\x45RROR_CODE_DRAINING\x10\x0b\x12\x17\n\x13\x45RROR_CODE_INTERNAL\x10\x0c\x62\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'openengine.v1.error_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ DESCRIPTOR._loaded_options = None
+ _globals['_ERRORCODE']._serialized_start=257
+ _globals['_ERRORCODE']._serialized_end=670
+ _globals['_ENGINEERROR']._serialized_start=75
+ _globals['_ENGINEERROR']._serialized_end=254
+# @@protoc_insertion_point(module_scope)
diff --git a/packages/python/src/openengine/v1/error_pb2.pyi b/packages/python/src/openengine/v1/error_pb2.pyi
new file mode 100644
index 0000000..4933b85
--- /dev/null
+++ b/packages/python/src/openengine/v1/error_pb2.pyi
@@ -0,0 +1,51 @@
+from google.protobuf import struct_pb2 as _struct_pb2
+from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from collections.abc import Mapping as _Mapping
+from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
+
+DESCRIPTOR: _descriptor.FileDescriptor
+
+class ErrorCode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ ERROR_CODE_UNSPECIFIED: _ClassVar[ErrorCode]
+ ERROR_CODE_INVALID_ARGUMENT: _ClassVar[ErrorCode]
+ ERROR_CODE_UNSUPPORTED_FEATURE: _ClassVar[ErrorCode]
+ ERROR_CODE_ROLE_MISMATCH: _ClassVar[ErrorCode]
+ ERROR_CODE_MODEL_NOT_FOUND: _ClassVar[ErrorCode]
+ ERROR_CODE_OVERLOADED: _ClassVar[ErrorCode]
+ ERROR_CODE_REQUEST_NOT_FOUND: _ClassVar[ErrorCode]
+ ERROR_CODE_DUPLICATE_REQUEST: _ClassVar[ErrorCode]
+ ERROR_CODE_KV_SESSION_NOT_FOUND: _ClassVar[ErrorCode]
+ ERROR_CODE_KV_TRANSFER_FAILED: _ClassVar[ErrorCode]
+ ERROR_CODE_CANCELLED: _ClassVar[ErrorCode]
+ ERROR_CODE_DRAINING: _ClassVar[ErrorCode]
+ ERROR_CODE_INTERNAL: _ClassVar[ErrorCode]
+ERROR_CODE_UNSPECIFIED: ErrorCode
+ERROR_CODE_INVALID_ARGUMENT: ErrorCode
+ERROR_CODE_UNSUPPORTED_FEATURE: ErrorCode
+ERROR_CODE_ROLE_MISMATCH: ErrorCode
+ERROR_CODE_MODEL_NOT_FOUND: ErrorCode
+ERROR_CODE_OVERLOADED: ErrorCode
+ERROR_CODE_REQUEST_NOT_FOUND: ErrorCode
+ERROR_CODE_DUPLICATE_REQUEST: ErrorCode
+ERROR_CODE_KV_SESSION_NOT_FOUND: ErrorCode
+ERROR_CODE_KV_TRANSFER_FAILED: ErrorCode
+ERROR_CODE_CANCELLED: ErrorCode
+ERROR_CODE_DRAINING: ErrorCode
+ERROR_CODE_INTERNAL: ErrorCode
+
+class EngineError(_message.Message):
+ __slots__ = ("code", "message", "retryable", "retry_after_ms", "details")
+ CODE_FIELD_NUMBER: _ClassVar[int]
+ MESSAGE_FIELD_NUMBER: _ClassVar[int]
+ RETRYABLE_FIELD_NUMBER: _ClassVar[int]
+ RETRY_AFTER_MS_FIELD_NUMBER: _ClassVar[int]
+ DETAILS_FIELD_NUMBER: _ClassVar[int]
+ code: ErrorCode
+ message: str
+ retryable: bool
+ retry_after_ms: int
+ details: _struct_pb2.Struct
+ def __init__(self, code: _Optional[_Union[ErrorCode, str]] = ..., message: _Optional[str] = ..., retryable: _Optional[bool] = ..., retry_after_ms: _Optional[int] = ..., details: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ...
diff --git a/packages/python/src/openengine/v1/generation_pb2.py b/packages/python/src/openengine/v1/generation_pb2.py
new file mode 100644
index 0000000..2a24c70
--- /dev/null
+++ b/packages/python/src/openengine/v1/generation_pb2.py
@@ -0,0 +1,84 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: openengine/v1/generation.proto
+# Protobuf Python Version: 6.33.5
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
+from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 6,
+ 33,
+ 5,
+ '',
+ 'openengine/v1/generation.proto'
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
+from openengine.v1 import error_pb2 as openengine_dot_v1_dot_error__pb2
+from openengine.v1 import input_pb2 as openengine_dot_v1_dot_input__pb2
+from openengine.v1 import kv_pb2 as openengine_dot_v1_dot_kv__pb2
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1eopenengine/v1/generation.proto\x12\ropenengine.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x19openengine/v1/error.proto\x1a\x19openengine/v1/input.proto\x1a\x16openengine/v1/kv.proto\"\xe8\x04\n\x0fGenerateRequest\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\r\n\x05model\x18\x02 \x01(\t\x12\x10\n\x06prompt\x18\x03 \x01(\tH\x00\x12,\n\ttoken_ids\x18\x04 \x01(\x0b\x32\x17.openengine.v1.TokenIdsH\x00\x12/\n\x08sampling\x18\x05 \x01(\x0b\x32\x1d.openengine.v1.SamplingParams\x12\x30\n\x08stopping\x18\x06 \x01(\x0b\x32\x1e.openengine.v1.StoppingOptions\x12\x30\n\x08response\x18\x07 \x01(\x0b\x32\x1e.openengine.v1.ResponseOptions\x12$\n\x02kv\x18\x08 \x01(\x0b\x32\x18.openengine.v1.KvOptions\x12-\n\x06guided\x18\t \x01(\x0b\x32\x1d.openengine.v1.GuidedDecoding\x12\'\n\x05media\x18\n \x03(\x0b\x32\x18.openengine.v1.MediaItem\x12\x11\n\tlora_name\x18\x0b \x01(\t\x12\x15\n\x08priority\x18\x0c \x01(\x05H\x01\x88\x01\x01\x12>\n\x08metadata\x18\r \x03(\x0b\x32,.openengine.v1.GenerateRequest.MetadataEntry\x12.\n\rmedia_options\x18\x0e \x01(\x0b\x32\x17.google.protobuf.Struct\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x07\n\x05inputB\x0b\n\t_priority\"\x80\x03\n\x0eSamplingParams\x12\x18\n\x0btemperature\x18\x01 \x01(\x01H\x00\x88\x01\x01\x12\x12\n\x05top_p\x18\x02 \x01(\x01H\x01\x88\x01\x01\x12\x12\n\x05top_k\x18\x03 \x01(\x05H\x02\x88\x01\x01\x12\x12\n\x05min_p\x18\x04 \x01(\x01H\x03\x88\x01\x01\x12\x1e\n\x11\x66requency_penalty\x18\x05 \x01(\x01H\x04\x88\x01\x01\x12\x1d\n\x10presence_penalty\x18\x06 \x01(\x01H\x05\x88\x01\x01\x12\x1f\n\x12repetition_penalty\x18\x07 \x01(\x01H\x06\x88\x01\x01\x12\x11\n\x04seed\x18\x08 \x01(\x04H\x07\x88\x01\x01\x12\x1a\n\rnum_sequences\x18\t \x01(\rH\x08\x88\x01\x01\x42\x0e\n\x0c_temperatureB\x08\n\x06_top_pB\x08\n\x06_top_kB\x08\n\x06_min_pB\x14\n\x12_frequency_penaltyB\x13\n\x11_presence_penaltyB\x15\n\x13_repetition_penaltyB\x07\n\x05_seedB\x10\n\x0e_num_sequences\"\xfb\x01\n\x0fStoppingOptions\x12\x17\n\nmax_tokens\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x17\n\nmin_tokens\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x30\n\nconditions\x18\x03 \x03(\x0b\x32\x1c.openengine.v1.StopCondition\x12\x17\n\nignore_eos\x18\x04 \x01(\x08H\x02\x88\x01\x01\x12#\n\x16include_stop_in_output\x18\x05 \x01(\x08H\x03\x88\x01\x01\x42\r\n\x0b_max_tokensB\r\n\x0b_min_tokensB\r\n\x0b_ignore_eosB\x19\n\x17_include_stop_in_output\"\xd3\x02\n\x0fResponseOptions\x12#\n\x16return_prompt_logprobs\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x41\n\x11prompt_candidates\x18\x02 \x01(\x0b\x32&.openengine.v1.CandidateTokenSelection\x12#\n\x16return_output_logprobs\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12\x41\n\x11output_candidates\x18\x04 \x01(\x0b\x32&.openengine.v1.CandidateTokenSelection\x12!\n\x14prompt_logprob_start\x18\x05 \x01(\rH\x02\x88\x01\x01\x42\x19\n\x17_return_prompt_logprobsB\x19\n\x17_return_output_logprobsB\x17\n\x15_prompt_logprob_start\"\x92\x01\n\x17\x43\x61ndidateTokenSelection\x12\x0f\n\x05top_n\x18\x01 \x01(\rH\x00\x12,\n\ttoken_ids\x18\x02 \x01(\x0b\x32\x17.openengine.v1.TokenIdsH\x00\x12+\n\x03\x61ll\x18\x03 \x01(\x0b\x32\x1c.openengine.v1.AllCandidatesH\x00\x42\x0b\n\tselection\"\x0f\n\rAllCandidates\"\xd3\x01\n\tKvOptions\x12,\n\x07session\x18\x01 \x01(\x0b\x32\x1b.openengine.v1.KvSessionRef\x12\x1f\n\x12\x64\x61ta_parallel_rank\x18\x02 \x01(\rH\x00\x88\x01\x01\x12 \n\x13\x62ypass_prefix_cache\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12\x17\n\ncache_salt\x18\x04 \x01(\tH\x02\x88\x01\x01\x42\x15\n\x13_data_parallel_rankB\x16\n\x14_bypass_prefix_cacheB\r\n\x0b_cache_salt\"J\n\rStopCondition\x12\x13\n\tstop_text\x18\x01 \x01(\tH\x00\x12\x17\n\rstop_token_id\x18\x02 \x01(\rH\x00\x42\x0b\n\tcondition\"\xf3\x01\n\x0eGuidedDecoding\x12\x15\n\x0bjson_schema\x18\x01 \x01(\tH\x00\x12\x0f\n\x05regex\x18\x02 \x01(\tH\x00\x12\x16\n\x0c\x65\x62nf_grammar\x18\x03 \x01(\tH\x00\x12\x18\n\x0estructural_tag\x18\x04 \x01(\tH\x00\x12\x31\n\x06\x63hoice\x18\x05 \x01(\x0b\x32\x1f.openengine.v1.ChoiceConstraintH\x00\x12:\n\x0bjson_object\x18\x06 \x01(\x0b\x32#.openengine.v1.JsonObjectConstraintH\x00\x12\x0f\n\x07\x62\x61\x63kend\x18\x07 \x01(\tB\x07\n\x05guide\"#\n\x10\x43hoiceConstraint\x12\x0f\n\x07\x63hoices\x18\x01 \x03(\t\"\x16\n\x14JsonObjectConstraint\"\xca\x02\n\x10GenerateResponse\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12-\n\x06prompt\x18\x02 \x01(\x0b\x32\x1b.openengine.v1.PromptOutputH\x00\x12+\n\x05token\x18\x03 \x01(\x0b\x32\x1a.openengine.v1.TokenOutputH\x00\x12\x34\n\rprefill_ready\x18\x04 \x01(\x0b\x32\x1b.openengine.v1.PrefillReadyH\x00\x12\x35\n\x08\x66inished\x18\x05 \x01(\x0b\x32!.openengine.v1.GenerationFinishedH\x00\x12+\n\x05\x65rror\x18\x06 \x01(\x0b\x32\x1a.openengine.v1.EngineErrorH\x00\x12#\n\x05usage\x18\n \x01(\x0b\x32\x14.openengine.v1.UsageB\x07\n\x05\x65vent\"8\n\x0cPromptOutput\x12(\n\x06tokens\x18\x01 \x03(\x0b\x32\x18.openengine.v1.TokenInfo\"q\n\x0bTokenOutput\x12\x19\n\x0coutput_index\x18\x01 \x01(\rH\x00\x88\x01\x01\x12(\n\x06tokens\x18\x02 \x03(\x0b\x32\x18.openengine.v1.TokenInfo\x12\x0c\n\x04text\x18\x03 \x01(\tB\x0f\n\r_output_index\"\x96\x01\n\tTokenInfo\x12\x10\n\x08token_id\x18\x01 \x01(\r\x12\r\n\x05token\x18\x02 \x01(\t\x12\x14\n\x07logprob\x18\x03 \x01(\x01H\x00\x88\x01\x01\x12\x11\n\x04rank\x18\x04 \x01(\rH\x01\x88\x01\x01\x12*\n\ncandidates\x18\x05 \x03(\x0b\x32\x16.openengine.v1.LogProbB\n\n\x08_logprobB\x07\n\x05_rank\"W\n\x07LogProb\x12\x10\n\x08token_id\x18\x01 \x01(\r\x12\x0f\n\x07logprob\x18\x02 \x01(\x01\x12\r\n\x05token\x18\x03 \x01(\t\x12\x11\n\x04rank\x18\x04 \x01(\rH\x00\x88\x01\x01\x42\x07\n\x05_rank\"?\n\x0cPrefillReady\x12/\n\nkv_session\x18\x01 \x01(\x0b\x32\x1b.openengine.v1.KvSessionRef\"\xac\x01\n\x12GenerationFinished\x12\x19\n\x0coutput_index\x18\x01 \x01(\rH\x00\x88\x01\x01\x12+\n\x06reason\x18\x02 \x01(\x0e\x32\x1b.openengine.v1.FinishReason\x12\x0f\n\x07message\x18\x03 \x01(\t\x12,\n\nstop_match\x18\x04 \x01(\x0b\x32\x18.openengine.v1.StopMatchB\x0f\n\r_output_index\"Z\n\tStopMatch\x12\x17\n\rstop_token_id\x18\x01 \x01(\rH\x00\x12\x13\n\tstop_text\x18\x02 \x01(\tH\x00\x12\x16\n\x0c\x65os_token_id\x18\x03 \x01(\rH\x00\x42\x07\n\x05match\"\xbf\x01\n\x05Usage\x12\x15\n\rprompt_tokens\x18\x01 \x01(\r\x12\x19\n\x11\x63ompletion_tokens\x18\x02 \x01(\r\x12\x14\n\x0ctotal_tokens\x18\x03 \x01(\r\x12!\n\x14\x63\x61\x63hed_prompt_tokens\x18\x04 \x01(\rH\x00\x88\x01\x01\x12\x1d\n\x10reasoning_tokens\x18\x05 \x01(\rH\x01\x88\x01\x01\x42\x17\n\x15_cached_prompt_tokensB\x13\n\x11_reasoning_tokens*|\n\x0c\x46inishReason\x12\x1d\n\x19\x46INISH_REASON_UNSPECIFIED\x10\x00\x12\x16\n\x12\x46INISH_REASON_STOP\x10\x01\x12\x18\n\x14\x46INISH_REASON_LENGTH\x10\x02\x12\x1b\n\x17\x46INISH_REASON_CANCELLED\x10\x03\x62\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'openengine.v1.generation_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ DESCRIPTOR._loaded_options = None
+ _globals['_GENERATEREQUEST_METADATAENTRY']._loaded_options = None
+ _globals['_GENERATEREQUEST_METADATAENTRY']._serialized_options = b'8\001'
+ _globals['_FINISHREASON']._serialized_start=3796
+ _globals['_FINISHREASON']._serialized_end=3920
+ _globals['_GENERATEREQUEST']._serialized_start=158
+ _globals['_GENERATEREQUEST']._serialized_end=774
+ _globals['_GENERATEREQUEST_METADATAENTRY']._serialized_start=705
+ _globals['_GENERATEREQUEST_METADATAENTRY']._serialized_end=752
+ _globals['_SAMPLINGPARAMS']._serialized_start=777
+ _globals['_SAMPLINGPARAMS']._serialized_end=1161
+ _globals['_STOPPINGOPTIONS']._serialized_start=1164
+ _globals['_STOPPINGOPTIONS']._serialized_end=1415
+ _globals['_RESPONSEOPTIONS']._serialized_start=1418
+ _globals['_RESPONSEOPTIONS']._serialized_end=1757
+ _globals['_CANDIDATETOKENSELECTION']._serialized_start=1760
+ _globals['_CANDIDATETOKENSELECTION']._serialized_end=1906
+ _globals['_ALLCANDIDATES']._serialized_start=1908
+ _globals['_ALLCANDIDATES']._serialized_end=1923
+ _globals['_KVOPTIONS']._serialized_start=1926
+ _globals['_KVOPTIONS']._serialized_end=2137
+ _globals['_STOPCONDITION']._serialized_start=2139
+ _globals['_STOPCONDITION']._serialized_end=2213
+ _globals['_GUIDEDDECODING']._serialized_start=2216
+ _globals['_GUIDEDDECODING']._serialized_end=2459
+ _globals['_CHOICECONSTRAINT']._serialized_start=2461
+ _globals['_CHOICECONSTRAINT']._serialized_end=2496
+ _globals['_JSONOBJECTCONSTRAINT']._serialized_start=2498
+ _globals['_JSONOBJECTCONSTRAINT']._serialized_end=2520
+ _globals['_GENERATERESPONSE']._serialized_start=2523
+ _globals['_GENERATERESPONSE']._serialized_end=2853
+ _globals['_PROMPTOUTPUT']._serialized_start=2855
+ _globals['_PROMPTOUTPUT']._serialized_end=2911
+ _globals['_TOKENOUTPUT']._serialized_start=2913
+ _globals['_TOKENOUTPUT']._serialized_end=3026
+ _globals['_TOKENINFO']._serialized_start=3029
+ _globals['_TOKENINFO']._serialized_end=3179
+ _globals['_LOGPROB']._serialized_start=3181
+ _globals['_LOGPROB']._serialized_end=3268
+ _globals['_PREFILLREADY']._serialized_start=3270
+ _globals['_PREFILLREADY']._serialized_end=3333
+ _globals['_GENERATIONFINISHED']._serialized_start=3336
+ _globals['_GENERATIONFINISHED']._serialized_end=3508
+ _globals['_STOPMATCH']._serialized_start=3510
+ _globals['_STOPMATCH']._serialized_end=3600
+ _globals['_USAGE']._serialized_start=3603
+ _globals['_USAGE']._serialized_end=3794
+# @@protoc_insertion_point(module_scope)
diff --git a/packages/python/src/openengine/v1/generation_pb2.pyi b/packages/python/src/openengine/v1/generation_pb2.pyi
new file mode 100644
index 0000000..746fd50
--- /dev/null
+++ b/packages/python/src/openengine/v1/generation_pb2.pyi
@@ -0,0 +1,276 @@
+from google.protobuf import struct_pb2 as _struct_pb2
+from openengine.v1 import error_pb2 as _error_pb2
+from openengine.v1 import input_pb2 as _input_pb2
+from openengine.v1 import kv_pb2 as _kv_pb2
+from google.protobuf.internal import containers as _containers
+from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from collections.abc import Iterable as _Iterable, Mapping as _Mapping
+from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
+
+DESCRIPTOR: _descriptor.FileDescriptor
+
+class FinishReason(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ FINISH_REASON_UNSPECIFIED: _ClassVar[FinishReason]
+ FINISH_REASON_STOP: _ClassVar[FinishReason]
+ FINISH_REASON_LENGTH: _ClassVar[FinishReason]
+ FINISH_REASON_CANCELLED: _ClassVar[FinishReason]
+FINISH_REASON_UNSPECIFIED: FinishReason
+FINISH_REASON_STOP: FinishReason
+FINISH_REASON_LENGTH: FinishReason
+FINISH_REASON_CANCELLED: FinishReason
+
+class GenerateRequest(_message.Message):
+ __slots__ = ("request_id", "model", "prompt", "token_ids", "sampling", "stopping", "response", "kv", "guided", "media", "lora_name", "priority", "metadata", "media_options")
+ class MetadataEntry(_message.Message):
+ __slots__ = ("key", "value")
+ KEY_FIELD_NUMBER: _ClassVar[int]
+ VALUE_FIELD_NUMBER: _ClassVar[int]
+ key: str
+ value: str
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
+ REQUEST_ID_FIELD_NUMBER: _ClassVar[int]
+ MODEL_FIELD_NUMBER: _ClassVar[int]
+ PROMPT_FIELD_NUMBER: _ClassVar[int]
+ TOKEN_IDS_FIELD_NUMBER: _ClassVar[int]
+ SAMPLING_FIELD_NUMBER: _ClassVar[int]
+ STOPPING_FIELD_NUMBER: _ClassVar[int]
+ RESPONSE_FIELD_NUMBER: _ClassVar[int]
+ KV_FIELD_NUMBER: _ClassVar[int]
+ GUIDED_FIELD_NUMBER: _ClassVar[int]
+ MEDIA_FIELD_NUMBER: _ClassVar[int]
+ LORA_NAME_FIELD_NUMBER: _ClassVar[int]
+ PRIORITY_FIELD_NUMBER: _ClassVar[int]
+ METADATA_FIELD_NUMBER: _ClassVar[int]
+ MEDIA_OPTIONS_FIELD_NUMBER: _ClassVar[int]
+ request_id: str
+ model: str
+ prompt: str
+ token_ids: _input_pb2.TokenIds
+ sampling: SamplingParams
+ stopping: StoppingOptions
+ response: ResponseOptions
+ kv: KvOptions
+ guided: GuidedDecoding
+ media: _containers.RepeatedCompositeFieldContainer[_input_pb2.MediaItem]
+ lora_name: str
+ priority: int
+ metadata: _containers.ScalarMap[str, str]
+ media_options: _struct_pb2.Struct
+ def __init__(self, request_id: _Optional[str] = ..., model: _Optional[str] = ..., prompt: _Optional[str] = ..., token_ids: _Optional[_Union[_input_pb2.TokenIds, _Mapping]] = ..., sampling: _Optional[_Union[SamplingParams, _Mapping]] = ..., stopping: _Optional[_Union[StoppingOptions, _Mapping]] = ..., response: _Optional[_Union[ResponseOptions, _Mapping]] = ..., kv: _Optional[_Union[KvOptions, _Mapping]] = ..., guided: _Optional[_Union[GuidedDecoding, _Mapping]] = ..., media: _Optional[_Iterable[_Union[_input_pb2.MediaItem, _Mapping]]] = ..., lora_name: _Optional[str] = ..., priority: _Optional[int] = ..., metadata: _Optional[_Mapping[str, str]] = ..., media_options: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ...
+
+class SamplingParams(_message.Message):
+ __slots__ = ("temperature", "top_p", "top_k", "min_p", "frequency_penalty", "presence_penalty", "repetition_penalty", "seed", "num_sequences")
+ TEMPERATURE_FIELD_NUMBER: _ClassVar[int]
+ TOP_P_FIELD_NUMBER: _ClassVar[int]
+ TOP_K_FIELD_NUMBER: _ClassVar[int]
+ MIN_P_FIELD_NUMBER: _ClassVar[int]
+ FREQUENCY_PENALTY_FIELD_NUMBER: _ClassVar[int]
+ PRESENCE_PENALTY_FIELD_NUMBER: _ClassVar[int]
+ REPETITION_PENALTY_FIELD_NUMBER: _ClassVar[int]
+ SEED_FIELD_NUMBER: _ClassVar[int]
+ NUM_SEQUENCES_FIELD_NUMBER: _ClassVar[int]
+ temperature: float
+ top_p: float
+ top_k: int
+ min_p: float
+ frequency_penalty: float
+ presence_penalty: float
+ repetition_penalty: float
+ seed: int
+ num_sequences: int
+ def __init__(self, temperature: _Optional[float] = ..., top_p: _Optional[float] = ..., top_k: _Optional[int] = ..., min_p: _Optional[float] = ..., frequency_penalty: _Optional[float] = ..., presence_penalty: _Optional[float] = ..., repetition_penalty: _Optional[float] = ..., seed: _Optional[int] = ..., num_sequences: _Optional[int] = ...) -> None: ...
+
+class StoppingOptions(_message.Message):
+ __slots__ = ("max_tokens", "min_tokens", "conditions", "ignore_eos", "include_stop_in_output")
+ MAX_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ MIN_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ CONDITIONS_FIELD_NUMBER: _ClassVar[int]
+ IGNORE_EOS_FIELD_NUMBER: _ClassVar[int]
+ INCLUDE_STOP_IN_OUTPUT_FIELD_NUMBER: _ClassVar[int]
+ max_tokens: int
+ min_tokens: int
+ conditions: _containers.RepeatedCompositeFieldContainer[StopCondition]
+ ignore_eos: bool
+ include_stop_in_output: bool
+ def __init__(self, max_tokens: _Optional[int] = ..., min_tokens: _Optional[int] = ..., conditions: _Optional[_Iterable[_Union[StopCondition, _Mapping]]] = ..., ignore_eos: _Optional[bool] = ..., include_stop_in_output: _Optional[bool] = ...) -> None: ...
+
+class ResponseOptions(_message.Message):
+ __slots__ = ("return_prompt_logprobs", "prompt_candidates", "return_output_logprobs", "output_candidates", "prompt_logprob_start")
+ RETURN_PROMPT_LOGPROBS_FIELD_NUMBER: _ClassVar[int]
+ PROMPT_CANDIDATES_FIELD_NUMBER: _ClassVar[int]
+ RETURN_OUTPUT_LOGPROBS_FIELD_NUMBER: _ClassVar[int]
+ OUTPUT_CANDIDATES_FIELD_NUMBER: _ClassVar[int]
+ PROMPT_LOGPROB_START_FIELD_NUMBER: _ClassVar[int]
+ return_prompt_logprobs: bool
+ prompt_candidates: CandidateTokenSelection
+ return_output_logprobs: bool
+ output_candidates: CandidateTokenSelection
+ prompt_logprob_start: int
+ def __init__(self, return_prompt_logprobs: _Optional[bool] = ..., prompt_candidates: _Optional[_Union[CandidateTokenSelection, _Mapping]] = ..., return_output_logprobs: _Optional[bool] = ..., output_candidates: _Optional[_Union[CandidateTokenSelection, _Mapping]] = ..., prompt_logprob_start: _Optional[int] = ...) -> None: ...
+
+class CandidateTokenSelection(_message.Message):
+ __slots__ = ("top_n", "token_ids", "all")
+ TOP_N_FIELD_NUMBER: _ClassVar[int]
+ TOKEN_IDS_FIELD_NUMBER: _ClassVar[int]
+ ALL_FIELD_NUMBER: _ClassVar[int]
+ top_n: int
+ token_ids: _input_pb2.TokenIds
+ all: AllCandidates
+ def __init__(self, top_n: _Optional[int] = ..., token_ids: _Optional[_Union[_input_pb2.TokenIds, _Mapping]] = ..., all: _Optional[_Union[AllCandidates, _Mapping]] = ...) -> None: ...
+
+class AllCandidates(_message.Message):
+ __slots__ = ()
+ def __init__(self) -> None: ...
+
+class KvOptions(_message.Message):
+ __slots__ = ("session", "data_parallel_rank", "bypass_prefix_cache", "cache_salt")
+ SESSION_FIELD_NUMBER: _ClassVar[int]
+ DATA_PARALLEL_RANK_FIELD_NUMBER: _ClassVar[int]
+ BYPASS_PREFIX_CACHE_FIELD_NUMBER: _ClassVar[int]
+ CACHE_SALT_FIELD_NUMBER: _ClassVar[int]
+ session: _kv_pb2.KvSessionRef
+ data_parallel_rank: int
+ bypass_prefix_cache: bool
+ cache_salt: str
+ def __init__(self, session: _Optional[_Union[_kv_pb2.KvSessionRef, _Mapping]] = ..., data_parallel_rank: _Optional[int] = ..., bypass_prefix_cache: _Optional[bool] = ..., cache_salt: _Optional[str] = ...) -> None: ...
+
+class StopCondition(_message.Message):
+ __slots__ = ("stop_text", "stop_token_id")
+ STOP_TEXT_FIELD_NUMBER: _ClassVar[int]
+ STOP_TOKEN_ID_FIELD_NUMBER: _ClassVar[int]
+ stop_text: str
+ stop_token_id: int
+ def __init__(self, stop_text: _Optional[str] = ..., stop_token_id: _Optional[int] = ...) -> None: ...
+
+class GuidedDecoding(_message.Message):
+ __slots__ = ("json_schema", "regex", "ebnf_grammar", "structural_tag", "choice", "json_object", "backend")
+ JSON_SCHEMA_FIELD_NUMBER: _ClassVar[int]
+ REGEX_FIELD_NUMBER: _ClassVar[int]
+ EBNF_GRAMMAR_FIELD_NUMBER: _ClassVar[int]
+ STRUCTURAL_TAG_FIELD_NUMBER: _ClassVar[int]
+ CHOICE_FIELD_NUMBER: _ClassVar[int]
+ JSON_OBJECT_FIELD_NUMBER: _ClassVar[int]
+ BACKEND_FIELD_NUMBER: _ClassVar[int]
+ json_schema: str
+ regex: str
+ ebnf_grammar: str
+ structural_tag: str
+ choice: ChoiceConstraint
+ json_object: JsonObjectConstraint
+ backend: str
+ def __init__(self, json_schema: _Optional[str] = ..., regex: _Optional[str] = ..., ebnf_grammar: _Optional[str] = ..., structural_tag: _Optional[str] = ..., choice: _Optional[_Union[ChoiceConstraint, _Mapping]] = ..., json_object: _Optional[_Union[JsonObjectConstraint, _Mapping]] = ..., backend: _Optional[str] = ...) -> None: ...
+
+class ChoiceConstraint(_message.Message):
+ __slots__ = ("choices",)
+ CHOICES_FIELD_NUMBER: _ClassVar[int]
+ choices: _containers.RepeatedScalarFieldContainer[str]
+ def __init__(self, choices: _Optional[_Iterable[str]] = ...) -> None: ...
+
+class JsonObjectConstraint(_message.Message):
+ __slots__ = ()
+ def __init__(self) -> None: ...
+
+class GenerateResponse(_message.Message):
+ __slots__ = ("request_id", "prompt", "token", "prefill_ready", "finished", "error", "usage")
+ REQUEST_ID_FIELD_NUMBER: _ClassVar[int]
+ PROMPT_FIELD_NUMBER: _ClassVar[int]
+ TOKEN_FIELD_NUMBER: _ClassVar[int]
+ PREFILL_READY_FIELD_NUMBER: _ClassVar[int]
+ FINISHED_FIELD_NUMBER: _ClassVar[int]
+ ERROR_FIELD_NUMBER: _ClassVar[int]
+ USAGE_FIELD_NUMBER: _ClassVar[int]
+ request_id: str
+ prompt: PromptOutput
+ token: TokenOutput
+ prefill_ready: PrefillReady
+ finished: GenerationFinished
+ error: _error_pb2.EngineError
+ usage: Usage
+ def __init__(self, request_id: _Optional[str] = ..., prompt: _Optional[_Union[PromptOutput, _Mapping]] = ..., token: _Optional[_Union[TokenOutput, _Mapping]] = ..., prefill_ready: _Optional[_Union[PrefillReady, _Mapping]] = ..., finished: _Optional[_Union[GenerationFinished, _Mapping]] = ..., error: _Optional[_Union[_error_pb2.EngineError, _Mapping]] = ..., usage: _Optional[_Union[Usage, _Mapping]] = ...) -> None: ...
+
+class PromptOutput(_message.Message):
+ __slots__ = ("tokens",)
+ TOKENS_FIELD_NUMBER: _ClassVar[int]
+ tokens: _containers.RepeatedCompositeFieldContainer[TokenInfo]
+ def __init__(self, tokens: _Optional[_Iterable[_Union[TokenInfo, _Mapping]]] = ...) -> None: ...
+
+class TokenOutput(_message.Message):
+ __slots__ = ("output_index", "tokens", "text")
+ OUTPUT_INDEX_FIELD_NUMBER: _ClassVar[int]
+ TOKENS_FIELD_NUMBER: _ClassVar[int]
+ TEXT_FIELD_NUMBER: _ClassVar[int]
+ output_index: int
+ tokens: _containers.RepeatedCompositeFieldContainer[TokenInfo]
+ text: str
+ def __init__(self, output_index: _Optional[int] = ..., tokens: _Optional[_Iterable[_Union[TokenInfo, _Mapping]]] = ..., text: _Optional[str] = ...) -> None: ...
+
+class TokenInfo(_message.Message):
+ __slots__ = ("token_id", "token", "logprob", "rank", "candidates")
+ TOKEN_ID_FIELD_NUMBER: _ClassVar[int]
+ TOKEN_FIELD_NUMBER: _ClassVar[int]
+ LOGPROB_FIELD_NUMBER: _ClassVar[int]
+ RANK_FIELD_NUMBER: _ClassVar[int]
+ CANDIDATES_FIELD_NUMBER: _ClassVar[int]
+ token_id: int
+ token: str
+ logprob: float
+ rank: int
+ candidates: _containers.RepeatedCompositeFieldContainer[LogProb]
+ def __init__(self, token_id: _Optional[int] = ..., token: _Optional[str] = ..., logprob: _Optional[float] = ..., rank: _Optional[int] = ..., candidates: _Optional[_Iterable[_Union[LogProb, _Mapping]]] = ...) -> None: ...
+
+class LogProb(_message.Message):
+ __slots__ = ("token_id", "logprob", "token", "rank")
+ TOKEN_ID_FIELD_NUMBER: _ClassVar[int]
+ LOGPROB_FIELD_NUMBER: _ClassVar[int]
+ TOKEN_FIELD_NUMBER: _ClassVar[int]
+ RANK_FIELD_NUMBER: _ClassVar[int]
+ token_id: int
+ logprob: float
+ token: str
+ rank: int
+ def __init__(self, token_id: _Optional[int] = ..., logprob: _Optional[float] = ..., token: _Optional[str] = ..., rank: _Optional[int] = ...) -> None: ...
+
+class PrefillReady(_message.Message):
+ __slots__ = ("kv_session",)
+ KV_SESSION_FIELD_NUMBER: _ClassVar[int]
+ kv_session: _kv_pb2.KvSessionRef
+ def __init__(self, kv_session: _Optional[_Union[_kv_pb2.KvSessionRef, _Mapping]] = ...) -> None: ...
+
+class GenerationFinished(_message.Message):
+ __slots__ = ("output_index", "reason", "message", "stop_match")
+ OUTPUT_INDEX_FIELD_NUMBER: _ClassVar[int]
+ REASON_FIELD_NUMBER: _ClassVar[int]
+ MESSAGE_FIELD_NUMBER: _ClassVar[int]
+ STOP_MATCH_FIELD_NUMBER: _ClassVar[int]
+ output_index: int
+ reason: FinishReason
+ message: str
+ stop_match: StopMatch
+ def __init__(self, output_index: _Optional[int] = ..., reason: _Optional[_Union[FinishReason, str]] = ..., message: _Optional[str] = ..., stop_match: _Optional[_Union[StopMatch, _Mapping]] = ...) -> None: ...
+
+class StopMatch(_message.Message):
+ __slots__ = ("stop_token_id", "stop_text", "eos_token_id")
+ STOP_TOKEN_ID_FIELD_NUMBER: _ClassVar[int]
+ STOP_TEXT_FIELD_NUMBER: _ClassVar[int]
+ EOS_TOKEN_ID_FIELD_NUMBER: _ClassVar[int]
+ stop_token_id: int
+ stop_text: str
+ eos_token_id: int
+ def __init__(self, stop_token_id: _Optional[int] = ..., stop_text: _Optional[str] = ..., eos_token_id: _Optional[int] = ...) -> None: ...
+
+class Usage(_message.Message):
+ __slots__ = ("prompt_tokens", "completion_tokens", "total_tokens", "cached_prompt_tokens", "reasoning_tokens")
+ PROMPT_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ COMPLETION_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ TOTAL_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ CACHED_PROMPT_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ REASONING_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ prompt_tokens: int
+ completion_tokens: int
+ total_tokens: int
+ cached_prompt_tokens: int
+ reasoning_tokens: int
+ def __init__(self, prompt_tokens: _Optional[int] = ..., completion_tokens: _Optional[int] = ..., total_tokens: _Optional[int] = ..., cached_prompt_tokens: _Optional[int] = ..., reasoning_tokens: _Optional[int] = ...) -> None: ...
diff --git a/packages/python/src/openengine/v1/input_pb2.py b/packages/python/src/openengine/v1/input_pb2.py
new file mode 100644
index 0000000..5ab1a75
--- /dev/null
+++ b/packages/python/src/openengine/v1/input_pb2.py
@@ -0,0 +1,48 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: openengine/v1/input.proto
+# Protobuf Python Version: 6.33.5
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
+from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 6,
+ 33,
+ 5,
+ '',
+ 'openengine/v1/input.proto'
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19openengine/v1/input.proto\x12\ropenengine.v1\"\x17\n\x08TokenIds\x12\x0b\n\x03ids\x18\x01 \x03(\r\"\x99\x01\n\tMediaItem\x12)\n\x08modality\x18\x01 \x01(\x0e\x32\x17.openengine.v1.Modality\x12\r\n\x03url\x18\x02 \x01(\tH\x00\x12\x12\n\x08\x64\x61ta_uri\x18\x03 \x01(\tH\x00\x12\x13\n\traw_bytes\x18\x04 \x01(\x0cH\x00\x12\x11\n\tmime_type\x18\x05 \x01(\t\x12\x0c\n\x04uuid\x18\x06 \x01(\tB\x08\n\x06source\"\x86\x01\n\x13MultimodalTaskInput\x12\x0e\n\x04text\x18\x01 \x01(\tH\x00\x12,\n\ttoken_ids\x18\x02 \x01(\x0b\x32\x17.openengine.v1.TokenIdsH\x00\x12\'\n\x05media\x18\x03 \x03(\x0b\x32\x18.openengine.v1.MediaItemB\x08\n\x06prompt\"\x9d\x01\n\tTaskInput\x12\x0f\n\x07item_id\x18\x01 \x01(\t\x12\x0e\n\x04text\x18\x02 \x01(\tH\x00\x12,\n\ttoken_ids\x18\x03 \x01(\x0b\x32\x17.openengine.v1.TokenIdsH\x00\x12\x38\n\nmultimodal\x18\x04 \x01(\x0b\x32\".openengine.v1.MultimodalTaskInputH\x00\x42\x07\n\x05input*`\n\x08Modality\x12\x18\n\x14MODALITY_UNSPECIFIED\x10\x00\x12\x12\n\x0eMODALITY_IMAGE\x10\x01\x12\x12\n\x0eMODALITY_VIDEO\x10\x02\x12\x12\n\x0eMODALITY_AUDIO\x10\x03*\x90\x01\n\x0fMediaSourceType\x12!\n\x1dMEDIA_SOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15MEDIA_SOURCE_TYPE_URL\x10\x01\x12\x1e\n\x1aMEDIA_SOURCE_TYPE_DATA_URI\x10\x02\x12\x1f\n\x1bMEDIA_SOURCE_TYPE_RAW_BYTES\x10\x03*\x89\x01\n\rTaskInputType\x12\x1f\n\x1bTASK_INPUT_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x14TASK_INPUT_TYPE_TEXT\x10\x01\x12\x1d\n\x19TASK_INPUT_TYPE_TOKEN_IDS\x10\x02\x12\x1e\n\x1aTASK_INPUT_TYPE_MULTIMODAL\x10\x03\x62\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'openengine.v1.input_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ DESCRIPTOR._loaded_options = None
+ _globals['_MODALITY']._serialized_start=522
+ _globals['_MODALITY']._serialized_end=618
+ _globals['_MEDIASOURCETYPE']._serialized_start=621
+ _globals['_MEDIASOURCETYPE']._serialized_end=765
+ _globals['_TASKINPUTTYPE']._serialized_start=768
+ _globals['_TASKINPUTTYPE']._serialized_end=905
+ _globals['_TOKENIDS']._serialized_start=44
+ _globals['_TOKENIDS']._serialized_end=67
+ _globals['_MEDIAITEM']._serialized_start=70
+ _globals['_MEDIAITEM']._serialized_end=223
+ _globals['_MULTIMODALTASKINPUT']._serialized_start=226
+ _globals['_MULTIMODALTASKINPUT']._serialized_end=360
+ _globals['_TASKINPUT']._serialized_start=363
+ _globals['_TASKINPUT']._serialized_end=520
+# @@protoc_insertion_point(module_scope)
diff --git a/packages/python/src/openengine/v1/input_pb2.pyi b/packages/python/src/openengine/v1/input_pb2.pyi
new file mode 100644
index 0000000..7df76eb
--- /dev/null
+++ b/packages/python/src/openengine/v1/input_pb2.pyi
@@ -0,0 +1,85 @@
+from google.protobuf.internal import containers as _containers
+from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from collections.abc import Iterable as _Iterable, Mapping as _Mapping
+from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
+
+DESCRIPTOR: _descriptor.FileDescriptor
+
+class Modality(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ MODALITY_UNSPECIFIED: _ClassVar[Modality]
+ MODALITY_IMAGE: _ClassVar[Modality]
+ MODALITY_VIDEO: _ClassVar[Modality]
+ MODALITY_AUDIO: _ClassVar[Modality]
+
+class MediaSourceType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ MEDIA_SOURCE_TYPE_UNSPECIFIED: _ClassVar[MediaSourceType]
+ MEDIA_SOURCE_TYPE_URL: _ClassVar[MediaSourceType]
+ MEDIA_SOURCE_TYPE_DATA_URI: _ClassVar[MediaSourceType]
+ MEDIA_SOURCE_TYPE_RAW_BYTES: _ClassVar[MediaSourceType]
+
+class TaskInputType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ TASK_INPUT_TYPE_UNSPECIFIED: _ClassVar[TaskInputType]
+ TASK_INPUT_TYPE_TEXT: _ClassVar[TaskInputType]
+ TASK_INPUT_TYPE_TOKEN_IDS: _ClassVar[TaskInputType]
+ TASK_INPUT_TYPE_MULTIMODAL: _ClassVar[TaskInputType]
+MODALITY_UNSPECIFIED: Modality
+MODALITY_IMAGE: Modality
+MODALITY_VIDEO: Modality
+MODALITY_AUDIO: Modality
+MEDIA_SOURCE_TYPE_UNSPECIFIED: MediaSourceType
+MEDIA_SOURCE_TYPE_URL: MediaSourceType
+MEDIA_SOURCE_TYPE_DATA_URI: MediaSourceType
+MEDIA_SOURCE_TYPE_RAW_BYTES: MediaSourceType
+TASK_INPUT_TYPE_UNSPECIFIED: TaskInputType
+TASK_INPUT_TYPE_TEXT: TaskInputType
+TASK_INPUT_TYPE_TOKEN_IDS: TaskInputType
+TASK_INPUT_TYPE_MULTIMODAL: TaskInputType
+
+class TokenIds(_message.Message):
+ __slots__ = ("ids",)
+ IDS_FIELD_NUMBER: _ClassVar[int]
+ ids: _containers.RepeatedScalarFieldContainer[int]
+ def __init__(self, ids: _Optional[_Iterable[int]] = ...) -> None: ...
+
+class MediaItem(_message.Message):
+ __slots__ = ("modality", "url", "data_uri", "raw_bytes", "mime_type", "uuid")
+ MODALITY_FIELD_NUMBER: _ClassVar[int]
+ URL_FIELD_NUMBER: _ClassVar[int]
+ DATA_URI_FIELD_NUMBER: _ClassVar[int]
+ RAW_BYTES_FIELD_NUMBER: _ClassVar[int]
+ MIME_TYPE_FIELD_NUMBER: _ClassVar[int]
+ UUID_FIELD_NUMBER: _ClassVar[int]
+ modality: Modality
+ url: str
+ data_uri: str
+ raw_bytes: bytes
+ mime_type: str
+ uuid: str
+ def __init__(self, modality: _Optional[_Union[Modality, str]] = ..., url: _Optional[str] = ..., data_uri: _Optional[str] = ..., raw_bytes: _Optional[bytes] = ..., mime_type: _Optional[str] = ..., uuid: _Optional[str] = ...) -> None: ...
+
+class MultimodalTaskInput(_message.Message):
+ __slots__ = ("text", "token_ids", "media")
+ TEXT_FIELD_NUMBER: _ClassVar[int]
+ TOKEN_IDS_FIELD_NUMBER: _ClassVar[int]
+ MEDIA_FIELD_NUMBER: _ClassVar[int]
+ text: str
+ token_ids: TokenIds
+ media: _containers.RepeatedCompositeFieldContainer[MediaItem]
+ def __init__(self, text: _Optional[str] = ..., token_ids: _Optional[_Union[TokenIds, _Mapping]] = ..., media: _Optional[_Iterable[_Union[MediaItem, _Mapping]]] = ...) -> None: ...
+
+class TaskInput(_message.Message):
+ __slots__ = ("item_id", "text", "token_ids", "multimodal")
+ ITEM_ID_FIELD_NUMBER: _ClassVar[int]
+ TEXT_FIELD_NUMBER: _ClassVar[int]
+ TOKEN_IDS_FIELD_NUMBER: _ClassVar[int]
+ MULTIMODAL_FIELD_NUMBER: _ClassVar[int]
+ item_id: str
+ text: str
+ token_ids: TokenIds
+ multimodal: MultimodalTaskInput
+ def __init__(self, item_id: _Optional[str] = ..., text: _Optional[str] = ..., token_ids: _Optional[_Union[TokenIds, _Mapping]] = ..., multimodal: _Optional[_Union[MultimodalTaskInput, _Mapping]] = ...) -> None: ...
diff --git a/packages/python/src/openengine/v1/kv_pb2.py b/packages/python/src/openengine/v1/kv_pb2.py
new file mode 100644
index 0000000..7bab09d
--- /dev/null
+++ b/packages/python/src/openengine/v1/kv_pb2.py
@@ -0,0 +1,70 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: openengine/v1/kv.proto
+# Protobuf Python Version: 6.33.5
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
+from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 6,
+ 33,
+ 5,
+ '',
+ 'openengine/v1/kv.proto'
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
+from openengine.v1 import error_pb2 as openengine_dot_v1_dot_error__pb2
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16openengine/v1/kv.proto\x12\ropenengine.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x19openengine/v1/error.proto\"\xaf\x01\n\x0cKvSessionRef\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x18\n\x10transfer_backend\x18\x02 \x01(\t\x12,\n\tendpoints\x18\x03 \x03(\x0b\x32\x19.openengine.v1.KvEndpoint\x12\x0f\n\x07\x64p_rank\x18\x04 \x01(\r\x12\x32\n\x11\x61ttributes_struct\x18\x05 \x01(\x0b\x32\x17.google.protobuf.Struct\":\n\nKvEndpoint\x12\x0c\n\x04host\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\r\x12\x10\n\x08protocol\x18\x03 \x01(\t\"\x1b\n\x19GetKvConnectorInfoRequest\"\xbc\x03\n\x0fKvConnectorInfo\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x18\n\x10transfer_backend\x18\x02 \x01(\t\x12\x32\n\x0flocal_endpoints\x18\x03 \x03(\x0b\x32\x19.openengine.v1.KvEndpoint\x12\x1b\n\x13supported_protocols\x18\x04 \x03(\t\x12$\n\x17supports_remote_prefill\x18\x05 \x01(\x08H\x01\x88\x01\x01\x12!\n\x14supports_decode_pull\x18\x06 \x01(\x08H\x02\x88\x01\x01\x12#\n\x16supports_abort_cleanup\x18\x07 \x01(\x08H\x03\x88\x01\x01\x12\x1b\n\x0esupports_drain\x18\x08 \x01(\x08H\x04\x88\x01\x01\x12\x1b\n\x0eschema_version\x18\t \x01(\rH\x05\x88\x01\x01\x42\n\n\x08_enabledB\x1a\n\x18_supports_remote_prefillB\x17\n\x15_supports_decode_pullB\x19\n\x17_supports_abort_cleanupB\x11\n\x0f_supports_drainB\x11\n\x0f_schema_version\"7\n\x18GetKvEventSourcesRequest\x12\x1b\n\x13\x64\x61ta_parallel_ranks\x18\x01 \x03(\r\"J\n\x19GetKvEventSourcesResponse\x12-\n\x07sources\x18\x01 \x03(\x0b\x32\x1c.openengine.v1.KvEventSource\"\xec\x02\n\rKvEventSource\x12\x11\n\ttransport\x18\x01 \x01(\t\x12\x30\n\rendpoint_addr\x18\x02 \x01(\x0b\x32\x19.openengine.v1.KvEndpoint\x12\r\n\x05topic\x18\x03 \x01(\t\x12\x17\n\x0freplay_endpoint\x18\x04 \x01(\t\x12\x1f\n\x12\x64\x61ta_parallel_rank\x18\x05 \x01(\rH\x00\x88\x01\x01\x12\x10\n\x08\x65ncoding\x18\x06 \x01(\t\x12\x1b\n\x0eschema_version\x18\x07 \x01(\rH\x01\x88\x01\x01\x12\x19\n\x0c\x62uffer_steps\x18\x08 \x01(\rH\x02\x88\x01\x01\x12\x10\n\x03hwm\x18\t \x01(\rH\x03\x88\x01\x01\x12\x1b\n\x0emax_queue_size\x18\n \x01(\rH\x04\x88\x01\x01\x42\x15\n\x13_data_parallel_rankB\x11\n\x0f_schema_versionB\x0f\n\r_buffer_stepsB\x06\n\x04_hwmB\x11\n\x0f_max_queue_size\"p\n\x18SubscribeKvEventsRequest\x12\x1b\n\x13\x64\x61ta_parallel_ranks\x18\x01 \x03(\r\x12\x18\n\x10include_snapshot\x18\x02 \x01(\x08\x12\x1d\n\x15start_sequence_number\x18\x03 \x01(\x04\"\x7f\n\x19SubscribeKvEventsResponse\x12,\n\x05\x62\x61tch\x18\x01 \x01(\x0b\x32\x1b.openengine.v1.KvEventBatchH\x00\x12+\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x1a.openengine.v1.EngineErrorH\x00\x42\x07\n\x05\x65vent\"\x89\x01\n\x0cKvEventBatch\x12\x17\n\x0fsequence_number\x18\x01 \x01(\x04\x12\x1c\n\x14timestamp_unix_nanos\x18\x02 \x01(\x04\x12\x1a\n\x12\x64\x61ta_parallel_rank\x18\x03 \x01(\r\x12&\n\x06\x65vents\x18\x04 \x03(\x0b\x32\x16.openengine.v1.KvEvent\"\x80\x02\n\x07KvEvent\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12/\n\nkv_session\x18\x02 \x01(\x0b\x32\x1b.openengine.v1.KvSessionRef\x12\x32\n\x0c\x62lock_stored\x18\n \x01(\x0b\x32\x1a.openengine.v1.BlockStoredH\x00\x12\x34\n\rblock_removed\x18\x0b \x01(\x0b\x32\x1b.openengine.v1.BlockRemovedH\x00\x12=\n\x12\x61ll_blocks_cleared\x18\x0c \x01(\x0b\x32\x1f.openengine.v1.AllBlocksClearedH\x00\x42\x07\n\x05\x65vent\"\xf7\x02\n\x0b\x42lockStored\x12\x30\n\x0c\x62lock_hashes\x18\x01 \x03(\x0b\x32\x1a.openengine.v1.KvBlockHash\x12\x35\n\x11parent_block_hash\x18\x02 \x01(\x0b\x32\x1a.openengine.v1.KvBlockHash\x12\x11\n\ttoken_ids\x18\x03 \x03(\r\x12\x12\n\nblock_size\x18\x04 \x01(\r\x12\x0f\n\x07lora_id\x18\x05 \x01(\x03\x12\x11\n\tlora_name\x18\x06 \x01(\t\x12,\n\x06medium\x18\x07 \x01(\x0e\x32\x1c.openengine.v1.StorageMedium\x12\x31\n\nextra_keys\x18\x14 \x03(\x0b\x32\x1d.openengine.v1.OpaqueKeyTuple\x12\x11\n\tgroup_idx\x18\x15 \x01(\r\x12\x1a\n\x12kv_cache_spec_kind\x18\x16 \x01(\t\x12$\n\x1ckv_cache_spec_sliding_window\x18\x17 \x01(\r\"\x81\x01\n\x0c\x42lockRemoved\x12\x30\n\x0c\x62lock_hashes\x18\x01 \x03(\x0b\x32\x1a.openengine.v1.KvBlockHash\x12,\n\x06medium\x18\x02 \x01(\x0e\x32\x1c.openengine.v1.StorageMedium\x12\x11\n\tgroup_idx\x18\x03 \x01(\r\"\x12\n\x10\x41llBlocksCleared\".\n\x0bKvBlockHash\x12\r\n\x05value\x18\x01 \x01(\x0c\x12\x10\n\x08\x65ncoding\x18\x02 \x01(\t\" \n\x0eOpaqueKeyTuple\x12\x0e\n\x06values\x18\x01 \x03(\t*\x9c\x01\n\rStorageMedium\x12\x1e\n\x1aSTORAGE_MEDIUM_UNSPECIFIED\x10\x00\x12\x16\n\x12STORAGE_MEDIUM_GPU\x10\x01\x12\x1d\n\x19STORAGE_MEDIUM_CPU_PINNED\x10\x02\x12\x17\n\x13STORAGE_MEDIUM_DISK\x10\x03\x12\x1b\n\x17STORAGE_MEDIUM_EXTERNAL\x10\x04\x62\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'openengine.v1.kv_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ DESCRIPTOR._loaded_options = None
+ _globals['_STORAGEMEDIUM']._serialized_start=2567
+ _globals['_STORAGEMEDIUM']._serialized_end=2723
+ _globals['_KVSESSIONREF']._serialized_start=99
+ _globals['_KVSESSIONREF']._serialized_end=274
+ _globals['_KVENDPOINT']._serialized_start=276
+ _globals['_KVENDPOINT']._serialized_end=334
+ _globals['_GETKVCONNECTORINFOREQUEST']._serialized_start=336
+ _globals['_GETKVCONNECTORINFOREQUEST']._serialized_end=363
+ _globals['_KVCONNECTORINFO']._serialized_start=366
+ _globals['_KVCONNECTORINFO']._serialized_end=810
+ _globals['_GETKVEVENTSOURCESREQUEST']._serialized_start=812
+ _globals['_GETKVEVENTSOURCESREQUEST']._serialized_end=867
+ _globals['_GETKVEVENTSOURCESRESPONSE']._serialized_start=869
+ _globals['_GETKVEVENTSOURCESRESPONSE']._serialized_end=943
+ _globals['_KVEVENTSOURCE']._serialized_start=946
+ _globals['_KVEVENTSOURCE']._serialized_end=1310
+ _globals['_SUBSCRIBEKVEVENTSREQUEST']._serialized_start=1312
+ _globals['_SUBSCRIBEKVEVENTSREQUEST']._serialized_end=1424
+ _globals['_SUBSCRIBEKVEVENTSRESPONSE']._serialized_start=1426
+ _globals['_SUBSCRIBEKVEVENTSRESPONSE']._serialized_end=1553
+ _globals['_KVEVENTBATCH']._serialized_start=1556
+ _globals['_KVEVENTBATCH']._serialized_end=1693
+ _globals['_KVEVENT']._serialized_start=1696
+ _globals['_KVEVENT']._serialized_end=1952
+ _globals['_BLOCKSTORED']._serialized_start=1955
+ _globals['_BLOCKSTORED']._serialized_end=2330
+ _globals['_BLOCKREMOVED']._serialized_start=2333
+ _globals['_BLOCKREMOVED']._serialized_end=2462
+ _globals['_ALLBLOCKSCLEARED']._serialized_start=2464
+ _globals['_ALLBLOCKSCLEARED']._serialized_end=2482
+ _globals['_KVBLOCKHASH']._serialized_start=2484
+ _globals['_KVBLOCKHASH']._serialized_end=2530
+ _globals['_OPAQUEKEYTUPLE']._serialized_start=2532
+ _globals['_OPAQUEKEYTUPLE']._serialized_end=2564
+# @@protoc_insertion_point(module_scope)
diff --git a/packages/python/src/openengine/v1/kv_pb2.pyi b/packages/python/src/openengine/v1/kv_pb2.pyi
new file mode 100644
index 0000000..ee42789
--- /dev/null
+++ b/packages/python/src/openengine/v1/kv_pb2.pyi
@@ -0,0 +1,207 @@
+from google.protobuf import struct_pb2 as _struct_pb2
+from openengine.v1 import error_pb2 as _error_pb2
+from google.protobuf.internal import containers as _containers
+from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from collections.abc import Iterable as _Iterable, Mapping as _Mapping
+from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
+
+DESCRIPTOR: _descriptor.FileDescriptor
+
+class StorageMedium(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ STORAGE_MEDIUM_UNSPECIFIED: _ClassVar[StorageMedium]
+ STORAGE_MEDIUM_GPU: _ClassVar[StorageMedium]
+ STORAGE_MEDIUM_CPU_PINNED: _ClassVar[StorageMedium]
+ STORAGE_MEDIUM_DISK: _ClassVar[StorageMedium]
+ STORAGE_MEDIUM_EXTERNAL: _ClassVar[StorageMedium]
+STORAGE_MEDIUM_UNSPECIFIED: StorageMedium
+STORAGE_MEDIUM_GPU: StorageMedium
+STORAGE_MEDIUM_CPU_PINNED: StorageMedium
+STORAGE_MEDIUM_DISK: StorageMedium
+STORAGE_MEDIUM_EXTERNAL: StorageMedium
+
+class KvSessionRef(_message.Message):
+ __slots__ = ("session_id", "transfer_backend", "endpoints", "dp_rank", "attributes_struct")
+ SESSION_ID_FIELD_NUMBER: _ClassVar[int]
+ TRANSFER_BACKEND_FIELD_NUMBER: _ClassVar[int]
+ ENDPOINTS_FIELD_NUMBER: _ClassVar[int]
+ DP_RANK_FIELD_NUMBER: _ClassVar[int]
+ ATTRIBUTES_STRUCT_FIELD_NUMBER: _ClassVar[int]
+ session_id: str
+ transfer_backend: str
+ endpoints: _containers.RepeatedCompositeFieldContainer[KvEndpoint]
+ dp_rank: int
+ attributes_struct: _struct_pb2.Struct
+ def __init__(self, session_id: _Optional[str] = ..., transfer_backend: _Optional[str] = ..., endpoints: _Optional[_Iterable[_Union[KvEndpoint, _Mapping]]] = ..., dp_rank: _Optional[int] = ..., attributes_struct: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ...
+
+class KvEndpoint(_message.Message):
+ __slots__ = ("host", "port", "protocol")
+ HOST_FIELD_NUMBER: _ClassVar[int]
+ PORT_FIELD_NUMBER: _ClassVar[int]
+ PROTOCOL_FIELD_NUMBER: _ClassVar[int]
+ host: str
+ port: int
+ protocol: str
+ def __init__(self, host: _Optional[str] = ..., port: _Optional[int] = ..., protocol: _Optional[str] = ...) -> None: ...
+
+class GetKvConnectorInfoRequest(_message.Message):
+ __slots__ = ()
+ def __init__(self) -> None: ...
+
+class KvConnectorInfo(_message.Message):
+ __slots__ = ("enabled", "transfer_backend", "local_endpoints", "supported_protocols", "supports_remote_prefill", "supports_decode_pull", "supports_abort_cleanup", "supports_drain", "schema_version")
+ ENABLED_FIELD_NUMBER: _ClassVar[int]
+ TRANSFER_BACKEND_FIELD_NUMBER: _ClassVar[int]
+ LOCAL_ENDPOINTS_FIELD_NUMBER: _ClassVar[int]
+ SUPPORTED_PROTOCOLS_FIELD_NUMBER: _ClassVar[int]
+ SUPPORTS_REMOTE_PREFILL_FIELD_NUMBER: _ClassVar[int]
+ SUPPORTS_DECODE_PULL_FIELD_NUMBER: _ClassVar[int]
+ SUPPORTS_ABORT_CLEANUP_FIELD_NUMBER: _ClassVar[int]
+ SUPPORTS_DRAIN_FIELD_NUMBER: _ClassVar[int]
+ SCHEMA_VERSION_FIELD_NUMBER: _ClassVar[int]
+ enabled: bool
+ transfer_backend: str
+ local_endpoints: _containers.RepeatedCompositeFieldContainer[KvEndpoint]
+ supported_protocols: _containers.RepeatedScalarFieldContainer[str]
+ supports_remote_prefill: bool
+ supports_decode_pull: bool
+ supports_abort_cleanup: bool
+ supports_drain: bool
+ schema_version: int
+ def __init__(self, enabled: _Optional[bool] = ..., transfer_backend: _Optional[str] = ..., local_endpoints: _Optional[_Iterable[_Union[KvEndpoint, _Mapping]]] = ..., supported_protocols: _Optional[_Iterable[str]] = ..., supports_remote_prefill: _Optional[bool] = ..., supports_decode_pull: _Optional[bool] = ..., supports_abort_cleanup: _Optional[bool] = ..., supports_drain: _Optional[bool] = ..., schema_version: _Optional[int] = ...) -> None: ...
+
+class GetKvEventSourcesRequest(_message.Message):
+ __slots__ = ("data_parallel_ranks",)
+ DATA_PARALLEL_RANKS_FIELD_NUMBER: _ClassVar[int]
+ data_parallel_ranks: _containers.RepeatedScalarFieldContainer[int]
+ def __init__(self, data_parallel_ranks: _Optional[_Iterable[int]] = ...) -> None: ...
+
+class GetKvEventSourcesResponse(_message.Message):
+ __slots__ = ("sources",)
+ SOURCES_FIELD_NUMBER: _ClassVar[int]
+ sources: _containers.RepeatedCompositeFieldContainer[KvEventSource]
+ def __init__(self, sources: _Optional[_Iterable[_Union[KvEventSource, _Mapping]]] = ...) -> None: ...
+
+class KvEventSource(_message.Message):
+ __slots__ = ("transport", "endpoint_addr", "topic", "replay_endpoint", "data_parallel_rank", "encoding", "schema_version", "buffer_steps", "hwm", "max_queue_size")
+ TRANSPORT_FIELD_NUMBER: _ClassVar[int]
+ ENDPOINT_ADDR_FIELD_NUMBER: _ClassVar[int]
+ TOPIC_FIELD_NUMBER: _ClassVar[int]
+ REPLAY_ENDPOINT_FIELD_NUMBER: _ClassVar[int]
+ DATA_PARALLEL_RANK_FIELD_NUMBER: _ClassVar[int]
+ ENCODING_FIELD_NUMBER: _ClassVar[int]
+ SCHEMA_VERSION_FIELD_NUMBER: _ClassVar[int]
+ BUFFER_STEPS_FIELD_NUMBER: _ClassVar[int]
+ HWM_FIELD_NUMBER: _ClassVar[int]
+ MAX_QUEUE_SIZE_FIELD_NUMBER: _ClassVar[int]
+ transport: str
+ endpoint_addr: KvEndpoint
+ topic: str
+ replay_endpoint: str
+ data_parallel_rank: int
+ encoding: str
+ schema_version: int
+ buffer_steps: int
+ hwm: int
+ max_queue_size: int
+ def __init__(self, transport: _Optional[str] = ..., endpoint_addr: _Optional[_Union[KvEndpoint, _Mapping]] = ..., topic: _Optional[str] = ..., replay_endpoint: _Optional[str] = ..., data_parallel_rank: _Optional[int] = ..., encoding: _Optional[str] = ..., schema_version: _Optional[int] = ..., buffer_steps: _Optional[int] = ..., hwm: _Optional[int] = ..., max_queue_size: _Optional[int] = ...) -> None: ...
+
+class SubscribeKvEventsRequest(_message.Message):
+ __slots__ = ("data_parallel_ranks", "include_snapshot", "start_sequence_number")
+ DATA_PARALLEL_RANKS_FIELD_NUMBER: _ClassVar[int]
+ INCLUDE_SNAPSHOT_FIELD_NUMBER: _ClassVar[int]
+ START_SEQUENCE_NUMBER_FIELD_NUMBER: _ClassVar[int]
+ data_parallel_ranks: _containers.RepeatedScalarFieldContainer[int]
+ include_snapshot: bool
+ start_sequence_number: int
+ def __init__(self, data_parallel_ranks: _Optional[_Iterable[int]] = ..., include_snapshot: _Optional[bool] = ..., start_sequence_number: _Optional[int] = ...) -> None: ...
+
+class SubscribeKvEventsResponse(_message.Message):
+ __slots__ = ("batch", "error")
+ BATCH_FIELD_NUMBER: _ClassVar[int]
+ ERROR_FIELD_NUMBER: _ClassVar[int]
+ batch: KvEventBatch
+ error: _error_pb2.EngineError
+ def __init__(self, batch: _Optional[_Union[KvEventBatch, _Mapping]] = ..., error: _Optional[_Union[_error_pb2.EngineError, _Mapping]] = ...) -> None: ...
+
+class KvEventBatch(_message.Message):
+ __slots__ = ("sequence_number", "timestamp_unix_nanos", "data_parallel_rank", "events")
+ SEQUENCE_NUMBER_FIELD_NUMBER: _ClassVar[int]
+ TIMESTAMP_UNIX_NANOS_FIELD_NUMBER: _ClassVar[int]
+ DATA_PARALLEL_RANK_FIELD_NUMBER: _ClassVar[int]
+ EVENTS_FIELD_NUMBER: _ClassVar[int]
+ sequence_number: int
+ timestamp_unix_nanos: int
+ data_parallel_rank: int
+ events: _containers.RepeatedCompositeFieldContainer[KvEvent]
+ def __init__(self, sequence_number: _Optional[int] = ..., timestamp_unix_nanos: _Optional[int] = ..., data_parallel_rank: _Optional[int] = ..., events: _Optional[_Iterable[_Union[KvEvent, _Mapping]]] = ...) -> None: ...
+
+class KvEvent(_message.Message):
+ __slots__ = ("request_id", "kv_session", "block_stored", "block_removed", "all_blocks_cleared")
+ REQUEST_ID_FIELD_NUMBER: _ClassVar[int]
+ KV_SESSION_FIELD_NUMBER: _ClassVar[int]
+ BLOCK_STORED_FIELD_NUMBER: _ClassVar[int]
+ BLOCK_REMOVED_FIELD_NUMBER: _ClassVar[int]
+ ALL_BLOCKS_CLEARED_FIELD_NUMBER: _ClassVar[int]
+ request_id: str
+ kv_session: KvSessionRef
+ block_stored: BlockStored
+ block_removed: BlockRemoved
+ all_blocks_cleared: AllBlocksCleared
+ def __init__(self, request_id: _Optional[str] = ..., kv_session: _Optional[_Union[KvSessionRef, _Mapping]] = ..., block_stored: _Optional[_Union[BlockStored, _Mapping]] = ..., block_removed: _Optional[_Union[BlockRemoved, _Mapping]] = ..., all_blocks_cleared: _Optional[_Union[AllBlocksCleared, _Mapping]] = ...) -> None: ...
+
+class BlockStored(_message.Message):
+ __slots__ = ("block_hashes", "parent_block_hash", "token_ids", "block_size", "lora_id", "lora_name", "medium", "extra_keys", "group_idx", "kv_cache_spec_kind", "kv_cache_spec_sliding_window")
+ BLOCK_HASHES_FIELD_NUMBER: _ClassVar[int]
+ PARENT_BLOCK_HASH_FIELD_NUMBER: _ClassVar[int]
+ TOKEN_IDS_FIELD_NUMBER: _ClassVar[int]
+ BLOCK_SIZE_FIELD_NUMBER: _ClassVar[int]
+ LORA_ID_FIELD_NUMBER: _ClassVar[int]
+ LORA_NAME_FIELD_NUMBER: _ClassVar[int]
+ MEDIUM_FIELD_NUMBER: _ClassVar[int]
+ EXTRA_KEYS_FIELD_NUMBER: _ClassVar[int]
+ GROUP_IDX_FIELD_NUMBER: _ClassVar[int]
+ KV_CACHE_SPEC_KIND_FIELD_NUMBER: _ClassVar[int]
+ KV_CACHE_SPEC_SLIDING_WINDOW_FIELD_NUMBER: _ClassVar[int]
+ block_hashes: _containers.RepeatedCompositeFieldContainer[KvBlockHash]
+ parent_block_hash: KvBlockHash
+ token_ids: _containers.RepeatedScalarFieldContainer[int]
+ block_size: int
+ lora_id: int
+ lora_name: str
+ medium: StorageMedium
+ extra_keys: _containers.RepeatedCompositeFieldContainer[OpaqueKeyTuple]
+ group_idx: int
+ kv_cache_spec_kind: str
+ kv_cache_spec_sliding_window: int
+ def __init__(self, block_hashes: _Optional[_Iterable[_Union[KvBlockHash, _Mapping]]] = ..., parent_block_hash: _Optional[_Union[KvBlockHash, _Mapping]] = ..., token_ids: _Optional[_Iterable[int]] = ..., block_size: _Optional[int] = ..., lora_id: _Optional[int] = ..., lora_name: _Optional[str] = ..., medium: _Optional[_Union[StorageMedium, str]] = ..., extra_keys: _Optional[_Iterable[_Union[OpaqueKeyTuple, _Mapping]]] = ..., group_idx: _Optional[int] = ..., kv_cache_spec_kind: _Optional[str] = ..., kv_cache_spec_sliding_window: _Optional[int] = ...) -> None: ...
+
+class BlockRemoved(_message.Message):
+ __slots__ = ("block_hashes", "medium", "group_idx")
+ BLOCK_HASHES_FIELD_NUMBER: _ClassVar[int]
+ MEDIUM_FIELD_NUMBER: _ClassVar[int]
+ GROUP_IDX_FIELD_NUMBER: _ClassVar[int]
+ block_hashes: _containers.RepeatedCompositeFieldContainer[KvBlockHash]
+ medium: StorageMedium
+ group_idx: int
+ def __init__(self, block_hashes: _Optional[_Iterable[_Union[KvBlockHash, _Mapping]]] = ..., medium: _Optional[_Union[StorageMedium, str]] = ..., group_idx: _Optional[int] = ...) -> None: ...
+
+class AllBlocksCleared(_message.Message):
+ __slots__ = ()
+ def __init__(self) -> None: ...
+
+class KvBlockHash(_message.Message):
+ __slots__ = ("value", "encoding")
+ VALUE_FIELD_NUMBER: _ClassVar[int]
+ ENCODING_FIELD_NUMBER: _ClassVar[int]
+ value: bytes
+ encoding: str
+ def __init__(self, value: _Optional[bytes] = ..., encoding: _Optional[str] = ...) -> None: ...
+
+class OpaqueKeyTuple(_message.Message):
+ __slots__ = ("values",)
+ VALUES_FIELD_NUMBER: _ClassVar[int]
+ values: _containers.RepeatedScalarFieldContainer[str]
+ def __init__(self, values: _Optional[_Iterable[str]] = ...) -> None: ...
diff --git a/packages/python/src/openengine/v1/lifecycle_pb2.py b/packages/python/src/openengine/v1/lifecycle_pb2.py
new file mode 100644
index 0000000..69a44ca
--- /dev/null
+++ b/packages/python/src/openengine/v1/lifecycle_pb2.py
@@ -0,0 +1,59 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: openengine/v1/lifecycle.proto
+# Protobuf Python Version: 6.33.5
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
+from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 6,
+ 33,
+ 5,
+ '',
+ 'openengine/v1/lifecycle.proto'
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from openengine.v1 import engine_pb2 as openengine_dot_v1_dot_engine__pb2
+from openengine.v1 import error_pb2 as openengine_dot_v1_dot_error__pb2
+from openengine.v1 import kv_pb2 as openengine_dot_v1_dot_kv__pb2
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dopenengine/v1/lifecycle.proto\x12\ropenengine.v1\x1a\x1aopenengine/v1/engine.proto\x1a\x19openengine/v1/error.proto\x1a\x16openengine/v1/kv.proto\"h\n\rHealthRequest\x12\x1f\n\x17include_inference_probe\x18\x01 \x01(\x08\x12\r\n\x05model\x18\x02 \x01(\t\x12\'\n\x04role\x18\x03 \x01(\x0e\x32\x19.openengine.v1.EngineRole\"g\n\x0eHealthResponse\x12)\n\x05state\x18\x01 \x01(\x0e\x32\x1a.openengine.v1.HealthState\x12*\n\x06\x63hecks\x18\x02 \x03(\x0b\x32\x1a.openengine.v1.HealthCheck\"W\n\x0bHealthCheck\x12\x0c\n\x04name\x18\x01 \x01(\t\x12)\n\x05state\x18\x02 \x01(\x0e\x32\x1a.openengine.v1.HealthState\x12\x0f\n\x07message\x18\x03 \x01(\t\"\x95\x01\n\x0c\x41\x62ortRequest\x12\x14\n\nrequest_id\x18\x01 \x01(\tH\x00\x12\x31\n\nkv_session\x18\x02 \x01(\x0b\x32\x1b.openengine.v1.KvSessionRefH\x00\x12\x32\n\x0c\x61ll_requests\x18\x03 \x01(\x0b\x32\x1a.openengine.v1.AllRequestsH\x00\x42\x08\n\x06target\"\r\n\x0b\x41llRequests\"L\n\rAbortResponse\x12*\n\x06status\x18\x01 \x01(\x0e\x32\x1a.openengine.v1.AbortStatus\x12\x0f\n\x07message\x18\x02 \x01(\t\"{\n\x0c\x44rainRequest\x12#\n\x1bstop_accepting_new_requests\x18\x01 \x01(\x08\x12\x18\n\x0b\x64\x65\x61\x64line_ms\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x1c\n\x14\x61\x62ort_after_deadline\x18\x03 \x01(\x08\x42\x0e\n\x0c_deadline_ms\"\xee\x01\n\rDrainResponse\x12*\n\x05state\x18\x01 \x01(\x0e\x32\x19.openengine.v1.DrainStateH\x00\x12+\n\x05\x65rror\x18\x05 \x01(\x0b\x32\x1a.openengine.v1.EngineErrorH\x00\x12\x1f\n\x12in_flight_requests\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1d\n\x10open_kv_sessions\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x0f\n\x07message\x18\x04 \x01(\tB\x07\n\x05\x65ventB\x15\n\x13_in_flight_requestsB\x13\n\x11_open_kv_sessions*\xb0\x01\n\x0bHealthState\x12\x1c\n\x18HEALTH_STATE_UNSPECIFIED\x10\x00\x12\x19\n\x15HEALTH_STATE_STARTING\x10\x01\x12\x16\n\x12HEALTH_STATE_READY\x10\x02\x12\x19\n\x15HEALTH_STATE_DEGRADED\x10\x03\x12\x19\n\x15HEALTH_STATE_DRAINING\x10\x04\x12\x1a\n\x16HEALTH_STATE_NOT_READY\x10\x05*h\n\x0b\x41\x62ortStatus\x12\x1c\n\x18\x41\x42ORT_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14\x41\x42ORT_STATUS_ABORTED\x10\x01\x12!\n\x1d\x41\x42ORT_STATUS_ALREADY_FINISHED\x10\x02*y\n\nDrainState\x12\x1b\n\x17\x44RAIN_STATE_UNSPECIFIED\x10\x00\x12\x17\n\x13\x44RAIN_STATE_STARTED\x10\x01\x12\x1b\n\x17\x44RAIN_STATE_IN_PROGRESS\x10\x02\x12\x18\n\x14\x44RAIN_STATE_COMPLETE\x10\x03\x62\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'openengine.v1.lifecycle_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ DESCRIPTOR._loaded_options = None
+ _globals['_HEALTHSTATE']._serialized_start=1039
+ _globals['_HEALTHSTATE']._serialized_end=1215
+ _globals['_ABORTSTATUS']._serialized_start=1217
+ _globals['_ABORTSTATUS']._serialized_end=1321
+ _globals['_DRAINSTATE']._serialized_start=1323
+ _globals['_DRAINSTATE']._serialized_end=1444
+ _globals['_HEALTHREQUEST']._serialized_start=127
+ _globals['_HEALTHREQUEST']._serialized_end=231
+ _globals['_HEALTHRESPONSE']._serialized_start=233
+ _globals['_HEALTHRESPONSE']._serialized_end=336
+ _globals['_HEALTHCHECK']._serialized_start=338
+ _globals['_HEALTHCHECK']._serialized_end=425
+ _globals['_ABORTREQUEST']._serialized_start=428
+ _globals['_ABORTREQUEST']._serialized_end=577
+ _globals['_ALLREQUESTS']._serialized_start=579
+ _globals['_ALLREQUESTS']._serialized_end=592
+ _globals['_ABORTRESPONSE']._serialized_start=594
+ _globals['_ABORTRESPONSE']._serialized_end=670
+ _globals['_DRAINREQUEST']._serialized_start=672
+ _globals['_DRAINREQUEST']._serialized_end=795
+ _globals['_DRAINRESPONSE']._serialized_start=798
+ _globals['_DRAINRESPONSE']._serialized_end=1036
+# @@protoc_insertion_point(module_scope)
diff --git a/packages/python/src/openengine/v1/lifecycle_pb2.pyi b/packages/python/src/openengine/v1/lifecycle_pb2.pyi
new file mode 100644
index 0000000..329d52d
--- /dev/null
+++ b/packages/python/src/openengine/v1/lifecycle_pb2.pyi
@@ -0,0 +1,120 @@
+from openengine.v1 import engine_pb2 as _engine_pb2
+from openengine.v1 import error_pb2 as _error_pb2
+from openengine.v1 import kv_pb2 as _kv_pb2
+from google.protobuf.internal import containers as _containers
+from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from collections.abc import Iterable as _Iterable, Mapping as _Mapping
+from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
+
+DESCRIPTOR: _descriptor.FileDescriptor
+
+class HealthState(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ HEALTH_STATE_UNSPECIFIED: _ClassVar[HealthState]
+ HEALTH_STATE_STARTING: _ClassVar[HealthState]
+ HEALTH_STATE_READY: _ClassVar[HealthState]
+ HEALTH_STATE_DEGRADED: _ClassVar[HealthState]
+ HEALTH_STATE_DRAINING: _ClassVar[HealthState]
+ HEALTH_STATE_NOT_READY: _ClassVar[HealthState]
+
+class AbortStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ ABORT_STATUS_UNSPECIFIED: _ClassVar[AbortStatus]
+ ABORT_STATUS_ABORTED: _ClassVar[AbortStatus]
+ ABORT_STATUS_ALREADY_FINISHED: _ClassVar[AbortStatus]
+
+class DrainState(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ DRAIN_STATE_UNSPECIFIED: _ClassVar[DrainState]
+ DRAIN_STATE_STARTED: _ClassVar[DrainState]
+ DRAIN_STATE_IN_PROGRESS: _ClassVar[DrainState]
+ DRAIN_STATE_COMPLETE: _ClassVar[DrainState]
+HEALTH_STATE_UNSPECIFIED: HealthState
+HEALTH_STATE_STARTING: HealthState
+HEALTH_STATE_READY: HealthState
+HEALTH_STATE_DEGRADED: HealthState
+HEALTH_STATE_DRAINING: HealthState
+HEALTH_STATE_NOT_READY: HealthState
+ABORT_STATUS_UNSPECIFIED: AbortStatus
+ABORT_STATUS_ABORTED: AbortStatus
+ABORT_STATUS_ALREADY_FINISHED: AbortStatus
+DRAIN_STATE_UNSPECIFIED: DrainState
+DRAIN_STATE_STARTED: DrainState
+DRAIN_STATE_IN_PROGRESS: DrainState
+DRAIN_STATE_COMPLETE: DrainState
+
+class HealthRequest(_message.Message):
+ __slots__ = ("include_inference_probe", "model", "role")
+ INCLUDE_INFERENCE_PROBE_FIELD_NUMBER: _ClassVar[int]
+ MODEL_FIELD_NUMBER: _ClassVar[int]
+ ROLE_FIELD_NUMBER: _ClassVar[int]
+ include_inference_probe: bool
+ model: str
+ role: _engine_pb2.EngineRole
+ def __init__(self, include_inference_probe: _Optional[bool] = ..., model: _Optional[str] = ..., role: _Optional[_Union[_engine_pb2.EngineRole, str]] = ...) -> None: ...
+
+class HealthResponse(_message.Message):
+ __slots__ = ("state", "checks")
+ STATE_FIELD_NUMBER: _ClassVar[int]
+ CHECKS_FIELD_NUMBER: _ClassVar[int]
+ state: HealthState
+ checks: _containers.RepeatedCompositeFieldContainer[HealthCheck]
+ def __init__(self, state: _Optional[_Union[HealthState, str]] = ..., checks: _Optional[_Iterable[_Union[HealthCheck, _Mapping]]] = ...) -> None: ...
+
+class HealthCheck(_message.Message):
+ __slots__ = ("name", "state", "message")
+ NAME_FIELD_NUMBER: _ClassVar[int]
+ STATE_FIELD_NUMBER: _ClassVar[int]
+ MESSAGE_FIELD_NUMBER: _ClassVar[int]
+ name: str
+ state: HealthState
+ message: str
+ def __init__(self, name: _Optional[str] = ..., state: _Optional[_Union[HealthState, str]] = ..., message: _Optional[str] = ...) -> None: ...
+
+class AbortRequest(_message.Message):
+ __slots__ = ("request_id", "kv_session", "all_requests")
+ REQUEST_ID_FIELD_NUMBER: _ClassVar[int]
+ KV_SESSION_FIELD_NUMBER: _ClassVar[int]
+ ALL_REQUESTS_FIELD_NUMBER: _ClassVar[int]
+ request_id: str
+ kv_session: _kv_pb2.KvSessionRef
+ all_requests: AllRequests
+ def __init__(self, request_id: _Optional[str] = ..., kv_session: _Optional[_Union[_kv_pb2.KvSessionRef, _Mapping]] = ..., all_requests: _Optional[_Union[AllRequests, _Mapping]] = ...) -> None: ...
+
+class AllRequests(_message.Message):
+ __slots__ = ()
+ def __init__(self) -> None: ...
+
+class AbortResponse(_message.Message):
+ __slots__ = ("status", "message")
+ STATUS_FIELD_NUMBER: _ClassVar[int]
+ MESSAGE_FIELD_NUMBER: _ClassVar[int]
+ status: AbortStatus
+ message: str
+ def __init__(self, status: _Optional[_Union[AbortStatus, str]] = ..., message: _Optional[str] = ...) -> None: ...
+
+class DrainRequest(_message.Message):
+ __slots__ = ("stop_accepting_new_requests", "deadline_ms", "abort_after_deadline")
+ STOP_ACCEPTING_NEW_REQUESTS_FIELD_NUMBER: _ClassVar[int]
+ DEADLINE_MS_FIELD_NUMBER: _ClassVar[int]
+ ABORT_AFTER_DEADLINE_FIELD_NUMBER: _ClassVar[int]
+ stop_accepting_new_requests: bool
+ deadline_ms: int
+ abort_after_deadline: bool
+ def __init__(self, stop_accepting_new_requests: _Optional[bool] = ..., deadline_ms: _Optional[int] = ..., abort_after_deadline: _Optional[bool] = ...) -> None: ...
+
+class DrainResponse(_message.Message):
+ __slots__ = ("state", "error", "in_flight_requests", "open_kv_sessions", "message")
+ STATE_FIELD_NUMBER: _ClassVar[int]
+ ERROR_FIELD_NUMBER: _ClassVar[int]
+ IN_FLIGHT_REQUESTS_FIELD_NUMBER: _ClassVar[int]
+ OPEN_KV_SESSIONS_FIELD_NUMBER: _ClassVar[int]
+ MESSAGE_FIELD_NUMBER: _ClassVar[int]
+ state: DrainState
+ error: _error_pb2.EngineError
+ in_flight_requests: int
+ open_kv_sessions: int
+ message: str
+ def __init__(self, state: _Optional[_Union[DrainState, str]] = ..., error: _Optional[_Union[_error_pb2.EngineError, _Mapping]] = ..., in_flight_requests: _Optional[int] = ..., open_kv_sessions: _Optional[int] = ..., message: _Optional[str] = ...) -> None: ...
diff --git a/packages/python/src/openengine/v1/lora_pb2.py b/packages/python/src/openengine/v1/lora_pb2.py
new file mode 100644
index 0000000..a53d2a8
--- /dev/null
+++ b/packages/python/src/openengine/v1/lora_pb2.py
@@ -0,0 +1,48 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: openengine/v1/lora.proto
+# Protobuf Python Version: 6.33.5
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
+from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 6,
+ 33,
+ 5,
+ '',
+ 'openengine/v1/lora.proto'
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18openengine/v1/lora.proto\x12\ropenengine.v1\"F\n\x0bLoraAdapter\x12\x0f\n\x07lora_id\x18\x01 \x01(\x03\x12\x11\n\tlora_name\x18\x02 \x01(\t\x12\x13\n\x0bsource_path\x18\x03 \x01(\t\">\n\x0fLoadLoraRequest\x12+\n\x07\x61\x64\x61pter\x18\x01 \x01(\x0b\x32\x1a.openengine.v1.LoraAdapter\"W\n\x10LoadLoraResponse\x12+\n\x07\x61\x64\x61pter\x18\x01 \x01(\x0b\x32\x1a.openengine.v1.LoraAdapter\x12\x16\n\x0e\x61lready_loaded\x18\x02 \x01(\x08\"&\n\x11UnloadLoraRequest\x12\x11\n\tlora_name\x18\x01 \x01(\t\"A\n\x12UnloadLoraResponse\x12+\n\x07\x61\x64\x61pter\x18\x01 \x01(\x0b\x32\x1a.openengine.v1.LoraAdapter\"\x12\n\x10ListLorasRequest\"A\n\x11ListLorasResponse\x12,\n\x08\x61\x64\x61pters\x18\x01 \x03(\x0b\x32\x1a.openengine.v1.LoraAdapterb\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'openengine.v1.lora_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ DESCRIPTOR._loaded_options = None
+ _globals['_LORAADAPTER']._serialized_start=43
+ _globals['_LORAADAPTER']._serialized_end=113
+ _globals['_LOADLORAREQUEST']._serialized_start=115
+ _globals['_LOADLORAREQUEST']._serialized_end=177
+ _globals['_LOADLORARESPONSE']._serialized_start=179
+ _globals['_LOADLORARESPONSE']._serialized_end=266
+ _globals['_UNLOADLORAREQUEST']._serialized_start=268
+ _globals['_UNLOADLORAREQUEST']._serialized_end=306
+ _globals['_UNLOADLORARESPONSE']._serialized_start=308
+ _globals['_UNLOADLORARESPONSE']._serialized_end=373
+ _globals['_LISTLORASREQUEST']._serialized_start=375
+ _globals['_LISTLORASREQUEST']._serialized_end=393
+ _globals['_LISTLORASRESPONSE']._serialized_start=395
+ _globals['_LISTLORASRESPONSE']._serialized_end=460
+# @@protoc_insertion_point(module_scope)
diff --git a/packages/python/src/openengine/v1/lora_pb2.pyi b/packages/python/src/openengine/v1/lora_pb2.pyi
new file mode 100644
index 0000000..e5a6064
--- /dev/null
+++ b/packages/python/src/openengine/v1/lora_pb2.pyi
@@ -0,0 +1,53 @@
+from google.protobuf.internal import containers as _containers
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from collections.abc import Iterable as _Iterable, Mapping as _Mapping
+from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
+
+DESCRIPTOR: _descriptor.FileDescriptor
+
+class LoraAdapter(_message.Message):
+ __slots__ = ("lora_id", "lora_name", "source_path")
+ LORA_ID_FIELD_NUMBER: _ClassVar[int]
+ LORA_NAME_FIELD_NUMBER: _ClassVar[int]
+ SOURCE_PATH_FIELD_NUMBER: _ClassVar[int]
+ lora_id: int
+ lora_name: str
+ source_path: str
+ def __init__(self, lora_id: _Optional[int] = ..., lora_name: _Optional[str] = ..., source_path: _Optional[str] = ...) -> None: ...
+
+class LoadLoraRequest(_message.Message):
+ __slots__ = ("adapter",)
+ ADAPTER_FIELD_NUMBER: _ClassVar[int]
+ adapter: LoraAdapter
+ def __init__(self, adapter: _Optional[_Union[LoraAdapter, _Mapping]] = ...) -> None: ...
+
+class LoadLoraResponse(_message.Message):
+ __slots__ = ("adapter", "already_loaded")
+ ADAPTER_FIELD_NUMBER: _ClassVar[int]
+ ALREADY_LOADED_FIELD_NUMBER: _ClassVar[int]
+ adapter: LoraAdapter
+ already_loaded: bool
+ def __init__(self, adapter: _Optional[_Union[LoraAdapter, _Mapping]] = ..., already_loaded: _Optional[bool] = ...) -> None: ...
+
+class UnloadLoraRequest(_message.Message):
+ __slots__ = ("lora_name",)
+ LORA_NAME_FIELD_NUMBER: _ClassVar[int]
+ lora_name: str
+ def __init__(self, lora_name: _Optional[str] = ...) -> None: ...
+
+class UnloadLoraResponse(_message.Message):
+ __slots__ = ("adapter",)
+ ADAPTER_FIELD_NUMBER: _ClassVar[int]
+ adapter: LoraAdapter
+ def __init__(self, adapter: _Optional[_Union[LoraAdapter, _Mapping]] = ...) -> None: ...
+
+class ListLorasRequest(_message.Message):
+ __slots__ = ()
+ def __init__(self) -> None: ...
+
+class ListLorasResponse(_message.Message):
+ __slots__ = ("adapters",)
+ ADAPTERS_FIELD_NUMBER: _ClassVar[int]
+ adapters: _containers.RepeatedCompositeFieldContainer[LoraAdapter]
+ def __init__(self, adapters: _Optional[_Iterable[_Union[LoraAdapter, _Mapping]]] = ...) -> None: ...
diff --git a/packages/python/src/openengine/v1/model_pb2.py b/packages/python/src/openengine/v1/model_pb2.py
new file mode 100644
index 0000000..f592e3e
--- /dev/null
+++ b/packages/python/src/openengine/v1/model_pb2.py
@@ -0,0 +1,56 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: openengine/v1/model.proto
+# Protobuf Python Version: 6.33.5
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
+from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 6,
+ 33,
+ 5,
+ '',
+ 'openengine/v1/model.proto'
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from openengine.v1 import classification_pb2 as openengine_dot_v1_dot_classification__pb2
+from openengine.v1 import embedding_pb2 as openengine_dot_v1_dot_embedding__pb2
+from openengine.v1 import input_pb2 as openengine_dot_v1_dot_input__pb2
+from openengine.v1 import scoring_pb2 as openengine_dot_v1_dot_scoring__pb2
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19openengine/v1/model.proto\x12\ropenengine.v1\x1a\"openengine/v1/classification.proto\x1a\x1dopenengine/v1/embedding.proto\x1a\x19openengine/v1/input.proto\x1a\x1bopenengine/v1/scoring.proto\"$\n\x13GetModelInfoRequest\x12\r\n\x05model\x18\x01 \x01(\t\"\xfe\x06\n\tModelInfo\x12\x10\n\x08model_id\x18\x01 \x01(\t\x12\x19\n\x11served_model_name\x18\x02 \x01(\t\x12\x1c\n\x14served_model_aliases\x18\x03 \x03(\t\x12\x1f\n\x12max_context_length\x18\x04 \x01(\rH\x00\x88\x01\x01\x12\x1e\n\x11max_output_tokens\x18\x05 \x01(\rH\x01\x88\x01\x01\x12\x1a\n\rkv_block_size\x18\x06 \x01(\rH\x02\x88\x01\x01\x12\x1c\n\x0ftotal_kv_blocks\x18\x07 \x01(\x04H\x03\x88\x01\x01\x12!\n\x14max_running_requests\x18\x08 \x01(\x04H\x04\x88\x01\x01\x12\x1f\n\x12max_batched_tokens\x18\t \x01(\x04H\x05\x88\x01\x01\x12\x17\n\x0ftokenizer_modes\x18\n \x03(\t\x12 \n\x13supports_text_input\x18\x14 \x01(\x08H\x06\x88\x01\x01\x12%\n\x18supports_token_ids_input\x18\x15 \x01(\x08H\x07\x88\x01\x01\x12\x39\n\ngeneration\x18\x16 \x01(\x0b\x32%.openengine.v1.GenerationCapabilities\x12\x1a\n\rsupports_lora\x18\x17 \x01(\x08H\x08\x88\x01\x01\x12 \n\x13supports_multimodal\x18\x18 \x01(\x08H\t\x88\x01\x01\x12\x18\n\x10reasoning_parser\x18\x19 \x01(\t\x12\x18\n\x10tool_call_parser\x18\x1a \x01(\t\x12.\n\x05tasks\x18\x1b \x01(\x0b\x32\x1f.openengine.v1.TaskCapabilities\x12\x46\n\x17multimodal_capabilities\x18\x1c \x01(\x0b\x32%.openengine.v1.MultimodalCapabilitiesB\x15\n\x13_max_context_lengthB\x14\n\x12_max_output_tokensB\x10\n\x0e_kv_block_sizeB\x12\n\x10_total_kv_blocksB\x17\n\x15_max_running_requestsB\x15\n\x13_max_batched_tokensB\x16\n\x14_supports_text_inputB\x1b\n\x19_supports_token_ids_inputB\x10\n\x0e_supports_loraB\x16\n\x14_supports_multimodal\"\x99\x02\n\x16MultimodalCapabilities\x12\x35\n\x14\x61ggregate_modalities\x18\x01 \x03(\x0e\x32\x17.openengine.v1.Modality\x12:\n\x19prefill_decode_modalities\x18\x02 \x03(\x0e\x32\x17.openengine.v1.Modality\x12\x34\n\x0csource_types\x18\x03 \x03(\x0e\x32\x1e.openengine.v1.MediaSourceType\x12/\n\"supports_per_request_media_options\x18\x04 \x01(\x08H\x00\x88\x01\x01\x42%\n#_supports_per_request_media_options\"\xab\x01\n\x10TaskCapabilities\x12/\n\x05\x65mbed\x18\x01 \x01(\x0b\x32 .openengine.v1.EmbedCapabilities\x12\x35\n\x08\x63lassify\x18\x02 \x01(\x0b\x32#.openengine.v1.ClassifyCapabilities\x12/\n\x05score\x18\x03 \x01(\x0b\x32 .openengine.v1.ScoreCapabilities\"\x8a\x04\n\x16GenerationCapabilities\x12;\n\x0fprompt_logprobs\x18\x01 \x01(\x0b\x32\".openengine.v1.LogprobCapabilities\x12;\n\x0foutput_logprobs\x18\x02 \x01(\x0b\x32\".openengine.v1.LogprobCapabilities\x12\x42\n\x0fguided_decoding\x18\x03 \x01(\x0b\x32).openengine.v1.GuidedDecodingCapabilities\x12\x1e\n\x11max_num_sequences\x18\x04 \x01(\rH\x00\x88\x01\x01\x12\x1e\n\x11supports_priority\x18\x05 \x01(\x08H\x01\x88\x01\x01\x12$\n\x17supports_stop_in_output\x18\x06 \x01(\x08H\x02\x88\x01\x01\x12 \n\x13supports_cache_salt\x18\x07 \x01(\x08H\x03\x88\x01\x01\x12)\n\x1csupports_prefix_cache_bypass\x18\x08 \x01(\x08H\x04\x88\x01\x01\x42\x14\n\x12_max_num_sequencesB\x14\n\x12_supports_priorityB\x1a\n\x18_supports_stop_in_outputB\x16\n\x14_supports_cache_saltB\x1f\n\x1d_supports_prefix_cache_bypass\"\xb0\x01\n\x13LogprobCapabilities\x12\x16\n\tsupported\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12M\n\x19\x63\x61ndidate_selection_modes\x18\x02 \x03(\x0e\x32*.openengine.v1.CandidateTokenSelectionMode\x12\x16\n\tmax_top_n\x18\x03 \x01(\rH\x01\x88\x01\x01\x42\x0c\n\n_supportedB\x0c\n\n_max_top_n\"t\n\x1aGuidedDecodingCapabilities\x12\x16\n\tsupported\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x30\n\x05modes\x18\x02 \x03(\x0e\x32!.openengine.v1.GuidedDecodingModeB\x0c\n\n_supported*\xcd\x01\n\x1b\x43\x61ndidateTokenSelectionMode\x12.\n*CANDIDATE_TOKEN_SELECTION_MODE_UNSPECIFIED\x10\x00\x12(\n$CANDIDATE_TOKEN_SELECTION_MODE_TOP_N\x10\x01\x12,\n(CANDIDATE_TOKEN_SELECTION_MODE_TOKEN_IDS\x10\x02\x12&\n\"CANDIDATE_TOKEN_SELECTION_MODE_ALL\x10\x03*\x97\x02\n\x12GuidedDecodingMode\x12$\n GUIDED_DECODING_MODE_UNSPECIFIED\x10\x00\x12$\n GUIDED_DECODING_MODE_JSON_SCHEMA\x10\x01\x12\x1e\n\x1aGUIDED_DECODING_MODE_REGEX\x10\x02\x12%\n!GUIDED_DECODING_MODE_EBNF_GRAMMAR\x10\x03\x12\'\n#GUIDED_DECODING_MODE_STRUCTURAL_TAG\x10\x04\x12\x1f\n\x1bGUIDED_DECODING_MODE_CHOICE\x10\x05\x12$\n GUIDED_DECODING_MODE_JSON_OBJECT\x10\x06\x62\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'openengine.v1.model_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ DESCRIPTOR._loaded_options = None
+ _globals['_CANDIDATETOKENSELECTIONMODE']._serialized_start=2383
+ _globals['_CANDIDATETOKENSELECTIONMODE']._serialized_end=2588
+ _globals['_GUIDEDDECODINGMODE']._serialized_start=2591
+ _globals['_GUIDEDDECODINGMODE']._serialized_end=2870
+ _globals['_GETMODELINFOREQUEST']._serialized_start=167
+ _globals['_GETMODELINFOREQUEST']._serialized_end=203
+ _globals['_MODELINFO']._serialized_start=206
+ _globals['_MODELINFO']._serialized_end=1100
+ _globals['_MULTIMODALCAPABILITIES']._serialized_start=1103
+ _globals['_MULTIMODALCAPABILITIES']._serialized_end=1384
+ _globals['_TASKCAPABILITIES']._serialized_start=1387
+ _globals['_TASKCAPABILITIES']._serialized_end=1558
+ _globals['_GENERATIONCAPABILITIES']._serialized_start=1561
+ _globals['_GENERATIONCAPABILITIES']._serialized_end=2083
+ _globals['_LOGPROBCAPABILITIES']._serialized_start=2086
+ _globals['_LOGPROBCAPABILITIES']._serialized_end=2262
+ _globals['_GUIDEDDECODINGCAPABILITIES']._serialized_start=2264
+ _globals['_GUIDEDDECODINGCAPABILITIES']._serialized_end=2380
+# @@protoc_insertion_point(module_scope)
diff --git a/packages/python/src/openengine/v1/model_pb2.pyi b/packages/python/src/openengine/v1/model_pb2.pyi
new file mode 100644
index 0000000..3ad52d8
--- /dev/null
+++ b/packages/python/src/openengine/v1/model_pb2.pyi
@@ -0,0 +1,148 @@
+from openengine.v1 import classification_pb2 as _classification_pb2
+from openengine.v1 import embedding_pb2 as _embedding_pb2
+from openengine.v1 import input_pb2 as _input_pb2
+from openengine.v1 import scoring_pb2 as _scoring_pb2
+from google.protobuf.internal import containers as _containers
+from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from collections.abc import Iterable as _Iterable, Mapping as _Mapping
+from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
+
+DESCRIPTOR: _descriptor.FileDescriptor
+
+class CandidateTokenSelectionMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ CANDIDATE_TOKEN_SELECTION_MODE_UNSPECIFIED: _ClassVar[CandidateTokenSelectionMode]
+ CANDIDATE_TOKEN_SELECTION_MODE_TOP_N: _ClassVar[CandidateTokenSelectionMode]
+ CANDIDATE_TOKEN_SELECTION_MODE_TOKEN_IDS: _ClassVar[CandidateTokenSelectionMode]
+ CANDIDATE_TOKEN_SELECTION_MODE_ALL: _ClassVar[CandidateTokenSelectionMode]
+
+class GuidedDecodingMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ GUIDED_DECODING_MODE_UNSPECIFIED: _ClassVar[GuidedDecodingMode]
+ GUIDED_DECODING_MODE_JSON_SCHEMA: _ClassVar[GuidedDecodingMode]
+ GUIDED_DECODING_MODE_REGEX: _ClassVar[GuidedDecodingMode]
+ GUIDED_DECODING_MODE_EBNF_GRAMMAR: _ClassVar[GuidedDecodingMode]
+ GUIDED_DECODING_MODE_STRUCTURAL_TAG: _ClassVar[GuidedDecodingMode]
+ GUIDED_DECODING_MODE_CHOICE: _ClassVar[GuidedDecodingMode]
+ GUIDED_DECODING_MODE_JSON_OBJECT: _ClassVar[GuidedDecodingMode]
+CANDIDATE_TOKEN_SELECTION_MODE_UNSPECIFIED: CandidateTokenSelectionMode
+CANDIDATE_TOKEN_SELECTION_MODE_TOP_N: CandidateTokenSelectionMode
+CANDIDATE_TOKEN_SELECTION_MODE_TOKEN_IDS: CandidateTokenSelectionMode
+CANDIDATE_TOKEN_SELECTION_MODE_ALL: CandidateTokenSelectionMode
+GUIDED_DECODING_MODE_UNSPECIFIED: GuidedDecodingMode
+GUIDED_DECODING_MODE_JSON_SCHEMA: GuidedDecodingMode
+GUIDED_DECODING_MODE_REGEX: GuidedDecodingMode
+GUIDED_DECODING_MODE_EBNF_GRAMMAR: GuidedDecodingMode
+GUIDED_DECODING_MODE_STRUCTURAL_TAG: GuidedDecodingMode
+GUIDED_DECODING_MODE_CHOICE: GuidedDecodingMode
+GUIDED_DECODING_MODE_JSON_OBJECT: GuidedDecodingMode
+
+class GetModelInfoRequest(_message.Message):
+ __slots__ = ("model",)
+ MODEL_FIELD_NUMBER: _ClassVar[int]
+ model: str
+ def __init__(self, model: _Optional[str] = ...) -> None: ...
+
+class ModelInfo(_message.Message):
+ __slots__ = ("model_id", "served_model_name", "served_model_aliases", "max_context_length", "max_output_tokens", "kv_block_size", "total_kv_blocks", "max_running_requests", "max_batched_tokens", "tokenizer_modes", "supports_text_input", "supports_token_ids_input", "generation", "supports_lora", "supports_multimodal", "reasoning_parser", "tool_call_parser", "tasks", "multimodal_capabilities")
+ MODEL_ID_FIELD_NUMBER: _ClassVar[int]
+ SERVED_MODEL_NAME_FIELD_NUMBER: _ClassVar[int]
+ SERVED_MODEL_ALIASES_FIELD_NUMBER: _ClassVar[int]
+ MAX_CONTEXT_LENGTH_FIELD_NUMBER: _ClassVar[int]
+ MAX_OUTPUT_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ KV_BLOCK_SIZE_FIELD_NUMBER: _ClassVar[int]
+ TOTAL_KV_BLOCKS_FIELD_NUMBER: _ClassVar[int]
+ MAX_RUNNING_REQUESTS_FIELD_NUMBER: _ClassVar[int]
+ MAX_BATCHED_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ TOKENIZER_MODES_FIELD_NUMBER: _ClassVar[int]
+ SUPPORTS_TEXT_INPUT_FIELD_NUMBER: _ClassVar[int]
+ SUPPORTS_TOKEN_IDS_INPUT_FIELD_NUMBER: _ClassVar[int]
+ GENERATION_FIELD_NUMBER: _ClassVar[int]
+ SUPPORTS_LORA_FIELD_NUMBER: _ClassVar[int]
+ SUPPORTS_MULTIMODAL_FIELD_NUMBER: _ClassVar[int]
+ REASONING_PARSER_FIELD_NUMBER: _ClassVar[int]
+ TOOL_CALL_PARSER_FIELD_NUMBER: _ClassVar[int]
+ TASKS_FIELD_NUMBER: _ClassVar[int]
+ MULTIMODAL_CAPABILITIES_FIELD_NUMBER: _ClassVar[int]
+ model_id: str
+ served_model_name: str
+ served_model_aliases: _containers.RepeatedScalarFieldContainer[str]
+ max_context_length: int
+ max_output_tokens: int
+ kv_block_size: int
+ total_kv_blocks: int
+ max_running_requests: int
+ max_batched_tokens: int
+ tokenizer_modes: _containers.RepeatedScalarFieldContainer[str]
+ supports_text_input: bool
+ supports_token_ids_input: bool
+ generation: GenerationCapabilities
+ supports_lora: bool
+ supports_multimodal: bool
+ reasoning_parser: str
+ tool_call_parser: str
+ tasks: TaskCapabilities
+ multimodal_capabilities: MultimodalCapabilities
+ def __init__(self, model_id: _Optional[str] = ..., served_model_name: _Optional[str] = ..., served_model_aliases: _Optional[_Iterable[str]] = ..., max_context_length: _Optional[int] = ..., max_output_tokens: _Optional[int] = ..., kv_block_size: _Optional[int] = ..., total_kv_blocks: _Optional[int] = ..., max_running_requests: _Optional[int] = ..., max_batched_tokens: _Optional[int] = ..., tokenizer_modes: _Optional[_Iterable[str]] = ..., supports_text_input: _Optional[bool] = ..., supports_token_ids_input: _Optional[bool] = ..., generation: _Optional[_Union[GenerationCapabilities, _Mapping]] = ..., supports_lora: _Optional[bool] = ..., supports_multimodal: _Optional[bool] = ..., reasoning_parser: _Optional[str] = ..., tool_call_parser: _Optional[str] = ..., tasks: _Optional[_Union[TaskCapabilities, _Mapping]] = ..., multimodal_capabilities: _Optional[_Union[MultimodalCapabilities, _Mapping]] = ...) -> None: ...
+
+class MultimodalCapabilities(_message.Message):
+ __slots__ = ("aggregate_modalities", "prefill_decode_modalities", "source_types", "supports_per_request_media_options")
+ AGGREGATE_MODALITIES_FIELD_NUMBER: _ClassVar[int]
+ PREFILL_DECODE_MODALITIES_FIELD_NUMBER: _ClassVar[int]
+ SOURCE_TYPES_FIELD_NUMBER: _ClassVar[int]
+ SUPPORTS_PER_REQUEST_MEDIA_OPTIONS_FIELD_NUMBER: _ClassVar[int]
+ aggregate_modalities: _containers.RepeatedScalarFieldContainer[_input_pb2.Modality]
+ prefill_decode_modalities: _containers.RepeatedScalarFieldContainer[_input_pb2.Modality]
+ source_types: _containers.RepeatedScalarFieldContainer[_input_pb2.MediaSourceType]
+ supports_per_request_media_options: bool
+ def __init__(self, aggregate_modalities: _Optional[_Iterable[_Union[_input_pb2.Modality, str]]] = ..., prefill_decode_modalities: _Optional[_Iterable[_Union[_input_pb2.Modality, str]]] = ..., source_types: _Optional[_Iterable[_Union[_input_pb2.MediaSourceType, str]]] = ..., supports_per_request_media_options: _Optional[bool] = ...) -> None: ...
+
+class TaskCapabilities(_message.Message):
+ __slots__ = ("embed", "classify", "score")
+ EMBED_FIELD_NUMBER: _ClassVar[int]
+ CLASSIFY_FIELD_NUMBER: _ClassVar[int]
+ SCORE_FIELD_NUMBER: _ClassVar[int]
+ embed: _embedding_pb2.EmbedCapabilities
+ classify: _classification_pb2.ClassifyCapabilities
+ score: _scoring_pb2.ScoreCapabilities
+ def __init__(self, embed: _Optional[_Union[_embedding_pb2.EmbedCapabilities, _Mapping]] = ..., classify: _Optional[_Union[_classification_pb2.ClassifyCapabilities, _Mapping]] = ..., score: _Optional[_Union[_scoring_pb2.ScoreCapabilities, _Mapping]] = ...) -> None: ...
+
+class GenerationCapabilities(_message.Message):
+ __slots__ = ("prompt_logprobs", "output_logprobs", "guided_decoding", "max_num_sequences", "supports_priority", "supports_stop_in_output", "supports_cache_salt", "supports_prefix_cache_bypass")
+ PROMPT_LOGPROBS_FIELD_NUMBER: _ClassVar[int]
+ OUTPUT_LOGPROBS_FIELD_NUMBER: _ClassVar[int]
+ GUIDED_DECODING_FIELD_NUMBER: _ClassVar[int]
+ MAX_NUM_SEQUENCES_FIELD_NUMBER: _ClassVar[int]
+ SUPPORTS_PRIORITY_FIELD_NUMBER: _ClassVar[int]
+ SUPPORTS_STOP_IN_OUTPUT_FIELD_NUMBER: _ClassVar[int]
+ SUPPORTS_CACHE_SALT_FIELD_NUMBER: _ClassVar[int]
+ SUPPORTS_PREFIX_CACHE_BYPASS_FIELD_NUMBER: _ClassVar[int]
+ prompt_logprobs: LogprobCapabilities
+ output_logprobs: LogprobCapabilities
+ guided_decoding: GuidedDecodingCapabilities
+ max_num_sequences: int
+ supports_priority: bool
+ supports_stop_in_output: bool
+ supports_cache_salt: bool
+ supports_prefix_cache_bypass: bool
+ def __init__(self, prompt_logprobs: _Optional[_Union[LogprobCapabilities, _Mapping]] = ..., output_logprobs: _Optional[_Union[LogprobCapabilities, _Mapping]] = ..., guided_decoding: _Optional[_Union[GuidedDecodingCapabilities, _Mapping]] = ..., max_num_sequences: _Optional[int] = ..., supports_priority: _Optional[bool] = ..., supports_stop_in_output: _Optional[bool] = ..., supports_cache_salt: _Optional[bool] = ..., supports_prefix_cache_bypass: _Optional[bool] = ...) -> None: ...
+
+class LogprobCapabilities(_message.Message):
+ __slots__ = ("supported", "candidate_selection_modes", "max_top_n")
+ SUPPORTED_FIELD_NUMBER: _ClassVar[int]
+ CANDIDATE_SELECTION_MODES_FIELD_NUMBER: _ClassVar[int]
+ MAX_TOP_N_FIELD_NUMBER: _ClassVar[int]
+ supported: bool
+ candidate_selection_modes: _containers.RepeatedScalarFieldContainer[CandidateTokenSelectionMode]
+ max_top_n: int
+ def __init__(self, supported: _Optional[bool] = ..., candidate_selection_modes: _Optional[_Iterable[_Union[CandidateTokenSelectionMode, str]]] = ..., max_top_n: _Optional[int] = ...) -> None: ...
+
+class GuidedDecodingCapabilities(_message.Message):
+ __slots__ = ("supported", "modes")
+ SUPPORTED_FIELD_NUMBER: _ClassVar[int]
+ MODES_FIELD_NUMBER: _ClassVar[int]
+ supported: bool
+ modes: _containers.RepeatedScalarFieldContainer[GuidedDecodingMode]
+ def __init__(self, supported: _Optional[bool] = ..., modes: _Optional[_Iterable[_Union[GuidedDecodingMode, str]]] = ...) -> None: ...
diff --git a/packages/python/src/openengine/v1/observability_pb2.py b/packages/python/src/openengine/v1/observability_pb2.py
new file mode 100644
index 0000000..63ede5f
--- /dev/null
+++ b/packages/python/src/openengine/v1/observability_pb2.py
@@ -0,0 +1,57 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: openengine/v1/observability.proto
+# Protobuf Python Version: 6.33.5
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
+from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 6,
+ 33,
+ 5,
+ '',
+ 'openengine/v1/observability.proto'
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from openengine.v1 import error_pb2 as openengine_dot_v1_dot_error__pb2
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!openengine/v1/observability.proto\x12\ropenengine.v1\x1a\x19openengine/v1/error.proto\"*\n\x0eGetLoadRequest\x12\x18\n\x10include_per_rank\x18\x01 \x01(\x08\"\xc5\x05\n\x08LoadInfo\x12\x13\n\x0binstance_id\x18\x01 \x01(\t\x12!\n\x14timestamp_unix_nanos\x18\x02 \x01(\x04H\x00\x88\x01\x01\x12\x1d\n\x10running_requests\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x1c\n\x0fqueued_requests\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x1f\n\x12\x61\x63tive_kv_sessions\x18\x05 \x01(\rH\x03\x88\x01\x01\x12\x1b\n\x0eused_kv_blocks\x18\x06 \x01(\x04H\x04\x88\x01\x01\x12\x1c\n\x0ftotal_kv_blocks\x18\x07 \x01(\x04H\x05\x88\x01\x01\x12\x1b\n\x0erunning_tokens\x18\x08 \x01(\x04H\x06\x88\x01\x01\x12\x1b\n\x0ewaiting_tokens\x18\t \x01(\x04H\x07\x88\x01\x01\x12\x1f\n\x12prefill_batch_size\x18\n \x01(\rH\x08\x88\x01\x01\x12\x1e\n\x11\x64\x65\x63ode_batch_size\x18\x0b \x01(\rH\t\x88\x01\x01\x12*\n\x05ranks\x18\x14 \x03(\x0b\x32\x1b.openengine.v1.RankLoadInfo\x12;\n\nattributes\x18\x1e \x03(\x0b\x32\'.openengine.v1.LoadInfo.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x17\n\x15_timestamp_unix_nanosB\x13\n\x11_running_requestsB\x12\n\x10_queued_requestsB\x15\n\x13_active_kv_sessionsB\x11\n\x0f_used_kv_blocksB\x12\n\x10_total_kv_blocksB\x11\n\x0f_running_tokensB\x11\n\x0f_waiting_tokensB\x15\n\x13_prefill_batch_sizeB\x14\n\x12_decode_batch_size\"\xfc\x02\n\x0cRankLoadInfo\x12\x1f\n\x12\x64\x61ta_parallel_rank\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1d\n\x10running_requests\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1c\n\x0fqueued_requests\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x1b\n\x0eused_kv_blocks\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\x1c\n\x0ftotal_kv_blocks\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x1f\n\x12prefill_batch_size\x18\x06 \x01(\rH\x05\x88\x01\x01\x12\x1e\n\x11\x64\x65\x63ode_batch_size\x18\x07 \x01(\rH\x06\x88\x01\x01\x42\x15\n\x13_data_parallel_rankB\x13\n\x11_running_requestsB\x12\n\x10_queued_requestsB\x11\n\x0f_used_kv_blocksB\x12\n\x10_total_kv_blocksB\x15\n\x13_prefill_batch_sizeB\x14\n\x12_decode_batch_size\"O\n\x1dSubscribeRuntimeEventsRequest\x12.\n\x05types\x18\x01 \x03(\x0e\x32\x1f.openengine.v1.RuntimeEventType\"\x8c\x01\n\x1eSubscribeRuntimeEventsResponse\x12\x34\n\rruntime_event\x18\x01 \x01(\x0b\x32\x1b.openengine.v1.RuntimeEventH\x00\x12+\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x1a.openengine.v1.EngineErrorH\x00\x42\x07\n\x05\x65vent\"\xe1\x01\n\x0cRuntimeEvent\x12\x10\n\x08\x65vent_id\x18\x01 \x01(\t\x12\x1c\n\x14timestamp_unix_nanos\x18\x02 \x01(\x04\x12-\n\x04type\x18\x03 \x01(\x0e\x32\x1f.openengine.v1.RuntimeEventType\x12?\n\nattributes\x18\x04 \x03(\x0b\x32+.openengine.v1.RuntimeEvent.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01*\xb8\x01\n\x10RuntimeEventType\x12\"\n\x1eRUNTIME_EVENT_TYPE_UNSPECIFIED\x10\x00\x12#\n\x1fRUNTIME_EVENT_TYPE_FORWARD_PASS\x10\x01\x12\x1c\n\x18RUNTIME_EVENT_TYPE_BATCH\x10\x02\x12\x1c\n\x18RUNTIME_EVENT_TYPE_QUEUE\x10\x03\x12\x1f\n\x1bRUNTIME_EVENT_TYPE_TRANSFER\x10\x04\x62\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'openengine.v1.observability_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ DESCRIPTOR._loaded_options = None
+ _globals['_LOADINFO_ATTRIBUTESENTRY']._loaded_options = None
+ _globals['_LOADINFO_ATTRIBUTESENTRY']._serialized_options = b'8\001'
+ _globals['_RUNTIMEEVENT_ATTRIBUTESENTRY']._loaded_options = None
+ _globals['_RUNTIMEEVENT_ATTRIBUTESENTRY']._serialized_options = b'8\001'
+ _globals['_RUNTIMEEVENTTYPE']._serialized_start=1671
+ _globals['_RUNTIMEEVENTTYPE']._serialized_end=1855
+ _globals['_GETLOADREQUEST']._serialized_start=79
+ _globals['_GETLOADREQUEST']._serialized_end=121
+ _globals['_LOADINFO']._serialized_start=124
+ _globals['_LOADINFO']._serialized_end=833
+ _globals['_LOADINFO_ATTRIBUTESENTRY']._serialized_start=573
+ _globals['_LOADINFO_ATTRIBUTESENTRY']._serialized_end=622
+ _globals['_RANKLOADINFO']._serialized_start=836
+ _globals['_RANKLOADINFO']._serialized_end=1216
+ _globals['_SUBSCRIBERUNTIMEEVENTSREQUEST']._serialized_start=1218
+ _globals['_SUBSCRIBERUNTIMEEVENTSREQUEST']._serialized_end=1297
+ _globals['_SUBSCRIBERUNTIMEEVENTSRESPONSE']._serialized_start=1300
+ _globals['_SUBSCRIBERUNTIMEEVENTSRESPONSE']._serialized_end=1440
+ _globals['_RUNTIMEEVENT']._serialized_start=1443
+ _globals['_RUNTIMEEVENT']._serialized_end=1668
+ _globals['_RUNTIMEEVENT_ATTRIBUTESENTRY']._serialized_start=573
+ _globals['_RUNTIMEEVENT_ATTRIBUTESENTRY']._serialized_end=622
+# @@protoc_insertion_point(module_scope)
diff --git a/packages/python/src/openengine/v1/observability_pb2.pyi b/packages/python/src/openengine/v1/observability_pb2.pyi
new file mode 100644
index 0000000..7b4de09
--- /dev/null
+++ b/packages/python/src/openengine/v1/observability_pb2.pyi
@@ -0,0 +1,116 @@
+from openengine.v1 import error_pb2 as _error_pb2
+from google.protobuf.internal import containers as _containers
+from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from collections.abc import Iterable as _Iterable, Mapping as _Mapping
+from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
+
+DESCRIPTOR: _descriptor.FileDescriptor
+
+class RuntimeEventType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ RUNTIME_EVENT_TYPE_UNSPECIFIED: _ClassVar[RuntimeEventType]
+ RUNTIME_EVENT_TYPE_FORWARD_PASS: _ClassVar[RuntimeEventType]
+ RUNTIME_EVENT_TYPE_BATCH: _ClassVar[RuntimeEventType]
+ RUNTIME_EVENT_TYPE_QUEUE: _ClassVar[RuntimeEventType]
+ RUNTIME_EVENT_TYPE_TRANSFER: _ClassVar[RuntimeEventType]
+RUNTIME_EVENT_TYPE_UNSPECIFIED: RuntimeEventType
+RUNTIME_EVENT_TYPE_FORWARD_PASS: RuntimeEventType
+RUNTIME_EVENT_TYPE_BATCH: RuntimeEventType
+RUNTIME_EVENT_TYPE_QUEUE: RuntimeEventType
+RUNTIME_EVENT_TYPE_TRANSFER: RuntimeEventType
+
+class GetLoadRequest(_message.Message):
+ __slots__ = ("include_per_rank",)
+ INCLUDE_PER_RANK_FIELD_NUMBER: _ClassVar[int]
+ include_per_rank: bool
+ def __init__(self, include_per_rank: _Optional[bool] = ...) -> None: ...
+
+class LoadInfo(_message.Message):
+ __slots__ = ("instance_id", "timestamp_unix_nanos", "running_requests", "queued_requests", "active_kv_sessions", "used_kv_blocks", "total_kv_blocks", "running_tokens", "waiting_tokens", "prefill_batch_size", "decode_batch_size", "ranks", "attributes")
+ class AttributesEntry(_message.Message):
+ __slots__ = ("key", "value")
+ KEY_FIELD_NUMBER: _ClassVar[int]
+ VALUE_FIELD_NUMBER: _ClassVar[int]
+ key: str
+ value: str
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
+ INSTANCE_ID_FIELD_NUMBER: _ClassVar[int]
+ TIMESTAMP_UNIX_NANOS_FIELD_NUMBER: _ClassVar[int]
+ RUNNING_REQUESTS_FIELD_NUMBER: _ClassVar[int]
+ QUEUED_REQUESTS_FIELD_NUMBER: _ClassVar[int]
+ ACTIVE_KV_SESSIONS_FIELD_NUMBER: _ClassVar[int]
+ USED_KV_BLOCKS_FIELD_NUMBER: _ClassVar[int]
+ TOTAL_KV_BLOCKS_FIELD_NUMBER: _ClassVar[int]
+ RUNNING_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ WAITING_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ PREFILL_BATCH_SIZE_FIELD_NUMBER: _ClassVar[int]
+ DECODE_BATCH_SIZE_FIELD_NUMBER: _ClassVar[int]
+ RANKS_FIELD_NUMBER: _ClassVar[int]
+ ATTRIBUTES_FIELD_NUMBER: _ClassVar[int]
+ instance_id: str
+ timestamp_unix_nanos: int
+ running_requests: int
+ queued_requests: int
+ active_kv_sessions: int
+ used_kv_blocks: int
+ total_kv_blocks: int
+ running_tokens: int
+ waiting_tokens: int
+ prefill_batch_size: int
+ decode_batch_size: int
+ ranks: _containers.RepeatedCompositeFieldContainer[RankLoadInfo]
+ attributes: _containers.ScalarMap[str, str]
+ def __init__(self, instance_id: _Optional[str] = ..., timestamp_unix_nanos: _Optional[int] = ..., running_requests: _Optional[int] = ..., queued_requests: _Optional[int] = ..., active_kv_sessions: _Optional[int] = ..., used_kv_blocks: _Optional[int] = ..., total_kv_blocks: _Optional[int] = ..., running_tokens: _Optional[int] = ..., waiting_tokens: _Optional[int] = ..., prefill_batch_size: _Optional[int] = ..., decode_batch_size: _Optional[int] = ..., ranks: _Optional[_Iterable[_Union[RankLoadInfo, _Mapping]]] = ..., attributes: _Optional[_Mapping[str, str]] = ...) -> None: ...
+
+class RankLoadInfo(_message.Message):
+ __slots__ = ("data_parallel_rank", "running_requests", "queued_requests", "used_kv_blocks", "total_kv_blocks", "prefill_batch_size", "decode_batch_size")
+ DATA_PARALLEL_RANK_FIELD_NUMBER: _ClassVar[int]
+ RUNNING_REQUESTS_FIELD_NUMBER: _ClassVar[int]
+ QUEUED_REQUESTS_FIELD_NUMBER: _ClassVar[int]
+ USED_KV_BLOCKS_FIELD_NUMBER: _ClassVar[int]
+ TOTAL_KV_BLOCKS_FIELD_NUMBER: _ClassVar[int]
+ PREFILL_BATCH_SIZE_FIELD_NUMBER: _ClassVar[int]
+ DECODE_BATCH_SIZE_FIELD_NUMBER: _ClassVar[int]
+ data_parallel_rank: int
+ running_requests: int
+ queued_requests: int
+ used_kv_blocks: int
+ total_kv_blocks: int
+ prefill_batch_size: int
+ decode_batch_size: int
+ def __init__(self, data_parallel_rank: _Optional[int] = ..., running_requests: _Optional[int] = ..., queued_requests: _Optional[int] = ..., used_kv_blocks: _Optional[int] = ..., total_kv_blocks: _Optional[int] = ..., prefill_batch_size: _Optional[int] = ..., decode_batch_size: _Optional[int] = ...) -> None: ...
+
+class SubscribeRuntimeEventsRequest(_message.Message):
+ __slots__ = ("types",)
+ TYPES_FIELD_NUMBER: _ClassVar[int]
+ types: _containers.RepeatedScalarFieldContainer[RuntimeEventType]
+ def __init__(self, types: _Optional[_Iterable[_Union[RuntimeEventType, str]]] = ...) -> None: ...
+
+class SubscribeRuntimeEventsResponse(_message.Message):
+ __slots__ = ("runtime_event", "error")
+ RUNTIME_EVENT_FIELD_NUMBER: _ClassVar[int]
+ ERROR_FIELD_NUMBER: _ClassVar[int]
+ runtime_event: RuntimeEvent
+ error: _error_pb2.EngineError
+ def __init__(self, runtime_event: _Optional[_Union[RuntimeEvent, _Mapping]] = ..., error: _Optional[_Union[_error_pb2.EngineError, _Mapping]] = ...) -> None: ...
+
+class RuntimeEvent(_message.Message):
+ __slots__ = ("event_id", "timestamp_unix_nanos", "type", "attributes")
+ class AttributesEntry(_message.Message):
+ __slots__ = ("key", "value")
+ KEY_FIELD_NUMBER: _ClassVar[int]
+ VALUE_FIELD_NUMBER: _ClassVar[int]
+ key: str
+ value: str
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
+ EVENT_ID_FIELD_NUMBER: _ClassVar[int]
+ TIMESTAMP_UNIX_NANOS_FIELD_NUMBER: _ClassVar[int]
+ TYPE_FIELD_NUMBER: _ClassVar[int]
+ ATTRIBUTES_FIELD_NUMBER: _ClassVar[int]
+ event_id: str
+ timestamp_unix_nanos: int
+ type: RuntimeEventType
+ attributes: _containers.ScalarMap[str, str]
+ def __init__(self, event_id: _Optional[str] = ..., timestamp_unix_nanos: _Optional[int] = ..., type: _Optional[_Union[RuntimeEventType, str]] = ..., attributes: _Optional[_Mapping[str, str]] = ...) -> None: ...
diff --git a/packages/python/src/openengine/v1/openengine_pb2.py b/packages/python/src/openengine/v1/openengine_pb2.py
new file mode 100644
index 0000000..2dfeed7
--- /dev/null
+++ b/packages/python/src/openengine/v1/openengine_pb2.py
@@ -0,0 +1,46 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: openengine/v1/openengine.proto
+# Protobuf Python Version: 6.33.5
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
+from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 6,
+ 33,
+ 5,
+ '',
+ 'openengine/v1/openengine.proto'
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from openengine.v1 import classification_pb2 as openengine_dot_v1_dot_classification__pb2
+from openengine.v1 import embedding_pb2 as openengine_dot_v1_dot_embedding__pb2
+from openengine.v1 import engine_pb2 as openengine_dot_v1_dot_engine__pb2
+from openengine.v1 import generation_pb2 as openengine_dot_v1_dot_generation__pb2
+from openengine.v1 import kv_pb2 as openengine_dot_v1_dot_kv__pb2
+from openengine.v1 import lifecycle_pb2 as openengine_dot_v1_dot_lifecycle__pb2
+from openengine.v1 import lora_pb2 as openengine_dot_v1_dot_lora__pb2
+from openengine.v1 import model_pb2 as openengine_dot_v1_dot_model__pb2
+from openengine.v1 import observability_pb2 as openengine_dot_v1_dot_observability__pb2
+from openengine.v1 import scoring_pb2 as openengine_dot_v1_dot_scoring__pb2
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1eopenengine/v1/openengine.proto\x12\ropenengine.v1\x1a\"openengine/v1/classification.proto\x1a\x1dopenengine/v1/embedding.proto\x1a\x1aopenengine/v1/engine.proto\x1a\x1eopenengine/v1/generation.proto\x1a\x16openengine/v1/kv.proto\x1a\x1dopenengine/v1/lifecycle.proto\x1a\x18openengine/v1/lora.proto\x1a\x19openengine/v1/model.proto\x1a!openengine/v1/observability.proto\x1a\x1bopenengine/v1/scoring.proto2\xfe\n\n\nOpenEngine\x12M\n\x08Generate\x12\x1e.openengine.v1.GenerateRequest\x1a\x1f.openengine.v1.GenerateResponse0\x01\x12\x42\n\x05\x45mbed\x12\x1b.openengine.v1.EmbedRequest\x1a\x1c.openengine.v1.EmbedResponse\x12K\n\x08\x43lassify\x12\x1e.openengine.v1.ClassifyRequest\x1a\x1f.openengine.v1.ClassifyResponse\x12\x42\n\x05Score\x12\x1b.openengine.v1.ScoreRequest\x1a\x1c.openengine.v1.ScoreResponse\x12O\n\rGetEngineInfo\x12#.openengine.v1.GetEngineInfoRequest\x1a\x19.openengine.v1.EngineInfo\x12L\n\x0cGetModelInfo\x12\".openengine.v1.GetModelInfoRequest\x1a\x18.openengine.v1.ModelInfo\x12\x41\n\x07GetLoad\x12\x1d.openengine.v1.GetLoadRequest\x1a\x17.openengine.v1.LoadInfo\x12\x45\n\x06Health\x12\x1c.openengine.v1.HealthRequest\x1a\x1d.openengine.v1.HealthResponse\x12\x42\n\x05\x41\x62ort\x12\x1b.openengine.v1.AbortRequest\x1a\x1c.openengine.v1.AbortResponse\x12\x44\n\x05\x44rain\x12\x1b.openengine.v1.DrainRequest\x1a\x1c.openengine.v1.DrainResponse0\x01\x12K\n\x08LoadLora\x12\x1e.openengine.v1.LoadLoraRequest\x1a\x1f.openengine.v1.LoadLoraResponse\x12Q\n\nUnloadLora\x12 .openengine.v1.UnloadLoraRequest\x1a!.openengine.v1.UnloadLoraResponse\x12N\n\tListLoras\x12\x1f.openengine.v1.ListLorasRequest\x1a .openengine.v1.ListLorasResponse\x12^\n\x12GetKvConnectorInfo\x12(.openengine.v1.GetKvConnectorInfoRequest\x1a\x1e.openengine.v1.KvConnectorInfo\x12\x66\n\x11GetKvEventSources\x12\'.openengine.v1.GetKvEventSourcesRequest\x1a(.openengine.v1.GetKvEventSourcesResponse\x12h\n\x11SubscribeKvEvents\x12\'.openengine.v1.SubscribeKvEventsRequest\x1a(.openengine.v1.SubscribeKvEventsResponse0\x01\x12w\n\x16SubscribeRuntimeEvents\x12,.openengine.v1.SubscribeRuntimeEventsRequest\x1a-.openengine.v1.SubscribeRuntimeEventsResponse0\x01\x62\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'openengine.v1.openengine_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ DESCRIPTOR._loaded_options = None
+ _globals['_OPENENGINE']._serialized_start=349
+ _globals['_OPENENGINE']._serialized_end=1755
+# @@protoc_insertion_point(module_scope)
diff --git a/packages/python/src/openengine/v1/openengine_pb2.pyi b/packages/python/src/openengine/v1/openengine_pb2.pyi
new file mode 100644
index 0000000..143ffb4
--- /dev/null
+++ b/packages/python/src/openengine/v1/openengine_pb2.pyi
@@ -0,0 +1,14 @@
+from openengine.v1 import classification_pb2 as _classification_pb2
+from openengine.v1 import embedding_pb2 as _embedding_pb2
+from openengine.v1 import engine_pb2 as _engine_pb2
+from openengine.v1 import generation_pb2 as _generation_pb2
+from openengine.v1 import kv_pb2 as _kv_pb2
+from openengine.v1 import lifecycle_pb2 as _lifecycle_pb2
+from openengine.v1 import lora_pb2 as _lora_pb2
+from openengine.v1 import model_pb2 as _model_pb2
+from openengine.v1 import observability_pb2 as _observability_pb2
+from openengine.v1 import scoring_pb2 as _scoring_pb2
+from google.protobuf import descriptor as _descriptor
+from typing import ClassVar as _ClassVar
+
+DESCRIPTOR: _descriptor.FileDescriptor
diff --git a/packages/python/src/openengine/v1/openengine_pb2_grpc.py b/packages/python/src/openengine/v1/openengine_pb2_grpc.py
new file mode 100644
index 0000000..29bf6dd
--- /dev/null
+++ b/packages/python/src/openengine/v1/openengine_pb2_grpc.py
@@ -0,0 +1,801 @@
+# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
+"""Client and server classes corresponding to protobuf-defined services."""
+import grpc
+import warnings
+
+from openengine.v1 import classification_pb2 as openengine_dot_v1_dot_classification__pb2
+from openengine.v1 import embedding_pb2 as openengine_dot_v1_dot_embedding__pb2
+from openengine.v1 import engine_pb2 as openengine_dot_v1_dot_engine__pb2
+from openengine.v1 import generation_pb2 as openengine_dot_v1_dot_generation__pb2
+from openengine.v1 import kv_pb2 as openengine_dot_v1_dot_kv__pb2
+from openengine.v1 import lifecycle_pb2 as openengine_dot_v1_dot_lifecycle__pb2
+from openengine.v1 import lora_pb2 as openengine_dot_v1_dot_lora__pb2
+from openengine.v1 import model_pb2 as openengine_dot_v1_dot_model__pb2
+from openengine.v1 import observability_pb2 as openengine_dot_v1_dot_observability__pb2
+from openengine.v1 import scoring_pb2 as openengine_dot_v1_dot_scoring__pb2
+
+GRPC_GENERATED_VERSION = '1.81.1'
+GRPC_VERSION = grpc.__version__
+_version_not_supported = False
+
+try:
+ from grpc._utilities import first_version_is_lower
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
+except ImportError:
+ _version_not_supported = True
+
+if _version_not_supported:
+ raise RuntimeError(
+ f'The grpc package installed is at version {GRPC_VERSION},'
+ + ' but the generated code in openengine/v1/openengine_pb2_grpc.py depends on'
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
+ )
+
+
+class OpenEngineStub:
+ """Missing associated documentation comment in .proto file."""
+
+ def __init__(self, channel):
+ """Constructor.
+
+ Args:
+ channel: A grpc.Channel.
+ """
+ self.Generate = channel.unary_stream(
+ '/openengine.v1.OpenEngine/Generate',
+ request_serializer=openengine_dot_v1_dot_generation__pb2.GenerateRequest.SerializeToString,
+ response_deserializer=openengine_dot_v1_dot_generation__pb2.GenerateResponse.FromString,
+ _registered_method=True)
+ self.Embed = channel.unary_unary(
+ '/openengine.v1.OpenEngine/Embed',
+ request_serializer=openengine_dot_v1_dot_embedding__pb2.EmbedRequest.SerializeToString,
+ response_deserializer=openengine_dot_v1_dot_embedding__pb2.EmbedResponse.FromString,
+ _registered_method=True)
+ self.Classify = channel.unary_unary(
+ '/openengine.v1.OpenEngine/Classify',
+ request_serializer=openengine_dot_v1_dot_classification__pb2.ClassifyRequest.SerializeToString,
+ response_deserializer=openengine_dot_v1_dot_classification__pb2.ClassifyResponse.FromString,
+ _registered_method=True)
+ self.Score = channel.unary_unary(
+ '/openengine.v1.OpenEngine/Score',
+ request_serializer=openengine_dot_v1_dot_scoring__pb2.ScoreRequest.SerializeToString,
+ response_deserializer=openengine_dot_v1_dot_scoring__pb2.ScoreResponse.FromString,
+ _registered_method=True)
+ self.GetEngineInfo = channel.unary_unary(
+ '/openengine.v1.OpenEngine/GetEngineInfo',
+ request_serializer=openengine_dot_v1_dot_engine__pb2.GetEngineInfoRequest.SerializeToString,
+ response_deserializer=openengine_dot_v1_dot_engine__pb2.EngineInfo.FromString,
+ _registered_method=True)
+ self.GetModelInfo = channel.unary_unary(
+ '/openengine.v1.OpenEngine/GetModelInfo',
+ request_serializer=openengine_dot_v1_dot_model__pb2.GetModelInfoRequest.SerializeToString,
+ response_deserializer=openengine_dot_v1_dot_model__pb2.ModelInfo.FromString,
+ _registered_method=True)
+ self.GetLoad = channel.unary_unary(
+ '/openengine.v1.OpenEngine/GetLoad',
+ request_serializer=openengine_dot_v1_dot_observability__pb2.GetLoadRequest.SerializeToString,
+ response_deserializer=openengine_dot_v1_dot_observability__pb2.LoadInfo.FromString,
+ _registered_method=True)
+ self.Health = channel.unary_unary(
+ '/openengine.v1.OpenEngine/Health',
+ request_serializer=openengine_dot_v1_dot_lifecycle__pb2.HealthRequest.SerializeToString,
+ response_deserializer=openengine_dot_v1_dot_lifecycle__pb2.HealthResponse.FromString,
+ _registered_method=True)
+ self.Abort = channel.unary_unary(
+ '/openengine.v1.OpenEngine/Abort',
+ request_serializer=openengine_dot_v1_dot_lifecycle__pb2.AbortRequest.SerializeToString,
+ response_deserializer=openengine_dot_v1_dot_lifecycle__pb2.AbortResponse.FromString,
+ _registered_method=True)
+ self.Drain = channel.unary_stream(
+ '/openengine.v1.OpenEngine/Drain',
+ request_serializer=openengine_dot_v1_dot_lifecycle__pb2.DrainRequest.SerializeToString,
+ response_deserializer=openengine_dot_v1_dot_lifecycle__pb2.DrainResponse.FromString,
+ _registered_method=True)
+ self.LoadLora = channel.unary_unary(
+ '/openengine.v1.OpenEngine/LoadLora',
+ request_serializer=openengine_dot_v1_dot_lora__pb2.LoadLoraRequest.SerializeToString,
+ response_deserializer=openengine_dot_v1_dot_lora__pb2.LoadLoraResponse.FromString,
+ _registered_method=True)
+ self.UnloadLora = channel.unary_unary(
+ '/openengine.v1.OpenEngine/UnloadLora',
+ request_serializer=openengine_dot_v1_dot_lora__pb2.UnloadLoraRequest.SerializeToString,
+ response_deserializer=openengine_dot_v1_dot_lora__pb2.UnloadLoraResponse.FromString,
+ _registered_method=True)
+ self.ListLoras = channel.unary_unary(
+ '/openengine.v1.OpenEngine/ListLoras',
+ request_serializer=openengine_dot_v1_dot_lora__pb2.ListLorasRequest.SerializeToString,
+ response_deserializer=openengine_dot_v1_dot_lora__pb2.ListLorasResponse.FromString,
+ _registered_method=True)
+ self.GetKvConnectorInfo = channel.unary_unary(
+ '/openengine.v1.OpenEngine/GetKvConnectorInfo',
+ request_serializer=openengine_dot_v1_dot_kv__pb2.GetKvConnectorInfoRequest.SerializeToString,
+ response_deserializer=openengine_dot_v1_dot_kv__pb2.KvConnectorInfo.FromString,
+ _registered_method=True)
+ self.GetKvEventSources = channel.unary_unary(
+ '/openengine.v1.OpenEngine/GetKvEventSources',
+ request_serializer=openengine_dot_v1_dot_kv__pb2.GetKvEventSourcesRequest.SerializeToString,
+ response_deserializer=openengine_dot_v1_dot_kv__pb2.GetKvEventSourcesResponse.FromString,
+ _registered_method=True)
+ self.SubscribeKvEvents = channel.unary_stream(
+ '/openengine.v1.OpenEngine/SubscribeKvEvents',
+ request_serializer=openengine_dot_v1_dot_kv__pb2.SubscribeKvEventsRequest.SerializeToString,
+ response_deserializer=openengine_dot_v1_dot_kv__pb2.SubscribeKvEventsResponse.FromString,
+ _registered_method=True)
+ self.SubscribeRuntimeEvents = channel.unary_stream(
+ '/openengine.v1.OpenEngine/SubscribeRuntimeEvents',
+ request_serializer=openengine_dot_v1_dot_observability__pb2.SubscribeRuntimeEventsRequest.SerializeToString,
+ response_deserializer=openengine_dot_v1_dot_observability__pb2.SubscribeRuntimeEventsResponse.FromString,
+ _registered_method=True)
+
+
+class OpenEngineServicer:
+ """Missing associated documentation comment in .proto file."""
+
+ def Generate(self, request, context):
+ """Core inference path.
+ """
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def Embed(self, request, context):
+ """Non-generative inference paths.
+ """
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def Classify(self, request, context):
+ """Missing associated documentation comment in .proto file."""
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def Score(self, request, context):
+ """Missing associated documentation comment in .proto file."""
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def GetEngineInfo(self, request, context):
+ """Runtime metadata and scheduling state.
+ """
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def GetModelInfo(self, request, context):
+ """Missing associated documentation comment in .proto file."""
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def GetLoad(self, request, context):
+ """Missing associated documentation comment in .proto file."""
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def Health(self, request, context):
+ """Health and lifecycle.
+ """
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def Abort(self, request, context):
+ """Missing associated documentation comment in .proto file."""
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def Drain(self, request, context):
+ """Missing associated documentation comment in .proto file."""
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def LoadLora(self, request, context):
+ """LoRA lifecycle.
+ """
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def UnloadLora(self, request, context):
+ """Missing associated documentation comment in .proto file."""
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def ListLoras(self, request, context):
+ """Missing associated documentation comment in .proto file."""
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def GetKvConnectorInfo(self, request, context):
+ """Disaggregated serving / KV transfer.
+ """
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def GetKvEventSources(self, request, context):
+ """Missing associated documentation comment in .proto file."""
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def SubscribeKvEvents(self, request, context):
+ """Missing associated documentation comment in .proto file."""
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def SubscribeRuntimeEvents(self, request, context):
+ """Structured runtime events for planners/controllers.
+ """
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+
+def add_OpenEngineServicer_to_server(servicer, server):
+ rpc_method_handlers = {
+ 'Generate': grpc.unary_stream_rpc_method_handler(
+ servicer.Generate,
+ request_deserializer=openengine_dot_v1_dot_generation__pb2.GenerateRequest.FromString,
+ response_serializer=openengine_dot_v1_dot_generation__pb2.GenerateResponse.SerializeToString,
+ ),
+ 'Embed': grpc.unary_unary_rpc_method_handler(
+ servicer.Embed,
+ request_deserializer=openengine_dot_v1_dot_embedding__pb2.EmbedRequest.FromString,
+ response_serializer=openengine_dot_v1_dot_embedding__pb2.EmbedResponse.SerializeToString,
+ ),
+ 'Classify': grpc.unary_unary_rpc_method_handler(
+ servicer.Classify,
+ request_deserializer=openengine_dot_v1_dot_classification__pb2.ClassifyRequest.FromString,
+ response_serializer=openengine_dot_v1_dot_classification__pb2.ClassifyResponse.SerializeToString,
+ ),
+ 'Score': grpc.unary_unary_rpc_method_handler(
+ servicer.Score,
+ request_deserializer=openengine_dot_v1_dot_scoring__pb2.ScoreRequest.FromString,
+ response_serializer=openengine_dot_v1_dot_scoring__pb2.ScoreResponse.SerializeToString,
+ ),
+ 'GetEngineInfo': grpc.unary_unary_rpc_method_handler(
+ servicer.GetEngineInfo,
+ request_deserializer=openengine_dot_v1_dot_engine__pb2.GetEngineInfoRequest.FromString,
+ response_serializer=openengine_dot_v1_dot_engine__pb2.EngineInfo.SerializeToString,
+ ),
+ 'GetModelInfo': grpc.unary_unary_rpc_method_handler(
+ servicer.GetModelInfo,
+ request_deserializer=openengine_dot_v1_dot_model__pb2.GetModelInfoRequest.FromString,
+ response_serializer=openengine_dot_v1_dot_model__pb2.ModelInfo.SerializeToString,
+ ),
+ 'GetLoad': grpc.unary_unary_rpc_method_handler(
+ servicer.GetLoad,
+ request_deserializer=openengine_dot_v1_dot_observability__pb2.GetLoadRequest.FromString,
+ response_serializer=openengine_dot_v1_dot_observability__pb2.LoadInfo.SerializeToString,
+ ),
+ 'Health': grpc.unary_unary_rpc_method_handler(
+ servicer.Health,
+ request_deserializer=openengine_dot_v1_dot_lifecycle__pb2.HealthRequest.FromString,
+ response_serializer=openengine_dot_v1_dot_lifecycle__pb2.HealthResponse.SerializeToString,
+ ),
+ 'Abort': grpc.unary_unary_rpc_method_handler(
+ servicer.Abort,
+ request_deserializer=openengine_dot_v1_dot_lifecycle__pb2.AbortRequest.FromString,
+ response_serializer=openengine_dot_v1_dot_lifecycle__pb2.AbortResponse.SerializeToString,
+ ),
+ 'Drain': grpc.unary_stream_rpc_method_handler(
+ servicer.Drain,
+ request_deserializer=openengine_dot_v1_dot_lifecycle__pb2.DrainRequest.FromString,
+ response_serializer=openengine_dot_v1_dot_lifecycle__pb2.DrainResponse.SerializeToString,
+ ),
+ 'LoadLora': grpc.unary_unary_rpc_method_handler(
+ servicer.LoadLora,
+ request_deserializer=openengine_dot_v1_dot_lora__pb2.LoadLoraRequest.FromString,
+ response_serializer=openengine_dot_v1_dot_lora__pb2.LoadLoraResponse.SerializeToString,
+ ),
+ 'UnloadLora': grpc.unary_unary_rpc_method_handler(
+ servicer.UnloadLora,
+ request_deserializer=openengine_dot_v1_dot_lora__pb2.UnloadLoraRequest.FromString,
+ response_serializer=openengine_dot_v1_dot_lora__pb2.UnloadLoraResponse.SerializeToString,
+ ),
+ 'ListLoras': grpc.unary_unary_rpc_method_handler(
+ servicer.ListLoras,
+ request_deserializer=openengine_dot_v1_dot_lora__pb2.ListLorasRequest.FromString,
+ response_serializer=openengine_dot_v1_dot_lora__pb2.ListLorasResponse.SerializeToString,
+ ),
+ 'GetKvConnectorInfo': grpc.unary_unary_rpc_method_handler(
+ servicer.GetKvConnectorInfo,
+ request_deserializer=openengine_dot_v1_dot_kv__pb2.GetKvConnectorInfoRequest.FromString,
+ response_serializer=openengine_dot_v1_dot_kv__pb2.KvConnectorInfo.SerializeToString,
+ ),
+ 'GetKvEventSources': grpc.unary_unary_rpc_method_handler(
+ servicer.GetKvEventSources,
+ request_deserializer=openengine_dot_v1_dot_kv__pb2.GetKvEventSourcesRequest.FromString,
+ response_serializer=openengine_dot_v1_dot_kv__pb2.GetKvEventSourcesResponse.SerializeToString,
+ ),
+ 'SubscribeKvEvents': grpc.unary_stream_rpc_method_handler(
+ servicer.SubscribeKvEvents,
+ request_deserializer=openengine_dot_v1_dot_kv__pb2.SubscribeKvEventsRequest.FromString,
+ response_serializer=openengine_dot_v1_dot_kv__pb2.SubscribeKvEventsResponse.SerializeToString,
+ ),
+ 'SubscribeRuntimeEvents': grpc.unary_stream_rpc_method_handler(
+ servicer.SubscribeRuntimeEvents,
+ request_deserializer=openengine_dot_v1_dot_observability__pb2.SubscribeRuntimeEventsRequest.FromString,
+ response_serializer=openengine_dot_v1_dot_observability__pb2.SubscribeRuntimeEventsResponse.SerializeToString,
+ ),
+ }
+ generic_handler = grpc.method_handlers_generic_handler(
+ 'openengine.v1.OpenEngine', rpc_method_handlers)
+ server.add_generic_rpc_handlers((generic_handler,))
+ server.add_registered_method_handlers('openengine.v1.OpenEngine', rpc_method_handlers)
+
+
+ # This class is part of an EXPERIMENTAL API.
+class OpenEngine:
+ """Missing associated documentation comment in .proto file."""
+
+ @staticmethod
+ def Generate(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_stream(
+ request,
+ target,
+ '/openengine.v1.OpenEngine/Generate',
+ openengine_dot_v1_dot_generation__pb2.GenerateRequest.SerializeToString,
+ openengine_dot_v1_dot_generation__pb2.GenerateResponse.FromString,
+ options,
+ channel_credentials,
+ insecure,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ _registered_method=True)
+
+ @staticmethod
+ def Embed(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_unary(
+ request,
+ target,
+ '/openengine.v1.OpenEngine/Embed',
+ openengine_dot_v1_dot_embedding__pb2.EmbedRequest.SerializeToString,
+ openengine_dot_v1_dot_embedding__pb2.EmbedResponse.FromString,
+ options,
+ channel_credentials,
+ insecure,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ _registered_method=True)
+
+ @staticmethod
+ def Classify(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_unary(
+ request,
+ target,
+ '/openengine.v1.OpenEngine/Classify',
+ openengine_dot_v1_dot_classification__pb2.ClassifyRequest.SerializeToString,
+ openengine_dot_v1_dot_classification__pb2.ClassifyResponse.FromString,
+ options,
+ channel_credentials,
+ insecure,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ _registered_method=True)
+
+ @staticmethod
+ def Score(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_unary(
+ request,
+ target,
+ '/openengine.v1.OpenEngine/Score',
+ openengine_dot_v1_dot_scoring__pb2.ScoreRequest.SerializeToString,
+ openengine_dot_v1_dot_scoring__pb2.ScoreResponse.FromString,
+ options,
+ channel_credentials,
+ insecure,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ _registered_method=True)
+
+ @staticmethod
+ def GetEngineInfo(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_unary(
+ request,
+ target,
+ '/openengine.v1.OpenEngine/GetEngineInfo',
+ openengine_dot_v1_dot_engine__pb2.GetEngineInfoRequest.SerializeToString,
+ openengine_dot_v1_dot_engine__pb2.EngineInfo.FromString,
+ options,
+ channel_credentials,
+ insecure,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ _registered_method=True)
+
+ @staticmethod
+ def GetModelInfo(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_unary(
+ request,
+ target,
+ '/openengine.v1.OpenEngine/GetModelInfo',
+ openengine_dot_v1_dot_model__pb2.GetModelInfoRequest.SerializeToString,
+ openengine_dot_v1_dot_model__pb2.ModelInfo.FromString,
+ options,
+ channel_credentials,
+ insecure,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ _registered_method=True)
+
+ @staticmethod
+ def GetLoad(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_unary(
+ request,
+ target,
+ '/openengine.v1.OpenEngine/GetLoad',
+ openengine_dot_v1_dot_observability__pb2.GetLoadRequest.SerializeToString,
+ openengine_dot_v1_dot_observability__pb2.LoadInfo.FromString,
+ options,
+ channel_credentials,
+ insecure,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ _registered_method=True)
+
+ @staticmethod
+ def Health(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_unary(
+ request,
+ target,
+ '/openengine.v1.OpenEngine/Health',
+ openengine_dot_v1_dot_lifecycle__pb2.HealthRequest.SerializeToString,
+ openengine_dot_v1_dot_lifecycle__pb2.HealthResponse.FromString,
+ options,
+ channel_credentials,
+ insecure,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ _registered_method=True)
+
+ @staticmethod
+ def Abort(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_unary(
+ request,
+ target,
+ '/openengine.v1.OpenEngine/Abort',
+ openengine_dot_v1_dot_lifecycle__pb2.AbortRequest.SerializeToString,
+ openengine_dot_v1_dot_lifecycle__pb2.AbortResponse.FromString,
+ options,
+ channel_credentials,
+ insecure,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ _registered_method=True)
+
+ @staticmethod
+ def Drain(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_stream(
+ request,
+ target,
+ '/openengine.v1.OpenEngine/Drain',
+ openengine_dot_v1_dot_lifecycle__pb2.DrainRequest.SerializeToString,
+ openengine_dot_v1_dot_lifecycle__pb2.DrainResponse.FromString,
+ options,
+ channel_credentials,
+ insecure,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ _registered_method=True)
+
+ @staticmethod
+ def LoadLora(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_unary(
+ request,
+ target,
+ '/openengine.v1.OpenEngine/LoadLora',
+ openengine_dot_v1_dot_lora__pb2.LoadLoraRequest.SerializeToString,
+ openengine_dot_v1_dot_lora__pb2.LoadLoraResponse.FromString,
+ options,
+ channel_credentials,
+ insecure,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ _registered_method=True)
+
+ @staticmethod
+ def UnloadLora(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_unary(
+ request,
+ target,
+ '/openengine.v1.OpenEngine/UnloadLora',
+ openengine_dot_v1_dot_lora__pb2.UnloadLoraRequest.SerializeToString,
+ openengine_dot_v1_dot_lora__pb2.UnloadLoraResponse.FromString,
+ options,
+ channel_credentials,
+ insecure,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ _registered_method=True)
+
+ @staticmethod
+ def ListLoras(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_unary(
+ request,
+ target,
+ '/openengine.v1.OpenEngine/ListLoras',
+ openengine_dot_v1_dot_lora__pb2.ListLorasRequest.SerializeToString,
+ openengine_dot_v1_dot_lora__pb2.ListLorasResponse.FromString,
+ options,
+ channel_credentials,
+ insecure,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ _registered_method=True)
+
+ @staticmethod
+ def GetKvConnectorInfo(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_unary(
+ request,
+ target,
+ '/openengine.v1.OpenEngine/GetKvConnectorInfo',
+ openengine_dot_v1_dot_kv__pb2.GetKvConnectorInfoRequest.SerializeToString,
+ openengine_dot_v1_dot_kv__pb2.KvConnectorInfo.FromString,
+ options,
+ channel_credentials,
+ insecure,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ _registered_method=True)
+
+ @staticmethod
+ def GetKvEventSources(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_unary(
+ request,
+ target,
+ '/openengine.v1.OpenEngine/GetKvEventSources',
+ openengine_dot_v1_dot_kv__pb2.GetKvEventSourcesRequest.SerializeToString,
+ openengine_dot_v1_dot_kv__pb2.GetKvEventSourcesResponse.FromString,
+ options,
+ channel_credentials,
+ insecure,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ _registered_method=True)
+
+ @staticmethod
+ def SubscribeKvEvents(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_stream(
+ request,
+ target,
+ '/openengine.v1.OpenEngine/SubscribeKvEvents',
+ openengine_dot_v1_dot_kv__pb2.SubscribeKvEventsRequest.SerializeToString,
+ openengine_dot_v1_dot_kv__pb2.SubscribeKvEventsResponse.FromString,
+ options,
+ channel_credentials,
+ insecure,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ _registered_method=True)
+
+ @staticmethod
+ def SubscribeRuntimeEvents(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_stream(
+ request,
+ target,
+ '/openengine.v1.OpenEngine/SubscribeRuntimeEvents',
+ openengine_dot_v1_dot_observability__pb2.SubscribeRuntimeEventsRequest.SerializeToString,
+ openengine_dot_v1_dot_observability__pb2.SubscribeRuntimeEventsResponse.FromString,
+ options,
+ channel_credentials,
+ insecure,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ _registered_method=True)
diff --git a/packages/python/src/openengine/v1/scoring_pb2.py b/packages/python/src/openengine/v1/scoring_pb2.py
new file mode 100644
index 0000000..82477d0
--- /dev/null
+++ b/packages/python/src/openengine/v1/scoring_pb2.py
@@ -0,0 +1,52 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: openengine/v1/scoring.proto
+# Protobuf Python Version: 6.33.5
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
+from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 6,
+ 33,
+ 5,
+ '',
+ 'openengine/v1/scoring.proto'
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from openengine.v1 import input_pb2 as openengine_dot_v1_dot_input__pb2
+from openengine.v1 import tasks_pb2 as openengine_dot_v1_dot_tasks__pb2
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bopenengine/v1/scoring.proto\x12\ropenengine.v1\x1a\x19openengine/v1/input.proto\x1a\x19openengine/v1/tasks.proto\"\xdf\x06\n\x11ScoreCapabilities\x12\x16\n\tsupported\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x31\n\x0binput_types\x18\x02 \x03(\x0e\x32\x1c.openengine.v1.TaskInputType\x12;\n\rgranularities\x18\x03 \x03(\x0e\x32$.openengine.v1.TaskOutputGranularity\x12\x34\n\tsemantics\x18\x04 \x03(\x0e\x32!.openengine.v1.TaskValueSemantics\x12\x39\n\x0enormalizations\x18\x05 \x03(\x0e\x32!.openengine.v1.ScoreNormalization\x12)\n\x1csupports_label_token_scoring\x18\x06 \x01(\x08H\x01\x88\x01\x01\x12!\n\x14supports_instruction\x18\x07 \x01(\x08H\x02\x88\x01\x01\x12\x17\n\nmax_groups\x18\x08 \x01(\rH\x03\x88\x01\x01\x12%\n\x18max_candidates_per_group\x18\t \x01(\rH\x04\x88\x01\x01\x12,\n\x1fmax_output_values_per_candidate\x18\n \x01(\x04H\x05\x88\x01\x01\x12\x1e\n\x11supports_priority\x18\x0b \x01(\x08H\x06\x88\x01\x01\x12\x1a\n\rsupports_lora\x18\x0c \x01(\x08H\x07\x88\x01\x01\x12\x1d\n\x10higher_is_better\x18\r \x01(\x08H\x08\x88\x01\x01\x12+\n\nmodalities\x18\x0e \x03(\x0e\x32\x17.openengine.v1.Modality\x12 \n\x13max_label_token_ids\x18\x0f \x01(\rH\t\x88\x01\x01\x42\x0c\n\n_supportedB\x1f\n\x1d_supports_label_token_scoringB\x17\n\x15_supports_instructionB\r\n\x0b_max_groupsB\x1b\n\x19_max_candidates_per_groupB\"\n _max_output_values_per_candidateB\x14\n\x12_supports_priorityB\x10\n\x0e_supports_loraB\x13\n\x11_higher_is_betterB\x16\n\x14_max_label_token_ids\"\x9b\x01\n\x0cScoreRequest\x12\x32\n\x07\x63ontext\x18\x01 \x01(\x0b\x32!.openengine.v1.TaskRequestContext\x12)\n\x06groups\x18\x02 \x03(\x0b\x32\x19.openengine.v1.ScoreGroup\x12,\n\x07options\x18\x03 \x01(\x0b\x32\x1b.openengine.v1.ScoreOptions\"u\n\nScoreGroup\x12\x10\n\x08group_id\x18\x01 \x01(\t\x12\'\n\x05query\x18\x02 \x01(\x0b\x32\x18.openengine.v1.TaskInput\x12,\n\ncandidates\x18\x03 \x03(\x0b\x32\x18.openengine.v1.TaskInput\"\x9d\x02\n\x0cScoreOptions\x12>\n\x0bgranularity\x18\x01 \x01(\x0e\x32$.openengine.v1.TaskOutputGranularityH\x00\x88\x01\x01\x12@\n\x10output_semantics\x18\x02 \x01(\x0e\x32!.openengine.v1.TaskValueSemanticsH\x01\x88\x01\x01\x12\x38\n\rnormalization\x18\x03 \x01(\x0e\x32!.openengine.v1.ScoreNormalization\x12\x17\n\x0flabel_token_ids\x18\x04 \x03(\r\x12\x13\n\x0binstruction\x18\x05 \x01(\tB\x0e\n\x0c_granularityB\x13\n\x11_output_semantics\"\xf5\x02\n\rScoreResponse\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12/\n\x06groups\x18\x02 \x03(\x0b\x32\x1f.openengine.v1.ScoreGroupOutput\x12\x39\n\x0bgranularity\x18\x03 \x01(\x0e\x32$.openengine.v1.TaskOutputGranularity\x12\x34\n\tsemantics\x18\x04 \x01(\x0e\x32!.openengine.v1.TaskValueSemantics\x12\x1d\n\x10higher_is_better\x18\x05 \x01(\x08H\x00\x88\x01\x01\x12\x38\n\rnormalization\x18\x06 \x01(\x0e\x32!.openengine.v1.ScoreNormalization\x12\x17\n\x0flabel_token_ids\x18\x07 \x03(\r\x12\'\n\x05usage\x18\x08 \x01(\x0b\x32\x18.openengine.v1.TaskUsageB\x13\n\x11_higher_is_better\"\x87\x01\n\x10ScoreGroupOutput\x12\x10\n\x08group_id\x18\x01 \x01(\t\x12\x18\n\x0bgroup_index\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x37\n\ncandidates\x18\x03 \x03(\x0b\x32#.openengine.v1.ScoreCandidateOutputB\x0e\n\x0c_group_index\"\xa2\x01\n\x14ScoreCandidateOutput\x12\x14\n\x0c\x63\x61ndidate_id\x18\x01 \x01(\t\x12\x1c\n\x0f\x63\x61ndidate_index\x18\x02 \x01(\rH\x00\x88\x01\x01\x12/\n\x06scores\x18\x03 \x01(\x0b\x32\x1f.openengine.v1.DenseFloatTensor\x12\x11\n\ttoken_ids\x18\x04 \x03(\rB\x12\n\x10_candidate_index*x\n\x12ScoreNormalization\x12#\n\x1fSCORE_NORMALIZATION_UNSPECIFIED\x10\x00\x12\x1c\n\x18SCORE_NORMALIZATION_NONE\x10\x01\x12\x1f\n\x1bSCORE_NORMALIZATION_SOFTMAX\x10\x02\x62\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'openengine.v1.scoring_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ DESCRIPTOR._loaded_options = None
+ _globals['_SCORENORMALIZATION']._serialized_start=2210
+ _globals['_SCORENORMALIZATION']._serialized_end=2330
+ _globals['_SCORECAPABILITIES']._serialized_start=101
+ _globals['_SCORECAPABILITIES']._serialized_end=964
+ _globals['_SCOREREQUEST']._serialized_start=967
+ _globals['_SCOREREQUEST']._serialized_end=1122
+ _globals['_SCOREGROUP']._serialized_start=1124
+ _globals['_SCOREGROUP']._serialized_end=1241
+ _globals['_SCOREOPTIONS']._serialized_start=1244
+ _globals['_SCOREOPTIONS']._serialized_end=1529
+ _globals['_SCORERESPONSE']._serialized_start=1532
+ _globals['_SCORERESPONSE']._serialized_end=1905
+ _globals['_SCOREGROUPOUTPUT']._serialized_start=1908
+ _globals['_SCOREGROUPOUTPUT']._serialized_end=2043
+ _globals['_SCORECANDIDATEOUTPUT']._serialized_start=2046
+ _globals['_SCORECANDIDATEOUTPUT']._serialized_end=2208
+# @@protoc_insertion_point(module_scope)
diff --git a/packages/python/src/openengine/v1/scoring_pb2.pyi b/packages/python/src/openengine/v1/scoring_pb2.pyi
new file mode 100644
index 0000000..5ac6c4c
--- /dev/null
+++ b/packages/python/src/openengine/v1/scoring_pb2.pyi
@@ -0,0 +1,129 @@
+from openengine.v1 import input_pb2 as _input_pb2
+from openengine.v1 import tasks_pb2 as _tasks_pb2
+from google.protobuf.internal import containers as _containers
+from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from collections.abc import Iterable as _Iterable, Mapping as _Mapping
+from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
+
+DESCRIPTOR: _descriptor.FileDescriptor
+
+class ScoreNormalization(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ SCORE_NORMALIZATION_UNSPECIFIED: _ClassVar[ScoreNormalization]
+ SCORE_NORMALIZATION_NONE: _ClassVar[ScoreNormalization]
+ SCORE_NORMALIZATION_SOFTMAX: _ClassVar[ScoreNormalization]
+SCORE_NORMALIZATION_UNSPECIFIED: ScoreNormalization
+SCORE_NORMALIZATION_NONE: ScoreNormalization
+SCORE_NORMALIZATION_SOFTMAX: ScoreNormalization
+
+class ScoreCapabilities(_message.Message):
+ __slots__ = ("supported", "input_types", "granularities", "semantics", "normalizations", "supports_label_token_scoring", "supports_instruction", "max_groups", "max_candidates_per_group", "max_output_values_per_candidate", "supports_priority", "supports_lora", "higher_is_better", "modalities", "max_label_token_ids")
+ SUPPORTED_FIELD_NUMBER: _ClassVar[int]
+ INPUT_TYPES_FIELD_NUMBER: _ClassVar[int]
+ GRANULARITIES_FIELD_NUMBER: _ClassVar[int]
+ SEMANTICS_FIELD_NUMBER: _ClassVar[int]
+ NORMALIZATIONS_FIELD_NUMBER: _ClassVar[int]
+ SUPPORTS_LABEL_TOKEN_SCORING_FIELD_NUMBER: _ClassVar[int]
+ SUPPORTS_INSTRUCTION_FIELD_NUMBER: _ClassVar[int]
+ MAX_GROUPS_FIELD_NUMBER: _ClassVar[int]
+ MAX_CANDIDATES_PER_GROUP_FIELD_NUMBER: _ClassVar[int]
+ MAX_OUTPUT_VALUES_PER_CANDIDATE_FIELD_NUMBER: _ClassVar[int]
+ SUPPORTS_PRIORITY_FIELD_NUMBER: _ClassVar[int]
+ SUPPORTS_LORA_FIELD_NUMBER: _ClassVar[int]
+ HIGHER_IS_BETTER_FIELD_NUMBER: _ClassVar[int]
+ MODALITIES_FIELD_NUMBER: _ClassVar[int]
+ MAX_LABEL_TOKEN_IDS_FIELD_NUMBER: _ClassVar[int]
+ supported: bool
+ input_types: _containers.RepeatedScalarFieldContainer[_input_pb2.TaskInputType]
+ granularities: _containers.RepeatedScalarFieldContainer[_tasks_pb2.TaskOutputGranularity]
+ semantics: _containers.RepeatedScalarFieldContainer[_tasks_pb2.TaskValueSemantics]
+ normalizations: _containers.RepeatedScalarFieldContainer[ScoreNormalization]
+ supports_label_token_scoring: bool
+ supports_instruction: bool
+ max_groups: int
+ max_candidates_per_group: int
+ max_output_values_per_candidate: int
+ supports_priority: bool
+ supports_lora: bool
+ higher_is_better: bool
+ modalities: _containers.RepeatedScalarFieldContainer[_input_pb2.Modality]
+ max_label_token_ids: int
+ def __init__(self, supported: _Optional[bool] = ..., input_types: _Optional[_Iterable[_Union[_input_pb2.TaskInputType, str]]] = ..., granularities: _Optional[_Iterable[_Union[_tasks_pb2.TaskOutputGranularity, str]]] = ..., semantics: _Optional[_Iterable[_Union[_tasks_pb2.TaskValueSemantics, str]]] = ..., normalizations: _Optional[_Iterable[_Union[ScoreNormalization, str]]] = ..., supports_label_token_scoring: _Optional[bool] = ..., supports_instruction: _Optional[bool] = ..., max_groups: _Optional[int] = ..., max_candidates_per_group: _Optional[int] = ..., max_output_values_per_candidate: _Optional[int] = ..., supports_priority: _Optional[bool] = ..., supports_lora: _Optional[bool] = ..., higher_is_better: _Optional[bool] = ..., modalities: _Optional[_Iterable[_Union[_input_pb2.Modality, str]]] = ..., max_label_token_ids: _Optional[int] = ...) -> None: ...
+
+class ScoreRequest(_message.Message):
+ __slots__ = ("context", "groups", "options")
+ CONTEXT_FIELD_NUMBER: _ClassVar[int]
+ GROUPS_FIELD_NUMBER: _ClassVar[int]
+ OPTIONS_FIELD_NUMBER: _ClassVar[int]
+ context: _tasks_pb2.TaskRequestContext
+ groups: _containers.RepeatedCompositeFieldContainer[ScoreGroup]
+ options: ScoreOptions
+ def __init__(self, context: _Optional[_Union[_tasks_pb2.TaskRequestContext, _Mapping]] = ..., groups: _Optional[_Iterable[_Union[ScoreGroup, _Mapping]]] = ..., options: _Optional[_Union[ScoreOptions, _Mapping]] = ...) -> None: ...
+
+class ScoreGroup(_message.Message):
+ __slots__ = ("group_id", "query", "candidates")
+ GROUP_ID_FIELD_NUMBER: _ClassVar[int]
+ QUERY_FIELD_NUMBER: _ClassVar[int]
+ CANDIDATES_FIELD_NUMBER: _ClassVar[int]
+ group_id: str
+ query: _input_pb2.TaskInput
+ candidates: _containers.RepeatedCompositeFieldContainer[_input_pb2.TaskInput]
+ def __init__(self, group_id: _Optional[str] = ..., query: _Optional[_Union[_input_pb2.TaskInput, _Mapping]] = ..., candidates: _Optional[_Iterable[_Union[_input_pb2.TaskInput, _Mapping]]] = ...) -> None: ...
+
+class ScoreOptions(_message.Message):
+ __slots__ = ("granularity", "output_semantics", "normalization", "label_token_ids", "instruction")
+ GRANULARITY_FIELD_NUMBER: _ClassVar[int]
+ OUTPUT_SEMANTICS_FIELD_NUMBER: _ClassVar[int]
+ NORMALIZATION_FIELD_NUMBER: _ClassVar[int]
+ LABEL_TOKEN_IDS_FIELD_NUMBER: _ClassVar[int]
+ INSTRUCTION_FIELD_NUMBER: _ClassVar[int]
+ granularity: _tasks_pb2.TaskOutputGranularity
+ output_semantics: _tasks_pb2.TaskValueSemantics
+ normalization: ScoreNormalization
+ label_token_ids: _containers.RepeatedScalarFieldContainer[int]
+ instruction: str
+ def __init__(self, granularity: _Optional[_Union[_tasks_pb2.TaskOutputGranularity, str]] = ..., output_semantics: _Optional[_Union[_tasks_pb2.TaskValueSemantics, str]] = ..., normalization: _Optional[_Union[ScoreNormalization, str]] = ..., label_token_ids: _Optional[_Iterable[int]] = ..., instruction: _Optional[str] = ...) -> None: ...
+
+class ScoreResponse(_message.Message):
+ __slots__ = ("request_id", "groups", "granularity", "semantics", "higher_is_better", "normalization", "label_token_ids", "usage")
+ REQUEST_ID_FIELD_NUMBER: _ClassVar[int]
+ GROUPS_FIELD_NUMBER: _ClassVar[int]
+ GRANULARITY_FIELD_NUMBER: _ClassVar[int]
+ SEMANTICS_FIELD_NUMBER: _ClassVar[int]
+ HIGHER_IS_BETTER_FIELD_NUMBER: _ClassVar[int]
+ NORMALIZATION_FIELD_NUMBER: _ClassVar[int]
+ LABEL_TOKEN_IDS_FIELD_NUMBER: _ClassVar[int]
+ USAGE_FIELD_NUMBER: _ClassVar[int]
+ request_id: str
+ groups: _containers.RepeatedCompositeFieldContainer[ScoreGroupOutput]
+ granularity: _tasks_pb2.TaskOutputGranularity
+ semantics: _tasks_pb2.TaskValueSemantics
+ higher_is_better: bool
+ normalization: ScoreNormalization
+ label_token_ids: _containers.RepeatedScalarFieldContainer[int]
+ usage: _tasks_pb2.TaskUsage
+ def __init__(self, request_id: _Optional[str] = ..., groups: _Optional[_Iterable[_Union[ScoreGroupOutput, _Mapping]]] = ..., granularity: _Optional[_Union[_tasks_pb2.TaskOutputGranularity, str]] = ..., semantics: _Optional[_Union[_tasks_pb2.TaskValueSemantics, str]] = ..., higher_is_better: _Optional[bool] = ..., normalization: _Optional[_Union[ScoreNormalization, str]] = ..., label_token_ids: _Optional[_Iterable[int]] = ..., usage: _Optional[_Union[_tasks_pb2.TaskUsage, _Mapping]] = ...) -> None: ...
+
+class ScoreGroupOutput(_message.Message):
+ __slots__ = ("group_id", "group_index", "candidates")
+ GROUP_ID_FIELD_NUMBER: _ClassVar[int]
+ GROUP_INDEX_FIELD_NUMBER: _ClassVar[int]
+ CANDIDATES_FIELD_NUMBER: _ClassVar[int]
+ group_id: str
+ group_index: int
+ candidates: _containers.RepeatedCompositeFieldContainer[ScoreCandidateOutput]
+ def __init__(self, group_id: _Optional[str] = ..., group_index: _Optional[int] = ..., candidates: _Optional[_Iterable[_Union[ScoreCandidateOutput, _Mapping]]] = ...) -> None: ...
+
+class ScoreCandidateOutput(_message.Message):
+ __slots__ = ("candidate_id", "candidate_index", "scores", "token_ids")
+ CANDIDATE_ID_FIELD_NUMBER: _ClassVar[int]
+ CANDIDATE_INDEX_FIELD_NUMBER: _ClassVar[int]
+ SCORES_FIELD_NUMBER: _ClassVar[int]
+ TOKEN_IDS_FIELD_NUMBER: _ClassVar[int]
+ candidate_id: str
+ candidate_index: int
+ scores: _tasks_pb2.DenseFloatTensor
+ token_ids: _containers.RepeatedScalarFieldContainer[int]
+ def __init__(self, candidate_id: _Optional[str] = ..., candidate_index: _Optional[int] = ..., scores: _Optional[_Union[_tasks_pb2.DenseFloatTensor, _Mapping]] = ..., token_ids: _Optional[_Iterable[int]] = ...) -> None: ...
diff --git a/packages/python/src/openengine/v1/tasks_pb2.py b/packages/python/src/openengine/v1/tasks_pb2.py
new file mode 100644
index 0000000..2fcb5ad
--- /dev/null
+++ b/packages/python/src/openengine/v1/tasks_pb2.py
@@ -0,0 +1,48 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: openengine/v1/tasks.proto
+# Protobuf Python Version: 6.33.5
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
+from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 6,
+ 33,
+ 5,
+ '',
+ 'openengine/v1/tasks.proto'
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19openengine/v1/tasks.proto\x12\ropenengine.v1\"\xe2\x01\n\x12TaskRequestContext\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\r\n\x05model\x18\x02 \x01(\t\x12\x11\n\tlora_name\x18\x03 \x01(\t\x12\x15\n\x08priority\x18\x04 \x01(\x05H\x00\x88\x01\x01\x12\x41\n\x08metadata\x18\x05 \x03(\x0b\x32/.openengine.v1.TaskRequestContext.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0b\n\t_priority\"1\n\x10\x44\x65nseFloatTensor\x12\r\n\x05shape\x18\x01 \x03(\x04\x12\x0e\n\x06values\x18\x02 \x03(\x02\"[\n\tTaskUsage\x12\x14\n\x0cinput_tokens\x18\x01 \x01(\x04\x12 \n\x13\x63\x61\x63hed_input_tokens\x18\x02 \x01(\x04H\x00\x88\x01\x01\x42\x16\n\x14_cached_input_tokens*\x89\x01\n\x15TaskOutputGranularity\x12\'\n#TASK_OUTPUT_GRANULARITY_UNSPECIFIED\x10\x00\x12$\n TASK_OUTPUT_GRANULARITY_SEQUENCE\x10\x01\x12!\n\x1dTASK_OUTPUT_GRANULARITY_TOKEN\x10\x02*\xc1\x02\n\x12TaskValueSemantics\x12$\n TASK_VALUE_SEMANTICS_UNSPECIFIED\x10\x00\x12\x1f\n\x1bTASK_VALUE_SEMANTICS_LOGITS\x10\x01\x12&\n\"TASK_VALUE_SEMANTICS_PROBABILITIES\x10\x02\x12*\n&TASK_VALUE_SEMANTICS_LOG_PROBABILITIES\x10\x03\x12#\n\x1fTASK_VALUE_SEMANTICS_SIMILARITY\x10\x04\x12\"\n\x1eTASK_VALUE_SEMANTICS_RELEVANCE\x10\x05\x12\x1f\n\x1bTASK_VALUE_SEMANTICS_REWARD\x10\x06\x12&\n\"TASK_VALUE_SEMANTICS_MODEL_DEFINED\x10\x07\x62\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'openengine.v1.tasks_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ DESCRIPTOR._loaded_options = None
+ _globals['_TASKREQUESTCONTEXT_METADATAENTRY']._loaded_options = None
+ _globals['_TASKREQUESTCONTEXT_METADATAENTRY']._serialized_options = b'8\001'
+ _globals['_TASKOUTPUTGRANULARITY']._serialized_start=418
+ _globals['_TASKOUTPUTGRANULARITY']._serialized_end=555
+ _globals['_TASKVALUESEMANTICS']._serialized_start=558
+ _globals['_TASKVALUESEMANTICS']._serialized_end=879
+ _globals['_TASKREQUESTCONTEXT']._serialized_start=45
+ _globals['_TASKREQUESTCONTEXT']._serialized_end=271
+ _globals['_TASKREQUESTCONTEXT_METADATAENTRY']._serialized_start=211
+ _globals['_TASKREQUESTCONTEXT_METADATAENTRY']._serialized_end=258
+ _globals['_DENSEFLOATTENSOR']._serialized_start=273
+ _globals['_DENSEFLOATTENSOR']._serialized_end=322
+ _globals['_TASKUSAGE']._serialized_start=324
+ _globals['_TASKUSAGE']._serialized_end=415
+# @@protoc_insertion_point(module_scope)
diff --git a/packages/python/src/openengine/v1/tasks_pb2.pyi b/packages/python/src/openengine/v1/tasks_pb2.pyi
new file mode 100644
index 0000000..457b41e
--- /dev/null
+++ b/packages/python/src/openengine/v1/tasks_pb2.pyi
@@ -0,0 +1,73 @@
+from google.protobuf.internal import containers as _containers
+from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from collections.abc import Iterable as _Iterable, Mapping as _Mapping
+from typing import ClassVar as _ClassVar, Optional as _Optional
+
+DESCRIPTOR: _descriptor.FileDescriptor
+
+class TaskOutputGranularity(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ TASK_OUTPUT_GRANULARITY_UNSPECIFIED: _ClassVar[TaskOutputGranularity]
+ TASK_OUTPUT_GRANULARITY_SEQUENCE: _ClassVar[TaskOutputGranularity]
+ TASK_OUTPUT_GRANULARITY_TOKEN: _ClassVar[TaskOutputGranularity]
+
+class TaskValueSemantics(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ TASK_VALUE_SEMANTICS_UNSPECIFIED: _ClassVar[TaskValueSemantics]
+ TASK_VALUE_SEMANTICS_LOGITS: _ClassVar[TaskValueSemantics]
+ TASK_VALUE_SEMANTICS_PROBABILITIES: _ClassVar[TaskValueSemantics]
+ TASK_VALUE_SEMANTICS_LOG_PROBABILITIES: _ClassVar[TaskValueSemantics]
+ TASK_VALUE_SEMANTICS_SIMILARITY: _ClassVar[TaskValueSemantics]
+ TASK_VALUE_SEMANTICS_RELEVANCE: _ClassVar[TaskValueSemantics]
+ TASK_VALUE_SEMANTICS_REWARD: _ClassVar[TaskValueSemantics]
+ TASK_VALUE_SEMANTICS_MODEL_DEFINED: _ClassVar[TaskValueSemantics]
+TASK_OUTPUT_GRANULARITY_UNSPECIFIED: TaskOutputGranularity
+TASK_OUTPUT_GRANULARITY_SEQUENCE: TaskOutputGranularity
+TASK_OUTPUT_GRANULARITY_TOKEN: TaskOutputGranularity
+TASK_VALUE_SEMANTICS_UNSPECIFIED: TaskValueSemantics
+TASK_VALUE_SEMANTICS_LOGITS: TaskValueSemantics
+TASK_VALUE_SEMANTICS_PROBABILITIES: TaskValueSemantics
+TASK_VALUE_SEMANTICS_LOG_PROBABILITIES: TaskValueSemantics
+TASK_VALUE_SEMANTICS_SIMILARITY: TaskValueSemantics
+TASK_VALUE_SEMANTICS_RELEVANCE: TaskValueSemantics
+TASK_VALUE_SEMANTICS_REWARD: TaskValueSemantics
+TASK_VALUE_SEMANTICS_MODEL_DEFINED: TaskValueSemantics
+
+class TaskRequestContext(_message.Message):
+ __slots__ = ("request_id", "model", "lora_name", "priority", "metadata")
+ class MetadataEntry(_message.Message):
+ __slots__ = ("key", "value")
+ KEY_FIELD_NUMBER: _ClassVar[int]
+ VALUE_FIELD_NUMBER: _ClassVar[int]
+ key: str
+ value: str
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
+ REQUEST_ID_FIELD_NUMBER: _ClassVar[int]
+ MODEL_FIELD_NUMBER: _ClassVar[int]
+ LORA_NAME_FIELD_NUMBER: _ClassVar[int]
+ PRIORITY_FIELD_NUMBER: _ClassVar[int]
+ METADATA_FIELD_NUMBER: _ClassVar[int]
+ request_id: str
+ model: str
+ lora_name: str
+ priority: int
+ metadata: _containers.ScalarMap[str, str]
+ def __init__(self, request_id: _Optional[str] = ..., model: _Optional[str] = ..., lora_name: _Optional[str] = ..., priority: _Optional[int] = ..., metadata: _Optional[_Mapping[str, str]] = ...) -> None: ...
+
+class DenseFloatTensor(_message.Message):
+ __slots__ = ("shape", "values")
+ SHAPE_FIELD_NUMBER: _ClassVar[int]
+ VALUES_FIELD_NUMBER: _ClassVar[int]
+ shape: _containers.RepeatedScalarFieldContainer[int]
+ values: _containers.RepeatedScalarFieldContainer[float]
+ def __init__(self, shape: _Optional[_Iterable[int]] = ..., values: _Optional[_Iterable[float]] = ...) -> None: ...
+
+class TaskUsage(_message.Message):
+ __slots__ = ("input_tokens", "cached_input_tokens")
+ INPUT_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ CACHED_INPUT_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ input_tokens: int
+ cached_input_tokens: int
+ def __init__(self, input_tokens: _Optional[int] = ..., cached_input_tokens: _Optional[int] = ...) -> None: ...
diff --git a/packages/python/tests/test_bindings.py b/packages/python/tests/test_bindings.py
new file mode 100644
index 0000000..1fa0e03
--- /dev/null
+++ b/packages/python/tests/test_bindings.py
@@ -0,0 +1,117 @@
+import unittest
+
+import grpc
+
+from openengine import (
+ MINIMUM_CLIENT_REVISION,
+ SCHEMA_RELEASE,
+ SCHEMA_REVISION,
+)
+from openengine.v1.generation_pb2 import GenerateRequest
+from openengine.v1.input_pb2 import (
+ MEDIA_SOURCE_TYPE_DATA_URI,
+ MEDIA_SOURCE_TYPE_RAW_BYTES,
+ MEDIA_SOURCE_TYPE_URL,
+ MODALITY_AUDIO,
+ MODALITY_IMAGE,
+ MODALITY_VIDEO,
+)
+from openengine.v1.model_pb2 import ModelInfo, MultimodalCapabilities
+from openengine.v1.openengine_pb2_grpc import OpenEngineStub
+
+
+class BindingsTest(unittest.TestCase):
+ def test_request_round_trip_preserves_optional_zero(self) -> None:
+ request = GenerateRequest(
+ request_id="python-smoke",
+ model="test-model",
+ prompt="Hello",
+ priority=0,
+ )
+
+ decoded = GenerateRequest.FromString(request.SerializeToString())
+
+ self.assertEqual(decoded.request_id, "python-smoke")
+ self.assertEqual(decoded.WhichOneof("input"), "prompt")
+ self.assertTrue(decoded.HasField("priority"))
+ self.assertEqual(decoded.priority, 0)
+
+ def test_multimodal_contract_round_trip(self) -> None:
+ request = GenerateRequest(
+ request_id="multimodal",
+ model="test-model",
+ prompt="