Skip to content

RFI: Q0-3 Stop-reason state machine + max-tokens continuation #2309

@gh-xj

Description

@gh-xj

Summary

Track RFI for stop-reason/max-tokens continuation state machine (Q0-3).

Problem statement

Long responses can be truncated when provider stop reason is MaxTokens (or equivalent). The current loop does not consistently apply continuation behavior, causing silent truncation and degraded UX.

Scope

  • Map stop reasons across active providers.
  • Define continuation state machine and retry cap.
  • Define behavior for partial tool-call JSON on truncation.
  • Define observability/logging for continuation events.

Acceptance criteria

  • Provider stop-reason mapping documented.
  • Continuation policy and hard limits documented.
  • Partial tool-call handling strategy documented.
  • Proposed state machine approved for implementation.

References

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions