Skip to content

Commit 966b731

Browse files
author
Paul C
committed
fix: persist OpenRouter API key on save + bump v16.19.0
The ai_save_config handler was missing the openrouter_api_key field, so the key was never written to disk. Added the missing block.
1 parent ffee5c7 commit 966b731

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "wolfstack"
3-
version = "16.18.0"
3+
version = "16.19.0"
44
edition = "2024"
55
authors = ["Wolf Software Systems Ltd"]
66
description = "Server management platform for the Wolf software suite"

src/api/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4842,6 +4842,11 @@ pub async fn ai_save_config(
48424842
config.gemini_api_key = v.to_string();
48434843
}
48444844
}
4845+
if let Some(v) = body.get("openrouter_api_key").and_then(|v| v.as_str()) {
4846+
if !v.contains("••••") && !v.is_empty() {
4847+
config.openrouter_api_key = v.to_string();
4848+
}
4849+
}
48454850
if let Some(v) = body.get("model").and_then(|v| v.as_str()) {
48464851
config.model = v.to_string();
48474852
}

0 commit comments

Comments
 (0)