Skip to content

Merge #48: restore Omni frame/first+last/reference on the batch API - #50

Merged
crisng95 merged 3 commits into
mainfrom
merge/omni-batch-modes
Sep 17, 2026
Merged

crisng95 merged 3 commits into
mainfrom
merge/omni-batch-modes

Conversation

@crisng95

Copy link
Copy Markdown
Owner

Lands #48 on top of the REST removal (#49), with its REST half removed rather than revived.

Why this branch exists instead of a rebase

#48 was cut from a49831f, before #49 removed the REST transport, and it preserved the dual-transport shape deliberately — "the legacy REST implementations are kept below for non-batch deployments." On current main that half does not merely conflict, it does not import:

ImportError: cannot import name 'USE_BATCH_RPC' from 'agent.config'

agent.config.USE_BATCH_RPC, agent/services/headers.py (random_headers) and FlowClient._build_url/_client_context are all gone. 12 conflict hunks across omni_flash.py (4), test_omni_flash.py (7) and docs/OMNI_FLASH.md (1).

What the resolution keeps

#48's batch submits, byte for byte — the captured envelopes eb1hJf (first frame), nprQif (first+last), MZZa6b (references), and the 360p model-key suffixes. A merge resolution should not quietly reshape a contributor's verified wire payloads.

What it deletes

  • the REST bodies of _submit_omni_frame_video and generate_omni_flash_video, the tRPC poller behind check_omni_flash_status, plus _annotate_polling, _fetch_project_initial_data, _fetch_media_url
  • the two surviving if USE_BATCH_RPC: blocks (unwrapped), and the flag's 5 imports / 4 references
  • both model_key = _load_model_key(...) assignments — their only consumer was the REST body's videoModelKey. _load_model_key itself stays (tested directly), and models.json still carries all three modes × 4 durations, so no real validation is lost

omni_flash.py goes 709 → 417 lines; imports return to main's set.

Tests — two needed judgement, not deletion

#48's suite was pinned to REST by a module-level autouse fixture setting USE_BATCH_RPC=False, so tests that never name the flag were still exercising the old poller. My first pass misclassified three of them and the test run caught it.

  • dropped 7 REST/tRPC wire-contract tests
  • converted ..._returns_signed_url_without_buffering_video and ..._missing_media_is_pending onto the batch poller — what they pin still matters: the poller must hand back Flow's signed url instead of buffering the clip, and a media record without a /video/ url is pending, not done
  • dropped ..._requires_project_id_for_legacy_descriptors — the batch poller deliberately resolves a missing project id instead of refusing
  • rewrote the seven-reference boundary: main asserted it reached the capability gap, Restore Omni first/last/reference modes on migrated Flow API #48 asserted it through the REST body. Neither applies now, so it asserts the batch wire. Seven is the limit, not one past it

272 passed (up from 266), suite exits cleanly, agent.main imports.

Docs this merge falsifies

The merge invalidates claims main shipped in #49, so they move with it: README's top note and capability table, CLAUDE.md, and the UNSUPPORTED_ON_BATCH_API: Omni Flash row in /fk-doctor — an error string nothing can produce any more.

The unported set is now three, all on the Veo path (flow_client.py is untouched by this merge): video upscale, Veo r2v, Veo start+end chaining. Callers hitting the Veo guard are now pointed at the Omni modes that cover the same shot. CLAUDE.md's "4K upscale" was corrected to video upscale — it read as the image export, which works.

Not verified

The captured envelopes themselves. #48 reports them live-verified on 2026-09-14 and the tests lock their shape, but proving the wire format needs a real submit through a signed-in Flow tab, which this branch did not do.

Merging this closes #48 — the merge commit carries b1db615 as its second parent.

🤖 Generated with Claude Code

Bl0ck154 and others added 3 commits September 17, 2026 11:32
Closes the gap the REST removal documented: Omni's image-conditioned modes were
written against the pre-migration REST endpoints, so the migration to
`FlowClient` missed them and they have been answering
`UNSUPPORTED_ON_BATCH_API` since. #48 captured their batchexecute payloads —
`eb1hJf` (first frame), `nprQif` (first+last), `MZZa6b` (references) — and this
merge lands them.

