Skip to content

Virtual-model repetition_limit semantics + max-pattern knob #73

Description

@weselben

Question

Lock the virtual-model repetition_limit semantics and the related knobs before #69 starts.

Three letters, one reply:

A: explicit 0 beats global, unset inherits global.
Unset on model + unset globally = off. Unset + global N = on with N. 0 + global N = off for this model. N + global M = on with N. Match the existing slowdown: 0 pattern in internal/virtualmodels/.

B: hardcode max pattern at 8 tokens inside the detector (no new field). v1 ships one knob — the limit count.

C: env name STREAM_REPETITION_LIMIT stays as-is. Unset / empty / 0 = off. N>0 = on with N. No second env for opt-out (one knob = KISS).

Reply as a letter per item. Example: A, B, C.

Activity

  1. weselben commented on Sep 1, 2026

    @weselben
    OwnerAuthor

    Resolved.

    A (locked as proposed): explicit 0 beats global, unset inherits global, per-model value wins over global.

    B (revised per your reply): max pattern becomes a second knob, not a hardcoded 8:

    • Virtual-model field repetition_max_pattern (tokens). Unset = inherit global. Explicit 1–64 = that value. 0 makes no sense for a pattern length, so this field has no tri-state — only limit keeps the 0-beats-global semantics.
    • Global default via env STREAM_REPETITION_MAX_PATTERN; unset = 8.
    • Both fields appear in the Models view next to slowdown.

    C (recommendation: keep the name). STREAM_REPETITION_LIMIT matches the handoff spec, the YAML key stream_repetition_limit already ships in config.example.yaml, and every ticket uses "limit" for this knob. Renaming now is docs churn for zero gain. The second env follows the same prefix: STREAM_REPETITION_MAX_PATTERN.

    Final env surface:

    • STREAM_REPETITION_LIMIT — global default repeat count (0 = off)
    • STREAM_REPETITION_MAX_PATTERN — global default chain length in tokens (default 8)

    Final virtual-model fields:

    • repetition_limit — tri-state (*int): unset inherit / 0 off / N on
    • repetition_max_pattern — int, unset inherit, 1–64
  2. added a commit that references this issue on Sep 3, 2026
    7031b7c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions