Repository navigation
fix(provider): honor NaN DeepSeek output limits - #2359
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Summary
Closes #2357
Refs #1259
Approved coding targets
status:approvedstatus:approvedEMPTY_OUTPUT, with relay/public projection tests. Other refusal sites and requested-limit evidence remain outside this PR.max_tokens, the field enforced by the tested endpoint, using the SDK's existing compatibility option.Type
type:bug)Why
The controlled comparison in #2357 used the same model, synthetic prompt and
reasoning_effort: none:max_completion_tokens: 64produced 799 tokens with a normal finish, whilemax_tokens: 64stopped at 64. The existing SDK defaults the model metadata into the former field unless compatibility is specified.This proves the observed field mismatch, not universal server behavior or the cause of historical empty-output failures. Those failures lacked the counters needed for diagnosis. This PR does not change the user's routing or claim that every historical empty completion is fixed.
Review path
lib/nan-provider.tslib/inprocess-reviewer.tsEMPTY_OUTPUT; unknown facts are omitted and model identity is bounded. Remove rawerrorMessagepassthrough from this branch only.tests/nan-provider.test.tstests/inprocess-reviewer.test.tstests/review-host-relay.test.ts,tests/review-relay-transport-agent.test.tsVerification
node --experimental-strip-types --test tests/nan-provider.test.ts tests/inprocess-reviewer.test.ts tests/review-host-relay.test.ts tests/review-relay-transport-agent.test.ts.pnpm typecheck: zero diagnostics, no regressions.pnpm run check:runtime-modules: all 16 generated modules match.node scripts/verify-package-files.mjs: 215 files / 69 pinned artifacts validated.pnpm run test:packed-package: packed installation E2E passed (gentle-pi 4.3.0 / Gentle AI 4.2.0).git diff --check: clean.Full local suite — explicitly not green
With the pinned native binary installed and
GENTLE_PI_REQUIRE_NATIVE_BINARY=1, the candidate'spnpm testexited 1: 6,959 passed / 11 failed / 72 skipped. An isolated unchangedmainatabc4b2786, under the same command and native flag, exited 1: 6,954 passed / 10 failed / 72 skipped.All ten baseline failures also occur on the candidate: five installer-bundle tests report missing
zip; five skill-registry/watcher tests fail locally. The candidate additionally faileda matching FIFO cannot block presence discoveryunder the full-suite run. An independent focused comparison selected that test exactly once per checkout: candidate passed in 127 ms; baseline passed in 123 ms. Its test and implementation are byte-identical across both trees, and its 1,000 ms child-process deadline includes startup and module loading. This favors timing/load sensitivity, but does not erase the original failure or prove its exact cause. The provider-contract and runtime-harness stages pass on both trees. No check is skipped, softened or hidden by this PR.The remote CI for the same base commit is green. Remote PR CI must pass before this change is merged.
Scope and rollback
This is one 168-line work unit across six files. Revert this commit to restore the prior request field and empty-refusal evidence; no settings, profiles, native authority or binary pin needs migration.
Refs #1259is intentional: this only advances itsEMPTY_OUTPUTevidence. Other post-completion refusals and requested-limit diagnostics remain outside this PR, so that issue must remain open. No retry behavior from #1307 / #1318 is included. No #2349 code or review state is changed.Checklist
type:bug.f069c4c6e; nine checks successful).Summary by CodeRabbit
max_tokensfield while retaining the existing output limit. Other models’ request settings remain unchanged.