feat: add provider in-flight request limits

This commit is contained in:
Brit
2026-06-22 02:11:41 +02:00
parent 24a0c8428a
commit b1deca6606
17 changed files with 1145 additions and 32 deletions
@@ -16,6 +16,7 @@ import {
Settings,
type SettingValue,
settings,
validateProviderMaxInFlightRequests,
} from "../config/settings";
import { SETTINGS_SCHEMA } from "../config/settings-schema";
import { theme } from "../modes/theme/theme";
@@ -218,6 +219,9 @@ function parseAndSetValue(path: SettingPath, rawValue: string): void {
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) {
throw new Error(`Invalid record JSON: ${rawValue}`);
}
if (path === "providers.maxInFlightRequests") {
parsed = validateProviderMaxInFlightRequests(parsed);
}
parsedValue = parsed;
break;
}