diff --git a/Cargo.lock b/Cargo.lock index eb723bb..ed9b3c9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -285,7 +285,7 @@ checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" [[package]] name = "cortiq-gateway" -version = "0.2.12" +version = "0.2.13" dependencies = [ "anyhow", "arc-swap", diff --git a/Cargo.toml b/Cargo.toml index af46ef4..3ab2c49 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cortiq-gateway" -version = "0.2.12" +version = "0.2.13" edition = "2021" rust-version = "1.75" license = "Apache-2.0" diff --git a/web/js/i18n/en.js b/web/js/i18n/en.js index a712429..e5b7731 100644 --- a/web/js/i18n/en.js +++ b/web/js/i18n/en.js @@ -316,6 +316,10 @@ export default { "settings.route.maxChars": "Max chars", "settings.route.cacheTtl": "Cache TTL", "settings.route.profile": "Default profile", + "settings.route.strategyHelp": "What text is sent to the router for classification: last_user = only the last user message; last_user_plus_system = last user message + system prompt; concat_all = the whole conversation.", + "settings.route.maxCharsHelp": "Max characters of that text sent to the router (longer is truncated). More = more accurate classification, but slower/pricier router calls.", + "settings.route.cacheTtlHelp": "How long a routing decision is cached for an identical request before the router is asked again (e.g. 60s, 5m).", + "settings.route.profileHelp": "Default routing profile when a request doesn't specify one: cost-saver (cheapest), balanced, or quality-first (best model). Biases which model the router picks.", "settings.breaker": "Circuit breaker", "settings.breaker.threshold": "Error threshold", "settings.breaker.cooldown": "Cooldown", diff --git a/web/js/i18n/ru.js b/web/js/i18n/ru.js index 2549b40..08091a7 100644 --- a/web/js/i18n/ru.js +++ b/web/js/i18n/ru.js @@ -315,6 +315,10 @@ export default { "settings.route.maxChars": "Макс. символов", "settings.route.cacheTtl": "TTL кэша", "settings.route.profile": "Профиль по умолчанию", + "settings.route.strategyHelp": "Какой текст отправляется роутеру для классификации: last_user — только последнее сообщение пользователя; last_user_plus_system — последнее сообщение + системный промпт; concat_all — вся переписка.", + "settings.route.maxCharsHelp": "Максимум символов этого текста, отправляемого роутеру (длиннее — обрезается). Больше = точнее классификация, но медленнее/дороже вызовы роутера.", + "settings.route.cacheTtlHelp": "Сколько кэшируется решение роутинга для одинакового запроса, прежде чем роутер спрашивается снова (напр. 60s, 5m).", + "settings.route.profileHelp": "Профиль роутинга по умолчанию, если запрос его не задаёт: cost-saver (дешевле), balanced (баланс) или quality-first (качество). Влияет на выбор модели роутером.", "settings.breaker": "Автоматический выключатель", "settings.breaker.threshold": "Порог ошибок", "settings.breaker.cooldown": "Время восстановления", diff --git a/web/js/views/settings.js b/web/js/views/settings.js index d793cab..55827aa 100644 --- a/web/js/views/settings.js +++ b/web/js/views/settings.js @@ -442,9 +442,11 @@ export async function renderSettings() { "div", { class: "card" }, h("div", { class: "card-head" }, h("h3", {}, t("settings.route"))), - field(t("settings.route.strategy"), strategySel), - h("div", { class: "row" }, field(t("settings.route.maxChars"), maxChars), field(t("settings.route.cacheTtl"), cacheTtl)), - field(t("settings.route.profile"), profileSel) + field(t("settings.route.strategy"), strategySel, null, t("settings.route.strategyHelp")), + h("div", { class: "row" }, + field(t("settings.route.maxChars"), maxChars, null, t("settings.route.maxCharsHelp")), + field(t("settings.route.cacheTtl"), cacheTtl, null, t("settings.route.cacheTtlHelp"))), + field(t("settings.route.profile"), profileSel, null, t("settings.route.profileHelp")) ), h( "div",