Repository navigation
Add hybrid chat routing with standard leaf diagnostics - #631
Draft
mattleibow wants to merge 10 commits into
Draft
mattleibow wants to merge 10 commits into
mattleibow wants to merge 10 commits into
Conversation
mattleibow
added this pull request to stack #632
October 6, 2026 18:50
Contributor
|
✅ Expert Code Review: 2 independent reviewers found no issues. Methodology: 2-model adversarial consensus. (1 reviewer failed to complete — reduced coverage, no tiebreaker)
|
mattleibow
force-pushed
the
mattleibow-hybrid-leaf-diagnostics
branch
from
October 6, 2026 19:03
ca8305a to
38a4223
Compare
mattleibow
force-pushed
the
mattleibow-hybrid-leaf-diagnostics
branch
2 times, most recently
from
October 6, 2026 19:37
0770751 to
dda886f
Compare
mattleibow
force-pushed
the
mattleibow-hybrid-leaf-diagnostics
branch
from
October 6, 2026 19:50
c4be118 to
3a6496e
Compare
mattleibow
force-pushed
the
mattleibow-hybrid-leaf-diagnostics
branch
from
October 6, 2026 20:41
65327f8 to
cb7d52e
Compare
mattleibow
force-pushed
the
mattleibow-hybrid-leaf-diagnostics
branch
from
October 6, 2026 20:58
cb7d52e to
ad4c0e8
Compare
mattleibow
force-pushed
the
mattleibow-hybrid-leaf-diagnostics
branch
3 times, most recently
from
October 7, 2026 08:36
c873189 to
ef8399f
Compare
mattleibow
removed this pull request from stack #632
October 7, 2026 08:37
mattleibow
changed the base branch from
mattleibow-chat-logging-sidebar
to
mattleibow-apple-foundation-models-image-input
October 7, 2026 08:38
mattleibow
added this pull request to stack #635
October 7, 2026 08:39
mattleibow
force-pushed
the
mattleibow-hybrid-leaf-diagnostics
branch
from
October 7, 2026 08:54
ef8399f to
c0de37d
Compare
mattleibow
removed this pull request from stack #635
October 7, 2026 08:57
mattleibow
changed the base branch from
mattleibow-apple-foundation-models-image-input
to
mattleibow-plan-apple-ai-metrics
October 7, 2026 08:58
mattleibow
added this pull request to stack #636
October 7, 2026 08:59
jfversluis
force-pushed
the
mattleibow-hybrid-leaf-diagnostics
branch
from
October 7, 2026 13:38
c0de37d to
42a8937
Compare
mattleibow
marked this pull request as draft
October 7, 2026 13:43
mattleibow
force-pushed
the
mattleibow-hybrid-leaf-diagnostics
branch
2 times, most recently
from
October 7, 2026 17:02
287ee65 to
ef69e6d
Compare
jfversluis
force-pushed
the
mattleibow-hybrid-leaf-diagnostics
branch
2 times, most recently
from
October 7, 2026 20:59
46e5d47 to
0418f32
Compare
mattleibow
force-pushed
the
mattleibow-hybrid-leaf-diagnostics
branch
2 times, most recently
from
October 16, 2026 00:33
276f501 to
9a2f650
Compare
Integrate only hybrid source e4e08ab on logging tip 2041d69. Preserve routing/failover policy and scoped dependencies, remove the custom fallback warning, and instrument owned leaves and outer pipeline with built-in logging and privacy-disabled telemetry. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4461f2b8-6920-4602-a59e-599a8c6368e6 Copilot-CLI-Session: 91d4b2dd-12bc-4dbe-9b10-b58e13055853
Restore AddChatFeature(aiSettings) ownership of Apple, Hybrid, Azure and Replay registration and availability checks. MauiProgram remains the feature composition entry point; client factories stay private to ChatServiceCollectionExtensions. Update sample documentation without changing routing or diagnostics. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4461f2b8-6920-4602-a59e-599a8c6368e6 Copilot-CLI-Session: 91d4b2dd-12bc-4dbe-9b10-b58e13055853
Remove summary generation, payload selection and the IsHybrid settings flag. Preserve standard routing, fallback and diagnostics with independently snapshotted original text and ordinary generation options. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4461f2b8-6920-4602-a59e-599a8c6368e6 Copilot-CLI-Session: 91d4b2dd-12bc-4dbe-9b10-b58e13055853
Follow SemanticRoutingChatClient's per-request last-user-message selection pattern. Remove bound leaf wrappers and classifier input DTOs, keeping full original text and ordinary options for answers and built-in transient failover/diagnostics. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4461f2b8-6920-4602-a59e-599a8c6368e6 Copilot-CLI-Session: 91d4b2dd-12bc-4dbe-9b10-b58e13055853
Clone options at each leaf with ConfigureOptionsChatClient and copy mutable stop sequences so a failed cloud attempt cannot alter local recovery. Cover response and streaming cloud mutations while preserving caller state and the simplified router. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4461f2b8-6920-4602-a59e-599a8c6368e6 Copilot-CLI-Session: 91d4b2dd-12bc-4dbe-9b10-b58e13055853
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Replace structured route/reason generation with a plain local/cloud classifier. Reuse the production classifier in focused model-backed device cases and trim redundant SDK-contract host coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Extract the platform-independent generic test base and keep Apple as a thin subclass. Expand the corpus to 42 cases; retain the observed greeting-in-a-poem misroute as a failing RequiresModel regression without changing the production prompt. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use the user-approved local expectation for the greeting-in-verse case and document that tolerance without changing the classifier prompt. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
mattleibow
force-pushed
the
mattleibow-hybrid-leaf-diagnostics
branch
from
October 16, 2026 17:28
2eb0942 to
a723334
Compare
This branch has not been deployed
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
Adds Hybrid (local + cloud) to ChatPlayground. A short Apple Intelligence classifier returns
localorcloud. MEAI'sRoutingChatClientselects the shared Apple/Azure pipeline, withOrderedFailoverChatClientproviding cloud-to-local recovery. Tools, recordings and the Logs sidebar use the existing pipelines.Cloud receives the original conversation and options automatically, without redaction or per-turn approval. Do not use Hybrid for data that must stay on-device. Classification considers only the last user message and is best-effort. Classifier errors propagate; streaming failures do not recover after output begins.
All three MEAI packages now use one central 10.11.0 version, replacing project-specific overrides. OpenAI and required runtime dependencies are updated through the existing feeds. Tests retain focused routing, forwarding, failover, diagnostics and recording coverage, plus a shared 42-case real-model classifier suite.
Validation