fix: normalize Remote Control session providers at creation - #1789
Open
Rat0323 wants to merge 6 commits into
Open
fix: normalize Remote Control session providers at creation#1789Rat0323 wants to merge 6 commits into
Rat0323 wants to merge 6 commits into
Conversation
Run Provider Sync during launcher startup for every non-pure-official relay profile even when the Provider Sync toggle is off, so mobile-created openai sessions are normalized to the active provider and recorded in local_thread_catalog.
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
thread/start, before app-server persists the thread..gitattributesLF fix for stable CI checkouts.Root cause
Phone-created threads could start with
modelProvider = openaieven though the official-mix profile used a custom provider. Rollout/SQLite state andlocal_thread_catalogthen disagreed with the active provider, so the session remained on disk but disappeared from the active list after restart.Implementation
Creation-time normalization
For
relayMode = officialwithofficialMixApiKey = true, the injected app-server request layer interceptsthread/startand host aliases, replaces a missing oropenaimodelProviderwith the active provider, preserves other explicit providers, and forwards the request before persistence.The override is independent of model-whitelist and service-tier UI switches, and app-server client discovery retries until its runtime module is available. Pure official, Mixed API, Pure API, and Aggregate profiles do not automatically enable this Remote Control-specific path.
Startup recovery
Launcher-time Provider Sync is automatically invoked only for official-mix profiles. Other modes keep the existing opt-in
provider_sync_enabledbehavior. The sync repairs older rollout/SQLite mismatches and missing catalog rows with its existing backup behavior.Validation
ThreadStartParams.modelProvider.node --check assets/inject/renderer-inject.jscargo fmt --all -- --checkgit diff --checkcargo test -p codex-plus-core --test cdp_bridge -- --test-threads=1— 94 passedopenai, explicit other provider, disabled service-tier controls, pure official, and direct app-server client calls.019fd56e-2eca-7f10-9c06-47e1dbf860f9.