- Cap maximum cooldown for rate limit handling in account unavailability and single-model chat flows
- Dynamic custom model fetching for model selection
This commit is contained in:
@@ -71,12 +71,12 @@ function stripContentTypes(body, stripList = []) {
|
||||
}
|
||||
|
||||
// Translate request: source -> openai -> target
|
||||
export function translateRequest(sourceFormat, targetFormat, model, body, stream = true, credentials = null, provider = null, reqLogger = null, stripList = [], connectionId = null) {
|
||||
export function translateRequest(sourceFormat, targetFormat, model, body, stream = true, credentials = null, provider = null, reqLogger = null, stripList = [], connectionId = null, rtkEnabled = false) {
|
||||
ensureInitialized();
|
||||
let result = body;
|
||||
|
||||
// RTK: compress tool_result content before any translation (shape-agnostic)
|
||||
const rtkStats = compressMessages(result);
|
||||
const rtkStats = compressMessages(result, rtkEnabled);
|
||||
if (rtkStats) {
|
||||
const line = formatRtkLog(rtkStats);
|
||||
if (line) console.log(line);
|
||||
|
||||
Reference in New Issue
Block a user