WIP fase 2b-3: rimozione sottosistemi solo-ChatGPT (plugin remoti, image gen, daybreak, cyber, attestation, cloud config, app/connettori) - test in corso
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -27,6 +27,7 @@ pub use json_logging::app_server_json_shutdown_event;
|
||||
pub use mock_model_server::create_mock_responses_server_repeating_assistant;
|
||||
pub use mock_model_server::create_mock_responses_server_sequence;
|
||||
pub use mock_model_server::create_mock_responses_server_sequence_unchecked;
|
||||
pub use models_cache::write_model_catalog_json;
|
||||
pub use models_cache::write_models_cache;
|
||||
pub use models_cache::write_models_cache_with_models;
|
||||
pub use responses::create_apply_patch_sse_response;
|
||||
|
||||
@@ -28,7 +28,6 @@ fn preset_to_info(preset: &ModelPreset, priority: i32) -> ModelInfo {
|
||||
additional_speed_tiers: preset.additional_speed_tiers.clone(),
|
||||
service_tiers: preset.service_tiers.clone(),
|
||||
default_service_tier: preset.default_service_tier.clone(),
|
||||
available_access_programs: preset.available_access_programs.clone(),
|
||||
upgrade: preset.upgrade.as_ref().map(Into::into),
|
||||
model_messages: Some(ModelMessages {
|
||||
apps: None,
|
||||
@@ -131,3 +130,24 @@ pub async fn write_models_cache_with_models(
|
||||
let cache_path = codex_home.join("models_cache.json");
|
||||
std::fs::write(cache_path, serde_json::to_string_pretty(&cache)?)
|
||||
}
|
||||
|
||||
/// Write `models` as a `model_catalog_json` catalog and point `config.toml` at it.
|
||||
///
|
||||
/// API-key sessions without a provider model catalog URL never read `models_cache.json`, so
|
||||
/// tests that pair specific model metadata with API-key auth configure the catalog directly.
|
||||
pub fn write_model_catalog_json(codex_home: &Path, models: Vec<ModelInfo>) -> std::io::Result<()> {
|
||||
let catalog_path = codex_home.join("models.json");
|
||||
std::fs::write(
|
||||
&catalog_path,
|
||||
serde_json::to_string_pretty(&serde_json::json!({ "models": models }))?,
|
||||
)?;
|
||||
let config_path = codex_home.join("config.toml");
|
||||
let config = std::fs::read_to_string(&config_path)?;
|
||||
std::fs::write(
|
||||
&config_path,
|
||||
format!(
|
||||
"model_catalog_json = {}\n{config}",
|
||||
serde_json::to_string(&catalog_path)?
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -15,9 +15,6 @@ use tokio::process::ChildStdout;
|
||||
|
||||
use anyhow::Context;
|
||||
use anyhow::ensure;
|
||||
use codex_app_server_protocol::AppsInstalledParams;
|
||||
use codex_app_server_protocol::AppsListParams;
|
||||
use codex_app_server_protocol::AppsReadParams;
|
||||
use codex_app_server_protocol::CancelLoginAccountParams;
|
||||
use codex_app_server_protocol::ClientInfo;
|
||||
use codex_app_server_protocol::ClientNotification;
|
||||
@@ -68,7 +65,6 @@ use codex_app_server_protocol::PluginInstalledParams;
|
||||
use codex_app_server_protocol::PluginListParams;
|
||||
use codex_app_server_protocol::PluginReadParams;
|
||||
use codex_app_server_protocol::PluginSearchParams;
|
||||
use codex_app_server_protocol::PluginSkillReadParams;
|
||||
use codex_app_server_protocol::PluginUninstallParams;
|
||||
use codex_app_server_protocol::ProcessKillParams;
|
||||
use codex_app_server_protocol::ProcessSpawnParams;
|
||||
@@ -855,27 +851,6 @@ impl TestAppServer {
|
||||
.await
|
||||
}
|
||||
|
||||
/// Send an `app/list` JSON-RPC request.
|
||||
pub async fn send_apps_list_request(&mut self, params: AppsListParams) -> anyhow::Result<i64> {
|
||||
let params = Some(serde_json::to_value(params)?);
|
||||
self.send_request("app/list", params).await
|
||||
}
|
||||
|
||||
/// Send an `app/installed` JSON-RPC request.
|
||||
pub async fn send_apps_installed_request(
|
||||
&mut self,
|
||||
params: AppsInstalledParams,
|
||||
) -> anyhow::Result<i64> {
|
||||
let params = Some(serde_json::to_value(params)?);
|
||||
self.send_request("app/installed", params).await
|
||||
}
|
||||
|
||||
/// Send an `app/read` JSON-RPC request.
|
||||
pub async fn send_apps_read_request(&mut self, params: AppsReadParams) -> anyhow::Result<i64> {
|
||||
let params = Some(serde_json::to_value(params)?);
|
||||
self.send_request("app/read", params).await
|
||||
}
|
||||
|
||||
/// Send an `mcpServer/resource/read` JSON-RPC request.
|
||||
pub async fn send_mcp_resource_read_request(
|
||||
&mut self,
|
||||
@@ -1002,15 +977,6 @@ impl TestAppServer {
|
||||
self.send_request("plugin/read", params).await
|
||||
}
|
||||
|
||||
/// Send a `plugin/skill/read` JSON-RPC request.
|
||||
pub async fn send_plugin_skill_read_request(
|
||||
&mut self,
|
||||
params: PluginSkillReadParams,
|
||||
) -> anyhow::Result<i64> {
|
||||
let params = Some(serde_json::to_value(params)?);
|
||||
self.send_request("plugin/skill/read", params).await
|
||||
}
|
||||
|
||||
/// Send an `mcpServerStatus/list` JSON-RPC request.
|
||||
pub async fn send_list_mcp_server_status_request(
|
||||
&mut self,
|
||||
|
||||
Reference in New Issue
Block a user