floop: typed ROUTE attendant (closed enum) via dspy structured output #12

Merged
onibot merged 1 commits from feature/typed-route into main 2026-10-22 15:03:55 +02:00
Owner

ROUTE migrates to the typed-output law: the attendant is a closed enum rendered into the prompt's JSON schema — an invalid pick is impossible by contract (AdapterParseError after dspy's own re-ask).

  • Attendant(str, Enum): knowledge logic analytic numeric floop user (str mixin keeps the machine's == and in EXPERT_ENGINES intact)
  • The per-field desc now carries the routing guidance (what each attendant is FOR) — replacing the 'one of: ...' list in the old string contract
  • The machine's invalid-attendant branch stays as a contract guard
  • New tests/typed_route.py: enum parses through the real adapter path (RawEngine + cache=False), out-of-set attendant raises, str compatibility holds

Verified: suite 13/13 green; wire test with real glm-5.3-flash routes all three probes correctly (knowledge / numeric / knowledge).

ROUTE migrates to the typed-output law: the attendant is a closed enum rendered into the prompt's JSON schema — an invalid pick is impossible by contract (AdapterParseError after dspy's own re-ask). - `Attendant(str, Enum)`: knowledge logic analytic numeric floop user (str mixin keeps the machine's `==` and `in EXPERT_ENGINES` intact) - The per-field desc now carries the routing guidance (what each attendant is FOR) — replacing the 'one of: ...' list in the old string contract - The machine's invalid-attendant branch stays as a contract guard - New `tests/typed_route.py`: enum parses through the real adapter path (RawEngine + cache=False), out-of-set attendant raises, str compatibility holds **Verified:** suite 13/13 green; wire test with real glm-5.3-flash routes all three probes correctly (knowledge / numeric / knowledge).
onibot added 1 commit 2026-10-22 15:03:54 +02:00
ROUTE migrates to the typed-output law: the attendant is a closed enum
rendered into the prompt's JSON schema — an invalid pick is impossible
by contract (AdapterParseError after dspy's own re-ask).

- Attendant(str, Enum): knowledge logic analytic numeric floop user
  (str mixin keeps the machine's == and `in EXPERT_ENGINES` intact)
- The per-field desc now carries the routing guidance (what each
  attendant is FOR) — replacing the 'one of: ...' list in the old
  string contract
- The machine's invalid-attendant branch stays as a contract guard
- New tests/typed_route.py: enum parses through the real adapter path
  (RawEngine + cache=False), out-of-set attendant raises, str
  compatibility holds

VERIFIED: suite 13/13 green; wire test with real glm-5.3-flash routes
all three probes correctly (knowledge / numeric / knowledge).
onibot merged commit 66e8bd4daa into main 2026-10-22 15:03:55 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: onibot/floop#12