Skip to content

zcode 用的是gpt-5.6-sol 上下文设置了272000,识别错了上下文空间了 #344

Closed

Description

@ranxianglei

相关日志
2026-08-29T11:53:38.257Z [info] mitm :443 tunnel established (TLS terminated locally)
2026-08-29T11:53:38.297Z [info] [eb37a6f8-e344-4562-85e0-061fe856f968] processTurn: 372 msgs, renderTags=text-only, 96 text tagged, 0 tool tagged (should be 0 with text-only)
2026-08-29T11:53:38.297Z [info] [eb37a6f8-e344-4562-85e0-061fe856f968] nudge idle: usage=23% (208054/922000), growth=21792/22500 (ref=186262, interval=50000), pendingT1=135045/50000 model=gpt-5.6-sol, reason="growth 21792 < floor 22500, ready: T1 135045, blocked: T1 (cadence)"
2026-08-29T11:53:38.302Z [info] forward POST → https:///v1/chat/completions
2026-08-29T11:53:46.248Z [info] [update] checking npm registry for billion-context (last check 50s ago)…
2026-08-29T11:53:46.913Z [info] [update] current=0.1.63 latest=0.1.63 (up to date)
2026-08-29T11:53:49.172Z [info] mitm :443 tunnel established (TLS terminated locally)
2026-08-29T11:53:49.209Z [info] [eb37a6f8-e344-4562-85e0-061fe856f968] processTurn: 380 msgs, renderTags=text-only, 96 text tagged, 0 tool tagged (should be 0 with text-only)
2026-08-29T11:53:49.209Z [info] [eb37a6f8-e344-4562-85e0-061fe856f968] nudge INJECT T1: usage=23% (212143/922000), growth=25881/22500 (ref=186262, interval=50000), pendingT1=137864/50000 model=gpt-5.6-sol, reason="T1 effective 137864 >= 50000, growth 25881, usage 23%"
2026-08-29T11:53:49.213Z [info] forward POST → https:///v1/chat/completions
2026-08-29T11:54:53.527Z [info] mitm :443 tunnel established (TLS terminated locally)
2026-08-29T11:54:53.552Z [info] [eb37a6f8-e344-4562-85e0-061fe856f968] processTurn: 388 msgs, renderTags=text-only, 96 text tagged, 0 tool tagged (should be 0 with text-only)
2026-08-29T11:54:53.552Z [info] [eb37a6f8-e344-4562-85e0-061fe856f968] nudge idle: usage=24% (217405/922000), growth=5262/22500 (ref=212143, interval=50000), pendingT1=137864/50000 model=gpt-5.6-sol, reason="growth 5262 < floor 22500, ready: T1 137864, blocked: T1 (cadence)"
2026-08-29T11:54:53.556Z [info] forward POST → https:///v1/chat/completions
2026-08-29T11:55:32.105Z [info] mitm :443 tunnel established (TLS terminated locally)
2026-08-29T11:55:32.109Z [warn] unrecognized path /api/v1/event/report — not a known protocol (/chat/completions, /v1/messages, /responses, /responses/compact); forwarding unchanged
2026-08-29T11:55:32.109Z [info] forward POST → https:///api/v1/event/report
2026-08-29T11:55:32.199Z [info] mitm :443 tunnel established (TLS terminated locally)
2026-08-29T11:55:32.204Z [warn] unrecognized path /api/v1/snapshot/upload-credential?workspace_id=abcf6ff711a7 — not a known protocol (/chat/completions, /v1/messages, /responses, /responses/compact); forwarding unchanged
2026-08-29T11:55:32.204Z [info] forward GET → https:///api/v1/snapshot/upload-credential
2026-08-29T11:55:32.317Z [info] mitm :443 tunnel established (TLS terminated locally)
2026-08-29T11:55:32.344Z [info] [eb37a6f8-e344-4562-85e0-061fe856f968] processTurn: 373 msgs, renderTags=text-only, 97 text tagged, 0 tool tagged (should be 0 with text-only)
2026-08-29T11:55:32.344Z [info] [eb37a6f8-e344-4562-85e0-061fe856f968] nudge idle: usage=22% (219425/988782), growth=7282/22500 (ref=212143, interval=50000), pendingT1=132397/50000 model=gpt-5.6-sol, reason="growth 7282 < floor 22500, ready: T1 132397, blocked: T1 (cadence)"
2026-08-29T11:55:32.348Z [info] forward POST → https:///v1/chat/completions
2026-08-29T11:55:52.827Z [info] [eb37a6f8-e344-4562-85e0-061fe856f968] [acp-usage] round 1 input=209684 cached=207360 (cache hit 99%)
2026-08-29T11:55:52.926Z [info] mitm :443 tunnel established (TLS terminated locally)
2026-08-29T11:55:52.928Z [warn] unrecognized path /api/v1/event/report — not a known protocol (/chat/completions, /v1/messages, /responses, /responses/compact); forwarding unchanged

Activity

  1. ranxianglei commented on Aug 29, 2026

    @ranxianglei
    OwnerAuthor

    🤖 ework agent · vllm-qwen/qwen3.8-27b

    [bot] 找到根因了,是 bili 的窗口优先级 bug,已修复(PR: https://github.com/ranxianglei/billion-context/pull/345)。

    根因:src/server.ts 里 native 窗口解析顺序是 beta ?? plugin ?? launcher ?? registry(peek) ?? 用户配置 ?? 内置表 —— #212 那次改动本意是"registry 优先于内置静态表",但把 models.dev registry 放到了用户显式声明之上。你的私有 relay host 不在 registry 的 host 映射表里,于是 lookup 退化为扫描所有 provider,采到了官方 openai/gpt-5.6-sol 的 1,050,000,你设的 272000 被完全忽略。

    日志里的两个分母正好印证(nudge 分母 = 窗口 − 该请求的 max_tokens 输出预留):

    • 922000 = 1,050,000 − 128,000
    • 988782 = 1,050,000 − 61,218

    修复:把优先级换回文档承诺的顺序(config.ts/CONFIGURATION.md 都写着"per-route declaration always wins"):显式声明 > registry > 内置表。没声明时 registry 仍然生效(行为不变)。

    验证:新增回归测试 tests/configured-window-outranks-registry.test.ts(用 issue 里的精确数值:声明 272K vs registry 1,050K vs 内置表 400K),master 上第一个断言会失败(得到 1,050,000),修复后通过。typecheck 干净,825/825 测试全过,build 成功。

    一个确认:272000 是配在 bili 的 config(providers["mitm://<host>"].models["gpt-5.6-sol"].context)吧?如果是配在 ZCode 自己的设置里,bili 是读不到的(MITM 只透传,不解析客户端配置),那就需要在 bili config 里加这条声明。合并 PR 后升级 bili 即可生效。

  2. added a commit that references this issue on Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions