Skip to content

fix(offload): preserve namespaced model ids#240

Open
YOMXXX wants to merge 1 commit into
TencentCloud:mainfrom
YOMXXX:fix/offload-namespaced-model-id
Open

fix(offload): preserve namespaced model ids#240
YOMXXX wants to merge 1 commit into
TencentCloud:mainfrom
YOMXXX:fix/offload-namespaced-model-id

Conversation

@YOMXXX

@YOMXXX YOMXXX commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fixes [Feature] 希望offload modelId兼容 类似 siliconflow/deepseek-ai/DeepSeek-V4-Flash 这样的id #24 by parsing provider/model refs at the first / only, so model ids like deepseek-ai/DeepSeek-V4-Flash are preserved.
  • Reuses the same parser for offload local LLM setup and context-window lookup.
  • Moves the existing clean-context model-ref helpers into a lightweight shared utility and keeps the old exports for compatibility.
  • Adds a regression test that exercises registerOffload() and verifies the initialized local LLM model id is not truncated.

This is a fresh, mergeable replacement for the older conflicting PR #33.

Verification

  • npx vitest run src/offload/model-ref.test.ts
  • npm test (4 files, 48 tests)
  • npm run build
  • git diff --check

Signed-off-by: 李冠辰 <liguanchen@xiaomi.com>
@YOMXXX YOMXXX force-pushed the fix/offload-namespaced-model-id branch from 657497b to 1f7c066 Compare June 24, 2026 07:35
@Maxwell-Code07

Copy link
Copy Markdown
Collaborator

Awesome work! 13 fixes in one batch covering Gateway hardening, embedding compatibility, Hermes memory injection, offload stability, and pipeline optimization — a very productive cleanup session 👏

We'll review and merge them one by one 🚀

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.

[Feature] 希望offload modelId兼容 类似 siliconflow/deepseek-ai/DeepSeek-V4-Flash 这样的id

2 participants