fix: extend invalid-model hint for qwen prefix to mention local Ollama path
When users type bare qwen model names (e.g., qwen3.5:9b), the validator already suggested qwen/ prefix for DashScope. Now it also documents the local Ollama path: use openai/ prefix with OPENAI_BASE_URL and OPENAI_API_KEY=ollama. This addresses the confusion observed when debugging Ollama integration after the upstream merge, where users might follow the DashScope hint but actually want to run models locally via Ollama.
This commit is contained in:
parent
eaa2e320d9
commit
d1b9e4598c
|
|
@ -2943,6 +2943,11 @@ fn validate_model_syntax(model: &str) -> Result<(), String> {
|
|||
err_msg.push_str("\nDid you mean `qwen/");
|
||||
err_msg.push_str(trimmed);
|
||||
err_msg.push_str("`? (Requires DASHSCOPE_API_KEY env var)");
|
||||
err_msg.push_str("\nOr for a local Ollama server: use `openai/");
|
||||
err_msg.push_str(trimmed);
|
||||
err_msg.push_str(
|
||||
"` with OPENAI_BASE_URL=http://127.0.0.1:11434/v1 and OPENAI_API_KEY=ollama",
|
||||
);
|
||||
} else if trimmed.starts_with("grok") {
|
||||
err_msg.push_str("\nDid you mean `xai/");
|
||||
err_msg.push_str(trimmed);
|
||||
|
|
|
|||
Loading…
Reference in New Issue