feat: expose provider capability bounds to app server clients (#20049)

follow up of #19442. The app server now exposes provider-derived bounds
through a new v2 `modelProvider/read` method. The response reports the
configured provider map key as `modelProvider` and returns the effective
capability booleans so clients can align their UI with the same
provider-owned limits used by core.
This commit is contained in:
Celia Chen
2026-04-28 18:36:19 -07:00
committed by GitHub
parent 4c39ad33cb
commit 8c47e36504
17 changed files with 317 additions and 1 deletions

View File

@@ -54,6 +54,7 @@ use codex_app_server_protocol::McpResourceReadParams;
use codex_app_server_protocol::McpServerToolCallParams;
use codex_app_server_protocol::MockExperimentalMethodParams;
use codex_app_server_protocol::ModelListParams;
use codex_app_server_protocol::ModelProviderCapabilitiesReadParams;
use codex_app_server_protocol::PluginInstallParams;
use codex_app_server_protocol::PluginListParams;
use codex_app_server_protocol::PluginReadParams;
@@ -517,6 +518,16 @@ impl McpProcess {
self.send_request("model/list", params).await
}
/// Send a `modelProvider/capabilities/read` JSON-RPC request.
pub async fn send_model_provider_capabilities_read_request(
&mut self,
params: ModelProviderCapabilitiesReadParams,
) -> anyhow::Result<i64> {
let params = Some(serde_json::to_value(params)?);
self.send_request("modelProvider/capabilities/read", params)
.await
}
/// Send an `experimentalFeature/list` JSON-RPC request.
pub async fn send_experimental_feature_list_request(
&mut self,