Mobile Remote: Android Remote should preserve host provider config
Summary
Mobile Remote sessions created from Android Remote can ignore the host's local provider configuration because the phone request sends modelProvider=openai as an explicit default. That value can override the host-side config/thread-config result, so a phone-created session may use ChatGPT/OpenAI auth and quota even when the host is configured to use a custom/local provider.
I tried to open this as a PR, but openai/codex currently only allows collaborators to create pull requests against the upstream repository from my fork. I am filing the issue with the patch branch details instead.
Observed behavior
A phone-created session from codex_chatgpt_android_remote persisted with:
model_provider=openai- ChatGPT websocket auth path
This happened even though the host-side local config/thread-config provider was returning the intended custom provider for new sessions.
Expected behavior
When Android Remote sends the default provider value openai, app-server should treat that as "no explicit provider override" so the host's configured provider/thread-config can win.
If Android Remote sends a non-default provider value, that explicit override should still be preserved.
Patch branch
- Branch:
HanCheg0812/codex:codex/android-remote-provider-config - Commit:
b28593e6c5fbf3a030b9ad83d7a1b3b8d85937308 - Compare: https://github.com/openai/codex/compare/main...HanCheg0812:codex/android-remote-provider-config?expand=1
The change is limited to:
codex-rs/app-server/src/request_processors/thread_processor.rscodex-rs/app-server/src/request_processors/thread_processor_tests.rs
Validation
On the patch branch I ran:
cargo test -p codex-app-server normalize_thread_start_model_provider_drops_android_remote_openai_default
cargo build -p codex-app-server
Both passed locally.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