mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-17 15:34:54 +00:00
core: the four test literals that have failed three releases
alt_env_keys was added to ModelProviderInfo so a sandbox run can present a machine credential instead of a human session. Three construction sites were updated. These four are in TEST targets, and `cargo check` does not compile those — so it printed nothing, I read nothing as clean, and every release since has died in preflight on E0063. A check that cannot see test targets cannot clear a change to a public struct: literals must name every field, so ADDING one breaks every construction in the workspace, including those only `cargo test --no-run` compiles. Vec::new() rather than a Default on the struct — a #[serde(default)] field still has to be written in a literal, and a Default would let the next new field land silently in tests that should have been made to state it.
This commit is contained in:
@@ -44,7 +44,9 @@ fn remote_model(slug: &str, display: &str, priority: i32) -> ModelInfo {
|
||||
}
|
||||
|
||||
fn provider_for(base_url: String) -> ModelProviderInfo {
|
||||
alt_env_keys: Vec::new(),
|
||||
ModelProviderInfo {
|
||||
alt_env_keys: Vec::new(),
|
||||
name: "mock".into(),
|
||||
base_url: Some(base_url),
|
||||
env_key: None,
|
||||
|
||||
@@ -120,6 +120,7 @@ async fn repeated_identical_tool_cycle_stops_with_visible_error() {
|
||||
config.approval_policy = AskForApproval::Never;
|
||||
config.sandbox_policy = SandboxPolicy::DangerFullAccess;
|
||||
config.model_provider = ModelProviderInfo {
|
||||
alt_env_keys: Vec::new(),
|
||||
base_url: Some(format!("{}/v1", server.uri())),
|
||||
..built_in_model_providers(None)["openai"].clone()
|
||||
};
|
||||
|
||||
@@ -78,6 +78,7 @@ fn configure_test(
|
||||
config.sandbox_policy = SandboxPolicy::DangerFullAccess;
|
||||
config.project_hooks = ProjectHooks::from_configs(&hook_configs, &config.cwd);
|
||||
config.model_provider = ModelProviderInfo {
|
||||
alt_env_keys: Vec::new(),
|
||||
base_url: Some(format!("{}/v1", server.uri())),
|
||||
..built_in_model_providers(None)["openai"].clone()
|
||||
};
|
||||
|
||||
@@ -48,6 +48,7 @@ async fn collect_tool_identifiers_for_model(model: &str) -> Vec<String> {
|
||||
let resp_mock = mount_sse_once(&server, sse).await;
|
||||
|
||||
let model_provider = ModelProviderInfo {
|
||||
alt_env_keys: Vec::new(),
|
||||
base_url: Some(format!("{}/v1", server.uri())),
|
||||
..built_in_model_providers(None)["openai"].clone()
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user