feat(chain): expand canonical chain runtime #34

Merged
lost-rob0t merged 26 commits from feature/issue-13-chain-runtime into main 2026-08-12 21:17:49 +00:00
lost-rob0t commented 2026-08-12 21:07:48 +00:00 (Migrated from github.com)

Summary

  • add canonical multi-turn messages, multimodal metadata, prompt templates, structured schemas/output validation, provider routing, middleware, bounded retry/backoff, usage aggregation, and ordered traces
  • preserve rlm_chain:model_complete/3 while exposing chain_invoke/4, model_stream/4, and chain_stream/5
  • implement true OpenAI-compatible SSE streaming with http_open/3, incremental data: parsing, [DONE], usage, reasoning/tool-call/finish normalization, and final canonical response aggregation
  • preserve cancellation/time-limit control exceptions through provider and chain streaming layers
  • add deterministic conformance coverage plus a same-repo REAL OpenRouter streaming acceptance gate
  • document the canonical chain/middleware/stream contracts

Validation

  • exact branch head deterministic CI is green
  • production modules and live test definitions static-load cleanly
  • deterministic PlUnit, graph restart validation, and whitespace checks are green
  • PR CI is expected to run the REAL OpenRouter suite, including the new streaming acceptance test, with no fake-provider fallback

Closes #13

## Summary - add canonical multi-turn messages, multimodal metadata, prompt templates, structured schemas/output validation, provider routing, middleware, bounded retry/backoff, usage aggregation, and ordered traces - preserve `rlm_chain:model_complete/3` while exposing `chain_invoke/4`, `model_stream/4`, and `chain_stream/5` - implement true OpenAI-compatible SSE streaming with `http_open/3`, incremental `data:` parsing, `[DONE]`, usage, reasoning/tool-call/finish normalization, and final canonical response aggregation - preserve cancellation/time-limit control exceptions through provider and chain streaming layers - add deterministic conformance coverage plus a same-repo REAL OpenRouter streaming acceptance gate - document the canonical chain/middleware/stream contracts ## Validation - exact branch head deterministic CI is green - production modules and live test definitions static-load cleanly - deterministic PlUnit, graph restart validation, and whitespace checks are green - PR CI is expected to run the REAL OpenRouter suite, including the new streaming acceptance test, with no fake-provider fallback Closes #13
Sign in to join this conversation.
No description provided.