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

@@ -13776,19 +13776,12 @@ exclude_slash_tmp = true
Ok(())
}
#[test_case::test_case("https://managed.example/backend-api/"; "custom")]
#[tokio::test]
async fn config_applies_managed_auth_store_and_chatgpt_base_url(
managed_url: &str,
) -> std::io::Result<()> {
async fn config_applies_managed_auth_store() -> std::io::Result<()> {
let codex_home = TempDir::new()?;
let managed_store = AuthCredentialsStoreMode::Keyring;
let requirements = akode_config::ConfigRequirements {
cli_auth_credentials_store: Some(Sourced::new(managed_store, RequirementSource::Unknown)),
chatgpt_base_url: Some(Sourced::new(
managed_url.to_string(),
RequirementSource::Unknown,
)),
..Default::default()
};
let config_layer_stack = ConfigLayerStack::new(
@@ -13801,7 +13794,6 @@ async fn config_applies_managed_auth_store_and_chatgpt_base_url(
LOCAL_FS.as_ref(),
ConfigToml {
cli_auth_credentials_store: Some(AuthCredentialsStoreMode::File),
chatgpt_base_url: Some("https://user.example/backend-api/".to_string()),
..Default::default()
},
ConfigOverrides {
@@ -13814,14 +13806,9 @@ async fn config_applies_managed_auth_store_and_chatgpt_base_url(
.await?;
assert_eq!(config.cli_auth_credentials_store_mode, managed_store);
assert_eq!(config.chatgpt_base_url, managed_url);
assert!(config.chatgpt_base_url_is_explicit);
assert!(config.startup_warnings.iter().any(|warning| {
warning.contains("Configured value for `cli_auth_credentials_store` is overridden")
}));
assert!(config.startup_warnings.iter().any(|warning| {
warning.contains("Configured value for `chatgpt_base_url` is overridden")
}));
Ok(())
}