Skip to content

An agent-managed museum exhibit, built in Rust with Gajae-Code / LazyCodex — developed and maintained with no human intervention.

Rust

Merge pull request #3341 from ultraworkers/fix/rebase-on-main

Bellman734558eb3137
diff --cc rust/crates/rusty-claude-cli/src/main.rs
index be461422,02edbaf3..6193030c
--- a/rust/crates/rusty-claude-cli/src/main.rs
+++ b/rust/crates/rusty-claude-cli/src/main.rs
@@@ -19720,46 -20001,12 +20019,50 @@@ UU conflicted.rs"
"explicit OpenAI model prefix must override persisted DashScope configuration, got {other:?}"
),
}
+
+ if let Some(value) = old_openai_base_url {
+ std::env::set_var("OPENAI_BASE_URL", value);
+ }
}
+ #[test]
+ fn persisted_custom_openai_configuration_survives_runtime_boundary() {
+ let config_home = temp_dir();
+ let workspace = temp_dir();
+ fs::create_dir_all(&config_home).expect("config home");
+ fs::create_dir_all(&workspace).expect("workspace");
+ fs::write(
+ config_home.join("settings.json"),
+ r#"{
+ "provider": {
+ "kind": "custom-openai",
+ "apiKey": "custom-test-key",
+ "baseUrl": "https://custom.example/v1",
+ "model": "local-model"
+ },
+ "model": "local-model"
+ }"#,
+ )
+ .expect("write provider settings");
+
+ let loader = ConfigLoader::new(&workspace, &config_home);
+ let runtime_config = loader.load().expect("runtime config should load");
+ let provider_config = super::provider_config_from_runtime(runtime_config.provider())
+ .expect("custom provider configuration should adapt")
+ .expect("persisted provider configuration should be present");
+
+ assert_eq!(provider_config.kind, api::ProviderConfigKind::CustomOpenAi);
+ assert_eq!(provider_config.model, "local-model");
+ assert_eq!(provider_config.api_key.as_deref(), Some("custom-test-key"));
+ assert_eq!(
+ provider_config.base_url.as_deref(),
+ Some("https://custom.example/v1")
+ );
+
+ let _ = fs::remove_dir_all(config_home);
+ let _ = fs::remove_dir_all(workspace);
+ }
+
#[test]
fn persisted_provider_configuration_controls_runtime_provider_dispatch() {
let config_home = temp_dir();