use std::path::{Path, PathBuf};
use aha::models::{
ArtifactKind, GenerateModel, LoadSpec, ModelPaths, WhichModel,
qwen3_5::generate::Qwen3_5GenerateModel,
};
use aha_openai_dive::v1::resources::chat::ChatCompletionParameters;
use anyhow::Result;
const DEFAULT_QWEN3_5_SAFETENSORS_DIR: &str = r"D:\model_download\Qwen3.5-0.8B";
#[cfg(feature = "onnx-runtime")]
const DEFAULT_QWEN3_5_ONNX_DIR: &str = r"D:\model_download\Qwen3.5-0.8B-ONNX";
const DEFAULT_QWEN3_5_GGUF_DIRS: &[&str] = &[
r"D:\model_download\Qwen3.5-0.8B-GGUF",
r"D:\model_download\Qwen3.5-0.8B-gguf",
r"D:\model_download\Qwen3.5-2B-GGUF",
r"D:\model_download\Qwen3.5-4B-GGUF",
];
fn env_or_default(key: &str, default: &str) -> String {
std::env::var(key).unwrap_or_else(|_| default.to_string())
}
fn existing_dir(path: &str) -> bool {
let p = Path::new(path);
p.exists() && p.is_dir()
}
fn first_file_with_extension_recursive(dir: &str, extension: &str) -> Result