mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 13:38:31 +00:00
Enhance CodexExecutor with compact URL support
This commit is contained in:
@@ -87,10 +87,17 @@ export class CodexExecutor extends BaseExecutor {
|
||||
return headers;
|
||||
}
|
||||
|
||||
buildUrl(model, stream, urlIndex = 0, credentials = null) {
|
||||
const base = super.buildUrl(model, stream, urlIndex, credentials);
|
||||
return this._isCompact ? `${base}/compact` : base;
|
||||
}
|
||||
|
||||
/**
|
||||
* Transform request before sending - inject default instructions if missing
|
||||
*/
|
||||
transformRequest(model, body, stream, credentials) {
|
||||
this._isCompact = !!body._compact;
|
||||
delete body._compact;
|
||||
// Resolve conversation-stable session_id from input history + machineId
|
||||
this._currentSessionId = resolveConversationSessionId(body.input, cachedMachineId);
|
||||
// Convert string input to array format (Codex API requires input as array)
|
||||
|
||||
Reference in New Issue
Block a user