Feature/provider config (#570)

New Features
- Automatic provider failover & rotation across multiple provider URLs with a provider:// scheme and capped retries
- Configurable failover redirect patterns to influence retry/failover behavior
UI

- New interface to view and edit failover redirect patterns in reverse proxy configuration

- Expanded docs covering Provider Failover & Rotation and enriched messaging templating
Reliability

- Improved URL resolution, error reporting and logging for more robust provider handling
This commit is contained in:
euzu
2026-02-10 11:53:42 +01:00
committed by GitHub
parent 74d84dfda8
commit 555bc2cce1
24 changed files with 1006 additions and 188 deletions
+9 -2
View File
@@ -14,8 +14,15 @@ macro_rules! get_errors_notify_message {
.map(|err| err.message.as_str())
.collect::<Vec<&str>>()
.join("\r\n");
if $size > 0 && text.len() > std::cmp::max($size - 3, 3) {
Some(format!("{}...", text.get(0..$size).unwrap()))
let max_size = $size;
// Check if we actually need to truncate
if max_size > 0 && text.chars().count() > max_size {
// Safely take 'max_size' characters and add ellipsis
let truncated: String = text.chars().take(max_size).collect();
Some(format!("{}...", truncated))
} else if text.is_empty() {
None
} else {
Some(text)
}