Skip to content

fix(api): accept a per-combo universal handoff setting - #15360

Closed
HouMinXi wants to merge 1 commit into
cheaper-inference:release/v3.8.52from
HouMinXi:fix/universal-handoff
Closed

HouMinXi wants to merge 1 commit into
cheaper-inference:release/v3.8.52from
HouMinXi:fix/universal-handoff

Conversation

@HouMinXi

@HouMinXi HouMinXi commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • An operator could not turn universal handoff off for a single combo. The create and update schemas omitted universal_handoff, so Zod stripped the field before the route wrote the combo.
  • The runtime already reads combo.universal_handoff or combo.universalHandoff and falls back to the process default when neither is stored. The default stays enabled.
  • Both keys are now accepted, and a payload that carries only the handoff setting counts as a real update instead of being rejected as empty.

Related Issues

Validation

  • Change type: other (combo API schema)
  • Focused tests: node --import tsx/esm --test tests/unit/combo-universal-handoff-15251.test.ts (4 pass)
  • eslint on the changed file, with the repo suppression file
  • Reconciled with release/v3.8.52 @ 23a1148486
  • New test covers the change
  • Defect injection: removing the schema fields turns all 4 tests red, and the change was restored

Tests Added Or Updated

  • tests/unit/combo-universal-handoff-15251.test.ts (added)

Coverage Notes

  • The test parses a combo payload that disables handoff and asserts the field survives both the create and the update schema, including an update that carries only that field.

Reviewer Notes

  • The process-wide default in open-sse/services/contextHandoff.ts is left at enabled: true. Flipping it would change behavior for every existing combo and is a separate decision.
  • When a payload sets both universal_handoff and universalHandoff, the runtime reads the snake_case value first (comboSetup.ts).

The combo create and update schemas omitted universal_handoff, so Zod
stripped it before the route wrote the combo and an operator could not
turn handoff off. The runtime already reads combo.universal_handoff or
combo.universalHandoff, falling back to the process default when neither
is stored.

Accept both keys, and treat a payload that carries only the handoff
setting as a real update. The process-wide default stays enabled.

Signed-off-by: Minxi Hou <houminxi@gmail.com>
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Thanks for the per-combo universal handoff setting. #15459 is the version that landed on release/v3.8.52 (274ea10): it persists and clears the camelCase alias on the combo route and schema, covered by tests/unit/combo-universal-handoff-15251.test.ts.

This PR touches the same schema and test. Closing it so the two handoff changes are not both applied. None of this diff is being reused on top of #15459. The branch stays in place.

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.

fix(api): universal_handoff defaults on and cannot be disabled via combo API (schema strips field)

2 participants