[elicitation] Advertise new url elicitation capability when auth_elicitation is enabled.#22188
Merged
Merged
Conversation
…_capability # Conflicts: # codex-rs/core/src/config/config_tests.rs
shijie-oai
approved these changes
May 11, 2026
owenlin0
approved these changes
May 11, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Why
We've added support for auth elicitation behind the auth_elicitation flag, but servers need to explicitly check the capability before it decides to send elicitations in order to be backward compatible. This PR adds the capability advertising conditioned on the flag.
What changed
client_elicitation_capabilityfrom theAuthElicitationfeature state.McpConnectionManagerso RMCP initialization advertises the correct elicitation support.formandurlelicitation when the feature is enabled, and preserve the empty default capability when it is disabled.Testing
cargo test -p codex-mcpcargo test -p codex-core to_mcp_config_preserves_auth_elicitation_feature_from_configcargo test -p codex-core(currently fails outside this change intools::handlers::multi_agents::tests::tool_handlers_cascade_close_and_resume_and_keep_explicitly_closed_subtrees_closedwith a stack overflow after unrelated tests have started running)