Skip to content

Add optional Telys connector example - #372

Open
0xamlab wants to merge 4 commits into
runpod-workers:mainfrom
0xamlab:feature/telys-connector-example
Open

0xamlab wants to merge 4 commits into
runpod-workers:mainfrom
0xamlab:feature/telys-connector-example

Conversation

@0xamlab

@0xamlab 0xamlab commented Nov 8, 2026 •

Copy link
Copy Markdown

A40 acceptance of the earlier connector pin exposed an exact-chunk collision: four chains sharing one start and length could not all load. This PR adds a separate, opt-in Telys example, pinned to connector v0.1.6 at 2f0c20ccec56afcb613973e296281f51e23cbe26, which probes the exact colliding chunk key instead of accepting only the advertised start+length candidate.

The derived image stays on runpod/worker-v1-vllm:v2.30.3 (vLLM 0.32.0), installs Telys SDK 0.1.15, and leaves the stock worker image unchanged. With TELYS_ENABLED=true, its entrypoint supplies and validates TelysKVConnector, disables unsupported async KV loading, rejects connector overrides in VLLM_EXTRA_ARGS, and unsets Telys credentials before starting the worker. With a volume mounted at /runpod-volume, the minimal enabled configuration is:

TELYS_ENABLED=true
TELYS_HOME=/runpod-volume/telys-home
TELYS_PATH=/runpod-volume/telys-data
MODEL_NAME=Qwen/Qwen2.5-7B-Instruct
ENABLE_PREFIX_CACHING=false
VLLM_ENABLE_V1_MULTIPROCESSING=0

Only the Telys example, its note in docs/configuration.md, and its CPU tests are added. The default path still executes /src/main.py with non-Telys KV_TRANSFER_CONFIG passthrough intact; no model, credentials, or signed Telys runtime is baked into the derived image.

On A40 with Qwen2.5-7B at 49bfa65, the previously failing four-chain case loaded 16,576 external tokens and matched stock outputs.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T15:51:03.350680Z a31e86a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a31e86a655

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +17 to +18
if [[ "${KV_TRANSFER_CONFIG:-}" == *"TelysKVConnector"* || "${KV_TRANSFER_CONFIG:-}" == *"telys_vllm.connector"* ]]; then
fail "the Telys connector requires TELYS_ENABLED=true"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Validate connector overrides in passthrough arguments

When an endpoint supplies --kv-transfer-config through the supported VLLM_EXTRA_ARGS setting, this guard never examines it: with TELYS_ENABLED unset or false, a Telys configuration reaches the stock entrypoint without being rejected. In enabled mode, the same setting can replace the validated Telys configuration with another connector, because build_vllm_args() appends raw arguments last (docs/configuration.md:52-53 explicitly documents them as “able to override anything above”). This bypasses the wrapper’s opt-in and exclusive-connector checks. Validate the effective connector configuration, or reject connector overrides in passthrough arguments, before either startup branch proceeds.

Useful? React with 👍 / 👎.

@0xamlab

0xamlab commented Nov 8, 2026

Copy link
Copy Markdown
Author

Addressed the passthrough connector review finding. The Telys entrypoint now rejects --kv-transfer-config in VLLM_EXTRA_ARGS before either startup branch, covering separate and =value forms with compact or quoted JSON. Other extra arguments remain unchanged. Added regressions for disabled and enabled modes and updated the example README.

Tests: python -m pytest tests -v (218 passed); bash -n examples/telys/entrypoint.sh; shellcheck examples/telys/entrypoint.sh; python scripts/check_vllm_flags.py check --snapshot .cache/vllm_serve_flags.json.

@0xamlab

0xamlab commented Nov 12, 2026

Copy link
Copy Markdown
Author

Updated the example to connector v0.1.5 at 3505b767cc9d6f9cfd7751fa3ad9946b92d54bb8 and SDK 0.1.15, and documented the public PyPI/GHCR artifacts. The entrypoint is unchanged.

Validation:

  • python3 -m pytest tests/test_telys_example.py -v — 34 passed.
  • python3 -m pytest tests -v — 218 passed.
  • bash -n examples/telys/entrypoint.sh; shellcheck examples/telys/entrypoint.sh; python3 scripts/check_vllm_flags.py check --snapshot .cache/vllm_serve_flags.json; git diff --check — passed.
  • docker buildx build --platform=linux/amd64 --load --file examples/telys/Dockerfile --build-arg TELYS_VLLM_COMMIT=3505b767cc9d6f9cfd7751fa3ad9946b92d54bb8 --tag worker-vllm-telys-example:0.1.5 . — passed.
  • docker run --rm --platform linux/amd64 --entrypoint python3 worker-vllm-telys-example:0.1.5 -c 'from importlib.metadata import version as v; from telys_vllm.connector import TelysKVConnector; assert v("vllm") == "0.32.0"; assert v("telys") == "0.1.15"; assert v("telys-vllm") == "0.1.5"' — passed.

Default-off stock behavior and connector-override rejection remain covered. Real GPU/model acceptance is still pending.

@0xamlab

0xamlab commented Nov 12, 2026

Copy link
Copy Markdown
Author

A40 acceptance of ca87e653a85430df41af342ac33ce73b99236711 reproduced an exact-chunk collision: four chains sharing one start and length could not all load. v0.1.6 is required because it probes the exact colliding chunk key instead of accepting only the advertised start+length candidate. This update pins 2f0c20ccec56afcb613973e296281f51e23cbe26, keeps SDK 0.1.15, and leaves the entrypoint unchanged.

Validation:

  • python3 -m pytest tests/test_telys_example.py -v — 34 passed.
  • python3 -m pytest tests -v — 218 passed.
  • bash -n examples/telys/entrypoint.sh; shellcheck examples/telys/entrypoint.sh; python3 scripts/check_vllm_flags.py check --snapshot .cache/vllm_serve_flags.json; git diff --check — passed.
  • docker buildx build --platform=linux/amd64 --load --file examples/telys/Dockerfile --build-arg TELYS_VLLM_COMMIT=2f0c20ccec56afcb613973e296281f51e23cbe26 --tag worker-vllm-telys-example:0.1.6 . — passed.
  • Container imports, versions, and pip direct_url.json commit assertion — passed for vLLM 0.32.0, SDK 0.1.15, connector 0.1.6 at 2f0c20ccec56afcb613973e296281f51e23cbe26.

Default-off behavior and passthrough rejection remain covered. Please rerun the same four-chain A40 collision case with head 49bfa65d76b6611ed845b48a46317c79633f93bc.

@0xamlab

0xamlab commented Nov 12, 2026

Copy link
Copy Markdown
Author

Real A40 acceptance passed on 49bfa65 with Qwen2.5-7B: the four-chain case now loads 16,576 external tokens (16,384 shared prefix + 192 suffix), with all 1,044 blocks verified and all outputs matching stock. Warm batch wall was 4.167s versus 4.568s recompute. Default-off startup and all 12 override rejections passed. Cold drain, digest/tamper handling, delete/reset, and credential sanitization passed. Test pod and volume were deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant