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:
andrea.difonzo
2026-11-17 12:39:59 +01:00
parent 7effb5ec86
commit 499ee3a939
63 changed files with 160 additions and 532 deletions

View File

@@ -38,7 +38,6 @@ struct CreateConfigTomlParams {
forced_workspace_ids: Option<Vec<String>>,
requires_openai_auth: Option<bool>,
base_url: Option<String>,
chatgpt_base_url: Option<String>,
model_provider_id: Option<String>,
extra_provider_config: Option<String>,
}
@@ -70,10 +69,6 @@ fn create_config_toml(codex_home: &Path, params: CreateConfigTomlParams) -> std:
Some(false) => String::new(),
None => String::new(),
};
let chatgpt_base_url_line = params
.chatgpt_base_url
.map(|url| format!("chatgpt_base_url = \"{url}\"\n"))
.unwrap_or_default();
let model_provider_id = params
.model_provider_id
.unwrap_or_else(|| "mock_provider".to_string());
@@ -96,7 +91,6 @@ stream_max_retries = 0
model = "mock-model"
approval_policy = "never"
sandbox_mode = "danger-full-access"
{chatgpt_base_url_line}
{forced_line}
{forced_workspace_line}
@@ -262,13 +256,7 @@ async fn startup_enforces_local_requirements_without_contacting_the_backend(
let codex_home = TempDir::new()?;
let mock_server = MockServer::start().await;
let require_mxc = "[windows]\nrequire_mxc = true\n";
create_config_toml(
codex_home.path(),
CreateConfigTomlParams {
chatgpt_base_url: Some(format!("{}/backend-api", mock_server.uri())),
..Default::default()
},
)?;
create_config_toml(codex_home.path(), CreateConfigTomlParams::default())?;
std::fs::write(
codex_home.path().join("requirements.toml"),
if local_mxc {
@@ -367,7 +355,6 @@ async fn login_account_api_key_rejected_when_forced_chatgpt() -> Result<()> {
)?;
let mut mcp = TestAppServer::builder()
.with_mock_chatgpt_backend()
.with_codex_home(codex_home.path())
.without_auto_env()
.build_initialized_with_timeout(DEFAULT_READ_TIMEOUT)