#48 was cut from a49831f, before the REST transport was removed, and preserved
the dual-transport shape on purpose: "the legacy REST implementations are kept
below for non-batch deployments." On current main that half does not merely
conflict, it does not import — `agent.config.USE_BATCH_RPC`,
`agent/services/headers.py` and `FlowClient._build_url`/`_client_context` are
all gone. So the resolution keeps #48's batch submits byte for byte, including
the captured envelopes and the 360p model-key suffixes, and deletes the REST
half rather than trying to revive it:

- dropped the REST bodies of `_submit_omni_frame_video` and
  `generate_omni_flash_video`, the tRPC poller behind `check_omni_flash_status`,
  `_annotate_polling`, `_fetch_project_initial_data` and `_fetch_media_url`
- unwrapped the two surviving `if USE_BATCH_RPC:` blocks and removed the flag's
  five imports and four references
- dropped both `model_key = _load_model_key(...)` assignments: their only
  consumer was the REST body's `videoModelKey`. `_load_model_key` itself stays,
  tested directly, and `models.json` still carries all three modes
- 709 lines to 417; imports are back to main's set

Tests needed the same treatment, and two of them needed judgement rather than
deletion. #48's suite was pinned to the REST path by a module-level autouse
fixture setting `USE_BATCH_RPC=False`, so several tests that never name the flag
still exercised the old poller. Dropped the seven REST/tRPC wire-contract tests;
converted `..._returns_signed_url_without_buffering_video` and
`..._missing_media_is_pending` onto the batch poller, because what they pin
still matters — the poller must hand back Flow's signed url instead of
buffering the clip, and a media record without a `/video/` url is pending, not
done. Dropped `..._requires_project_id_for_legacy_descriptors`: the batch poller
deliberately resolves a missing project id instead of refusing.

The seven-reference boundary existed on both sides in a form that no longer
applies — main asserted it reached the capability gap, #48 asserted it through
the REST body — so it is rewritten against the batch submit. Seven is the limit,
not one past it, and with r2v live it has to reach the wire or an off-by-one in
the validator reads as a Flow refusal.

Docs followed the behaviour, since the merge falsifies claims main shipped
yesterday: README's note and capability table, CLAUDE.md, and the
`UNSUPPORTED_ON_BATCH_API: Omni Flash` row in `/fk-doctor`, an error string
nothing can produce any more. The unported set is now three, all on the Veo
path, and Veo chaining/r2v callers get pointed at the Omni modes that cover the
same shot. CLAUDE.md's "4K upscale" was corrected to video upscale while there:
it read as the image export, which works.

272 passed, up from 266, and the suite exits.

Not verified: the captured envelopes themselves. #48 reports them live-verified
on 2026-09-14 and the tests lock their shape, but proving the wire format needs
a real submit through a signed-in Flow tab, which this merge did not do.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E5BJVhNgerhFTUgmfnKTSj
@crisng95
crisng95 merged commit 6906c6f into main Sep 17, 2026
crisng95 added a commit that referenced this pull request Sep 17, 2026
First release since v1.1.0 (2026-05-09), and it is one arc: Flow moved to
flow.google.com in September 2026 and stopped minting the bearer the old REST
API needed, so the transport was rebuilt on batchexecute (#39), the dead REST
path deleted (#49), the image API migrated (#42), and the Omni image-conditioned
modes ported back on top of it (#48/#50).

Also fixes a version drift this release would otherwise have deepened. ccf89c6
put "0.2.0" in two places in agent/main.py; 939b956 bumped only the FastAPI
line, so /health has reported 0.2.0 ever since while the app said 1.1.0 — three
releases stale, on the endpoint CLAUDE.md tells you to curl before anything
else. /health now reads app.version, so there is one string to bump instead of
two literals that agree only by luck.

extension/manifest.json is deliberately not bumped. It tracks the extension's
own lifecycle, it is at 0.3.2, and a bump there forces a user-visible reload.

Verified: 272 passed; /health and app.version both report 1.2.0, checked by
calling the handler rather than reading the source.

Not verified: the Omni envelopes from #48. They are live-verified per that PR
and the tests lock their shape, but nothing has submitted through a signed-in
Flow tab since the merge resolution.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E5BJVhNgerhFTUgmfnKTSj
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.

2 participants