Skip to content

Accept Flow usage and cache key at Factory ingress - #35

Draft
flujo-app wants to merge 7 commits into
codex/communityai-ci-baseline-repairfrom
codex/openai-stream-usage
Draft

flujo-app wants to merge 7 commits into
codex/communityai-ci-baseline-repairfrom
codex/openai-stream-usage

Conversation

@flujo-app

@flujo-app flujo-app commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

FLUJO's real chat SDK request includes stream_options.include_usage=true and prompt_cache_key. The strict receiver previously returned 422 before Factory admission. This PR accepts the explicit usage option on chat and legacy completions, emits a terminal usage chunk only after a successful stream, and accepts a bounded opaque cache key on chat. The key is included in Factory's normalized-body admission digest. Ordinary mixed-version text peers receive their existing request shape; this receiver does not implement prompt caching.

The saved real Flow R2 SDK body is pinned at 299 UTF-8 bytes and SHA-256 b86e125b6a031a226acc03147b5d865402ad149a621626fcdbf7629f5541fd03. An offline ASGI fixture checks its independently fixed 307-byte normalized body and reaches a synthetic Factory claim that holds before physical dispatch. Changing the key fails body admission; malformed keys fail schema validation. This qualifies receiver grammar and the held path only. Authenticated raw-wire/identity binding, a versioned receiver profile, durable production Original claims, coherent worker generation, and physical sends remain separate work.

This draft is stacked on #36, the CI baseline repair. Local validation: integrated Factory focused checks 134 passed/1 skipped, broad offline selection 1,028 passed/13 skipped, and cache-key candidate focused checks 80 passed; pinned Black/isort and diff checks passed. Hosted validation on exact head 5dec495: Black, isort, Ubuntu/macOS broad tests, and Linux/Windows packaging protocol tests and desktop self-tests pass. Both packaging jobs then fail at the unsigned public-alpha bundle because the signed sequence-2 Qwen catalog expired on 2026-09-28. #37 is an unsigned review-only sequence-3 renewal candidate, not a publication.

@flujo-app
flujo-app changed the base branch from codex/factory-ingress-no-redirect to codex/communityai-ci-baseline-repair October 4, 2026 11:15
@flujo-app flujo-app changed the title Support requested stream usage with Factory body binding Accept Flow usage and cache key at Factory ingress Oct 4, 2026
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.

1 participant