Repository navigation
[PR] fix(hermes-plugin): report endpoint model output limits - #3934
Merged
ranxianglei merged 1 commit intoOct 20, 2026
Merged
ranxianglei merged 1 commit into
ranxianglei merged 1 commit into
Conversation
Contributor
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.654-master.1cec7ad # this exact build
npm install -g billion-context@master # always the newest merged build
|
This was referenced Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hermes 未设置显式
max_tokens时,原生插件只上报上下文窗口,没有读取端点声明的模型输出上限。group/...等自定义模型无法命中 bili registry 兜底,导致已知 500K 窗口仍按 500K 输入预算计算,没有执行现有输出预留。本补丁通过 Hermes 已有的
fetch_endpoint_model_metadata(base_url),按精确模型名读取max_completion_tokens,在缺少显式预算时通过现有 header 和 runtime-info 上报。复用窗口查询的非阻塞 TTL memo,按模型、端点、限制类型隔离缓存;不新增配置,不改变 headroom 策略。验证:
npm run typecheck通过。npm run build通过;仍有既有 pi-host-stub 的CONFIG_DIR_NAME导出警告。node --import tsx --test --test-name-pattern='python plugin runtime' tests/hermes-native.test.ts:21 项通过;其中两个既有窗口用例因所选 Python 缺少 YAML 库跳过内部正向断言。git diff --check通过。依赖与验证边界:当前 Hermes
_extract_pricing会被 Magpiemodalities.input列表触发 TypeError,导致 accessor 返回空元数据。该问题已有独立修复 PR:NousResearch/hermes-agent#140849、NousResearch/hermes-agent#137990。本 PR 修复插件未消费宿主输出元数据的缺口;尚未在修复后的真实 Hermes 链路验证,不能单独解决当前机器的完整问题。500K → 375K 是 bili 既有预留策略的结果,并非实测模型输入硬上限。Closes #3933