Eliminato chatgpt_base_url (B)
Da 24a3cfe2: via la chiave chatgpt_base_url e l'URL predefinito https://chatgpt.com/backend-api/
(la chiave resta accettata nei config e ignorata); schemi dell'app-server rigenerati.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,20 +1,3 @@
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use app_test_support::MockResponsesConfig;
|
||||
use app_test_support::TestAppServer;
|
||||
use app_test_support::create_apply_patch_sse_response;
|
||||
use app_test_support::create_command_execution_sse_response;
|
||||
use app_test_support::create_escalated_command_execution_sse_response;
|
||||
use app_test_support::create_exec_command_sse_response;
|
||||
use app_test_support::create_final_assistant_message_sse_response;
|
||||
use app_test_support::create_mock_responses_server_repeating_assistant;
|
||||
use app_test_support::create_mock_responses_server_sequence;
|
||||
use app_test_support::create_mock_responses_server_sequence_unchecked;
|
||||
use app_test_support::format_with_current_shell_display;
|
||||
use app_test_support::write_api_key_auth;
|
||||
use app_test_support::write_mock_responses_config_toml_with_chatgpt_base_url;
|
||||
use app_test_support::write_models_cache;
|
||||
use app_test_support::write_models_cache_with_models;
|
||||
use akode_app_server::INPUT_TOO_LARGE_ERROR_CODE;
|
||||
use akode_app_server::INVALID_PARAMS_ERROR_CODE;
|
||||
use akode_app_server_protocol::AdditionalContextEntry;
|
||||
@@ -85,6 +68,22 @@ use akode_protocol::openai_models::ReasoningEffort;
|
||||
use akode_protocol::protocol::MULTI_AGENT_MODE_OPEN_TAG;
|
||||
use akode_protocol::user_input::MAX_USER_INPUT_TEXT_CHARS;
|
||||
use akode_utils_absolute_path::test_support::PathExt;
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use app_test_support::MockResponsesConfig;
|
||||
use app_test_support::TestAppServer;
|
||||
use app_test_support::create_apply_patch_sse_response;
|
||||
use app_test_support::create_command_execution_sse_response;
|
||||
use app_test_support::create_escalated_command_execution_sse_response;
|
||||
use app_test_support::create_exec_command_sse_response;
|
||||
use app_test_support::create_final_assistant_message_sse_response;
|
||||
use app_test_support::create_mock_responses_server_repeating_assistant;
|
||||
use app_test_support::create_mock_responses_server_sequence;
|
||||
use app_test_support::create_mock_responses_server_sequence_unchecked;
|
||||
use app_test_support::format_with_current_shell_display;
|
||||
use app_test_support::write_api_key_auth;
|
||||
use app_test_support::write_models_cache;
|
||||
use app_test_support::write_models_cache_with_models;
|
||||
use core_test_support::mcp_test_server::CALENDAR_LIST_EVENTS_TOOL_NAME;
|
||||
use core_test_support::mcp_test_server::CALENDAR_NAMESPACE;
|
||||
use core_test_support::mcp_test_server::DIRECT_CALENDAR_LIST_EVENTS_TOOL;
|
||||
@@ -535,9 +534,7 @@ async fn turn_start_with_empty_input_runs_model_request() -> Result<()> {
|
||||
let server = create_mock_responses_server_sequence_unchecked(responses).await;
|
||||
|
||||
let codex_home = TempDir::new()?;
|
||||
MockResponsesConfig::new(&server.uri())
|
||||
.with_root_config(&format!("chatgpt_base_url = \"{}\"", server.uri()))
|
||||
.write(codex_home.path())?;
|
||||
MockResponsesConfig::new(&server.uri()).write(codex_home.path())?;
|
||||
|
||||
let mut mcp = TestAppServer::builder()
|
||||
.with_codex_home(codex_home.path())
|
||||
@@ -1473,11 +1470,7 @@ async fn turn_start_forwards_trigger_and_source_after_retry() -> Result<()> {
|
||||
.await;
|
||||
|
||||
let codex_home = TempDir::new()?;
|
||||
write_mock_responses_config_toml_with_chatgpt_base_url(
|
||||
codex_home.path(),
|
||||
&server.uri(),
|
||||
&server.uri(),
|
||||
)?;
|
||||
MockResponsesConfig::new(&server.uri()).write(codex_home.path())?;
|
||||
let config_path = codex_home.path().join("config.toml");
|
||||
let config = std::fs::read_to_string(&config_path)?
|
||||
.replace("stream_max_retries = 0", "stream_max_retries = 1");
|
||||
@@ -4022,10 +4015,7 @@ async fn turn_start_emits_spawn_agent_item_with_model_metadata_v2() -> Result<()
|
||||
let codex_home = TempDir::new()?;
|
||||
MockResponsesConfig::new(&server.uri())
|
||||
.enable_feature(Feature::Collab)
|
||||
.with_root_config(&format!(
|
||||
"chatgpt_base_url = \"{}\"\ntools.update_plan.enabled = true",
|
||||
server.uri()
|
||||
))
|
||||
.with_root_config("tools.update_plan.enabled = true")
|
||||
.write(codex_home.path())?;
|
||||
|
||||
let mut mcp = TestAppServer::builder()
|
||||
@@ -4245,7 +4235,6 @@ async fn direct_input_to_multi_agent_v2_subagent_is_rejected(
|
||||
MockResponsesConfig::new(&server.uri())
|
||||
.enable_feature(Feature::MultiAgentV2)
|
||||
.enable_feature(Feature::Goals)
|
||||
.with_root_config(&format!("chatgpt_base_url = \"{}\"", server.uri()))
|
||||
.write(codex_home.path())?;
|
||||
write_models_cache(codex_home.path()).await?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user