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:
andrea.difonzo
2026-11-10 16:07:22 +01:00
parent 231e8cd136
commit 5afc7e9f7f
1223 changed files with 6225 additions and 113722 deletions

View File

@@ -425,7 +425,7 @@ async fn remote_models_get_model_info_uses_longest_matching_prefix() -> Result<(
let codex_home = TempDir::new()?;
let config = load_default_config_for_test(&codex_home).await;
let auth = CodexAuth::from_api_key("Test API Key");
let auth = core_test_support::test_codex::header_auth_for_testing();
let provider = ModelProviderInfo {
base_url: Some(format!("{}/v1", server.uri())),
..built_in_model_providers(/* openai_base_url */ /*openai_base_url*/ None)["openai"].clone()
@@ -485,7 +485,7 @@ async fn remote_models_config_context_window_override_clamps_to_max_context_wind
.await;
let TestCodex { codex, .. } = test_codex()
.with_catalog_discovery_api_key()
.with_header_auth()
.with_config(|config| {
config.model = Some(requested_model.to_string());
config.model_context_window = Some(1_000_000);
@@ -546,7 +546,7 @@ async fn remote_models_config_override_above_max_uses_max_context_window() -> Re
.await;
let TestCodex { codex, .. } = test_codex()
.with_catalog_discovery_api_key()
.with_header_auth()
.with_config(|config| {
config.model = Some(requested_model.to_string());
config.model_context_window = Some(500_000);
@@ -607,7 +607,7 @@ async fn remote_models_use_context_window_when_config_override_is_absent() -> Re
.await;
let TestCodex { codex, .. } = test_codex()
.with_catalog_discovery_api_key()
.with_header_auth()
.with_config(|config| {
config.model = Some(requested_model.to_string());
})
@@ -694,7 +694,7 @@ async fn remote_models_long_model_slug_is_sent_with_supported_reasoning(
.await;
let TestCodex { codex, .. } = test_codex()
.with_catalog_discovery_api_key()
.with_header_auth()
.with_config(|config| {
config.model = Some(requested_model.to_string());
config.developer_instructions = Some(developer_instructions.to_string());
@@ -841,7 +841,6 @@ async fn remote_models_remote_model_uses_unified_exec() -> Result<()> {
additional_speed_tiers: Vec::new(),
service_tiers: Vec::new(),
default_service_tier: None,
available_access_programs: None,
upgrade: None,
model_messages: None,
include_skills_usage_instructions: false,
@@ -1072,7 +1071,6 @@ async fn remote_models_truncation_policy_with_tool_output_override() -> Result<(
Ok(())
}
#[test_case(CodexAuth::from_api_key("Test API Key"); "chatgpt")]
#[test_case(CodexAuth::from_api_key("test-api-key"); "api key")]
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn remote_models_apply_legacy_instructions(auth: CodexAuth) -> Result<()> {
@@ -1116,7 +1114,6 @@ async fn remote_models_apply_legacy_instructions(auth: CodexAuth) -> Result<()>
additional_speed_tiers: Vec::new(),
service_tiers: Vec::new(),
default_service_tier: None,
available_access_programs: None,
upgrade: None,
model_messages: Some(ModelMessages {
instructions_template: Some(remote_instructions.to_string()),
@@ -1289,7 +1286,7 @@ async fn remote_models_do_not_append_removed_builtin_presets() -> Result<()> {
let codex_home = TempDir::new()?;
let auth = CodexAuth::from_api_key("Test API Key");
let auth = core_test_support::test_codex::header_auth_for_testing();
let provider = ModelProviderInfo {
base_url: Some(format!("{}/v1", server.uri())),
..built_in_model_providers(/* openai_base_url */ /*openai_base_url*/ None)["openai"].clone()
@@ -1355,7 +1352,7 @@ async fn remote_models_merge_adds_new_high_priority_first() -> Result<()> {
let codex_home = TempDir::new()?;
let auth = CodexAuth::from_api_key("Test API Key");
let auth = core_test_support::test_codex::header_auth_for_testing();
let provider = ModelProviderInfo {
base_url: Some(format!("{}/v1", server.uri())),
..built_in_model_providers(/* openai_base_url */ /*openai_base_url*/ None)["openai"].clone()
@@ -1407,7 +1404,7 @@ async fn remote_models_merge_replaces_overlapping_model() -> Result<()> {
let codex_home = TempDir::new()?;
let auth = CodexAuth::from_api_key("Test API Key");
let auth = core_test_support::test_codex::header_auth_for_testing();
let provider = ModelProviderInfo {
base_url: Some(format!("{}/v1", server.uri())),
..built_in_model_providers(/* openai_base_url */ /*openai_base_url*/ None)["openai"].clone()
@@ -1456,7 +1453,7 @@ async fn remote_models_merge_preserves_bundled_models_on_empty_response() -> Res
let codex_home = TempDir::new()?;
let auth = CodexAuth::from_api_key("Test API Key");
let auth = core_test_support::test_codex::header_auth_for_testing();
let provider = ModelProviderInfo {
base_url: Some(format!("{}/v1", server.uri())),
..built_in_model_providers(/* openai_base_url */ /*openai_base_url*/ None)["openai"].clone()
@@ -1503,7 +1500,7 @@ async fn remote_models_request_times_out_after_5s() -> Result<()> {
let codex_home = TempDir::new()?;
let auth = CodexAuth::from_api_key("Test API Key");
let auth = core_test_support::test_codex::header_auth_for_testing();
let provider = ModelProviderInfo {
base_url: Some(format!("{}/v1", server.uri())),
..built_in_model_providers(/* openai_base_url */ /*openai_base_url*/ None)["openai"].clone()
@@ -1578,7 +1575,7 @@ async fn remote_models_hide_picker_only_models() -> Result<()> {
let codex_home = TempDir::new()?;
let auth = CodexAuth::from_api_key("Test API Key");
let auth = core_test_support::test_codex::header_auth_for_testing();
let provider = ModelProviderInfo {
base_url: Some(format!("{}/v1", server.uri())),
..built_in_model_providers(/* openai_base_url */ /*openai_base_url*/ None)["openai"].clone()
@@ -1705,7 +1702,6 @@ fn test_remote_model_with_policy(
additional_speed_tiers: Vec::new(),
service_tiers: Vec::new(),
default_service_tier: None,
available_access_programs: None,
upgrade: None,
model_messages: None,
include_skills_usage_instructions: false,