mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
fix(codex): prevent unexpected protocol leakage and fabricated instructions on bare chat completion requests without tools (#1686)
This commit is contained in:
@@ -1002,9 +1002,11 @@ export class CodexExecutor extends BaseExecutor {
|
||||
!body.instructions ||
|
||||
(typeof body.instructions === "string" && body.instructions.trim() === "")
|
||||
) {
|
||||
body.instructions = hasTools
|
||||
? CODEX_DEFAULT_INSTRUCTIONS
|
||||
: "You are a helpful AI assistant.";
|
||||
if (hasTools) {
|
||||
body.instructions = CODEX_DEFAULT_INSTRUCTIONS;
|
||||
} else {
|
||||
delete body.instructions;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user