Repository navigation
fix(desktop): restore Gemini platform deadline - #9644
Merged
Merged
Conversation
This was referenced Jul 15, 2026
aryanorastar
added a commit
to aryanorastar/omi
that referenced
this pull request
Jul 23, 2026
Static tripwire (labeled as such): raw reqwest builders are not covered by signatures alone, so new direct .send() calls in routes/chat/ fail the manifest lanes. Behavioral coverage lives in the paused-time deadline tests. Caught class: BasedHardware#8640/BasedHardware#8911/BasedHardware#9135/BasedHardware#9644 (BasedHardware#9835). Co-Authored-By: Claude Fable 5 <[email protected]>
aryanorastar
added a commit
to aryanorastar/omi
that referenced
this pull request
Jul 23, 2026
Static tripwire (labeled as such): raw reqwest builders are not covered by signatures alone, so new direct .send() calls in routes/chat/ fail the manifest lanes. Behavioral coverage lives in the paused-time deadline tests. Caught class: BasedHardware#8640/BasedHardware#8911/BasedHardware#9135/BasedHardware#9644 (BasedHardware#9835). Co-Authored-By: Claude Fable 5 <[email protected]>
aryanorastar
added a commit
to aryanorastar/omi
that referenced
this pull request
Jul 24, 2026
Static tripwire (labeled as such): raw reqwest builders are not covered by signatures alone, so new direct .send() calls in routes/chat/ fail the manifest lanes. Behavioral coverage lives in the paused-time deadline tests. Caught class: BasedHardware#8640/BasedHardware#8911/BasedHardware#9135/BasedHardware#9644 (BasedHardware#9835). Co-Authored-By: Claude Fable 5 <[email protected]>
aryanorastar
added a commit
to aryanorastar/omi
that referenced
this pull request
Jul 24, 2026
Static tripwire (labeled as such): raw reqwest builders are not covered by signatures alone, so new direct .send() calls in routes/chat/ fail the manifest lanes. Behavioral coverage lives in the paused-time deadline tests. Caught class: BasedHardware#8640/BasedHardware#8911/BasedHardware#9135/BasedHardware#9644 (BasedHardware#9835). Co-Authored-By: Claude Fable 5 <[email protected]>
aryanorastar
added a commit
to aryanorastar/omi
that referenced
this pull request
Jul 26, 2026
Static tripwire (labeled as such): raw reqwest builders are not covered by signatures alone, so new direct .send() calls in routes/chat/ fail the manifest lanes. Behavioral coverage lives in the paused-time deadline tests. Caught class: BasedHardware#8640/BasedHardware#8911/BasedHardware#9135/BasedHardware#9644 (BasedHardware#9835). Co-Authored-By: Claude Fable 5 <[email protected]>
kodjima33
pushed a commit
that referenced
this pull request
Jul 28, 2026
…10054) * fix(chat): consume one request deadline budget on the Anthropic path The provider-timeout class (FC-per-hop-timeout: #8640, #8911, #9135, chat path now owns one admission budget instead: - RequestDeadline (240s inside the 300s platform bound, mirroring the Gemini proxy) is created in route middleware before extractors and body extraction; auth, BYOK, and paywall waits are bounded by it and budget exhaustion returns a typed 504 instead of a 401. - All provider sends go through send_with_deadline; the retry loop is a budget-aware policy: attempts never start on an expired budget, a retry or pause_turn continuation starts only above a 10s floor, and backoff sleeps truncate at the budget edge. A transient status on the final available attempt still passes through unchanged. - The budget governs everything before the first client-visible semantic SSE event. The stream idle timer now measures SEMANTIC progress: raw bytes and Anthropic ping events no longer reset it, closing the live gap where a ping-only upstream could hold a client forever with nothing visible. Streaming still has no total response timeout by design (#9135): a visible-delta stream survives budget expiry. - The detached Firestore usage write runs through a spawn seam that never inherits the request deadline. Behavioral tests drive the policy and the real stream translator with tokio::time::pause: budget-floor retry stop, backoff truncation at the edge, long visible streams surviving expiry, ping-only turns ending in a typed terminal SSE error, semantic-idle stalls independent of budget, and detached-write completion after expiry. Fixes #9835. Co-Authored-By: Claude Fable 5 <[email protected]> * harden(ci): reject chat provider sends that bypass send_with_deadline Static tripwire (labeled as such): raw reqwest builders are not covered by signatures alone, so new direct .send() calls in routes/chat/ fail the manifest lanes. Behavioral coverage lives in the paused-time deadline tests. Caught class: #8640/#8911/#9135/#9644 (#9835). Co-Authored-By: Claude Fable 5 <[email protected]> * fix(chat): count reasoning deltas as semantic progress ThinkingDelta chunks reach the client as `reasoning_content`, but they did not refresh the semantic idle timer — only text deltas did. So after the initial role chunk, a Claude reasoning phase that kept emitting visible reasoning for longer than STREAM_IDLE_TIMEOUT was ended as "no semantic progress" while the client was actively receiving output, regressing the "a long visible stream is not an error" contract (#9135) for reasoning streams. Refresh the timer when a reasoning chunk is yielded, matching the text-delta path. Regression test drives a reasoning-only stream 200s past the 60s idle bound on the paused clock: it fails on the old code (1 of 4 reasoning deltas delivered, turn killed at the bound) and passes with the fix. Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix(chat): register deadline guard artifact Failure-Class: FC-per-hop-timeout --------- Co-authored-by: Claude Fable 5 <[email protected]> Co-authored-by: Max Carter 祁明思 <[email protected]>
undivisible
added a commit
to Archit-lal/omi
that referenced
this pull request
Jul 29, 2026
…asedHardware#10054) * fix(chat): consume one request deadline budget on the Anthropic path The provider-timeout class (FC-per-hop-timeout: BasedHardware#8640, BasedHardware#8911, BasedHardware#9135, chat path now owns one admission budget instead: - RequestDeadline (240s inside the 300s platform bound, mirroring the Gemini proxy) is created in route middleware before extractors and body extraction; auth, BYOK, and paywall waits are bounded by it and budget exhaustion returns a typed 504 instead of a 401. - All provider sends go through send_with_deadline; the retry loop is a budget-aware policy: attempts never start on an expired budget, a retry or pause_turn continuation starts only above a 10s floor, and backoff sleeps truncate at the budget edge. A transient status on the final available attempt still passes through unchanged. - The budget governs everything before the first client-visible semantic SSE event. The stream idle timer now measures SEMANTIC progress: raw bytes and Anthropic ping events no longer reset it, closing the live gap where a ping-only upstream could hold a client forever with nothing visible. Streaming still has no total response timeout by design (BasedHardware#9135): a visible-delta stream survives budget expiry. - The detached Firestore usage write runs through a spawn seam that never inherits the request deadline. Behavioral tests drive the policy and the real stream translator with tokio::time::pause: budget-floor retry stop, backoff truncation at the edge, long visible streams surviving expiry, ping-only turns ending in a typed terminal SSE error, semantic-idle stalls independent of budget, and detached-write completion after expiry. Fixes BasedHardware#9835. Co-Authored-By: Claude Fable 5 <[email protected]> * harden(ci): reject chat provider sends that bypass send_with_deadline Static tripwire (labeled as such): raw reqwest builders are not covered by signatures alone, so new direct .send() calls in routes/chat/ fail the manifest lanes. Behavioral coverage lives in the paused-time deadline tests. Caught class: BasedHardware#8640/BasedHardware#8911/BasedHardware#9135/BasedHardware#9644 (BasedHardware#9835). Co-Authored-By: Claude Fable 5 <[email protected]> * fix(chat): count reasoning deltas as semantic progress ThinkingDelta chunks reach the client as `reasoning_content`, but they did not refresh the semantic idle timer — only text deltas did. So after the initial role chunk, a Claude reasoning phase that kept emitting visible reasoning for longer than STREAM_IDLE_TIMEOUT was ended as "no semantic progress" while the client was actively receiving output, regressing the "a long visible stream is not an error" contract (BasedHardware#9135) for reasoning streams. Refresh the timer when a reasoning chunk is yielded, matching the text-delta path. Regression test drives a reasoning-only stream 200s past the 60s idle bound on the paused clock: it fails on the old code (1 of 4 reasoning deltas delivered, turn killed at the bound) and passes with the fix. Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix(chat): register deadline guard artifact Failure-Class: FC-per-hop-timeout --------- Co-authored-by: Claude Fable 5 <[email protected]> Co-authored-by: Max Carter 祁明思 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #9524.
Root cause and durable guard
A merge that preserved the newer proxy telemetry model also reintroduced a 75-second logical deadline and 70-second HTTP-client timeout. Cloud Run and the desktop client both allow 300 seconds, so the proxy was rejecting valid long-context Gemini calls around 70 seconds.
The timeout is now derived from the 300-second Cloud Run contract. The regression test asserts that it remains below the platform deadline with 60 seconds of response headroom and stays at least 180 seconds, while preserving the smaller per-attempt margin inside the total budget.
Verification
cd desktop/macos/Backend-Rust && cargo test --locked— 350 passedcd desktop/macos/Backend-Rust && cargo check --locked— passedcd desktop/macos/Backend-Rust && cargo clippy --locked -- -D warnings— passedcd desktop/macos && bash test.sh— launcher, Rust, and isolated Swift suites passedmake preflight— passed; no locked product invariants applycd desktop/macos && OMI_APP_NAME="omi-issue-9524" OMI_SIGN_IDENTITY="-" OMI_ALLOW_ADHOC_SIGN=1 OMI_AUTOMATION_PORT=47996 ./run.sh --yolo— named bundle built, signed, installed, launched, and was inspected through its automation bridgeThe machine had no Omi Dev auth session to seed, so an authenticated real Gemini request could not be exercised locally. The proxy’s real cancellation path and deadline contract are covered by the Rust suite; no production traffic was changed.