mirror of
https://github.com/openai/codex.git
synced 2026-05-03 10:56:37 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user