Feat : Tailscale
This commit is contained in:
parent
838d9a7a04
commit
ed17a8ffac
18 changed files with 1433 additions and 388 deletions
|
|
@ -103,6 +103,20 @@ export class GithubExecutor extends BaseExecutor {
|
|||
return sanitized;
|
||||
}
|
||||
|
||||
// Newer OpenAI models (gpt-5+, o1, o3, o4) require max_completion_tokens instead of max_tokens
|
||||
requiresMaxCompletionTokens(model) {
|
||||
return /gpt-5|o[134]-/i.test(model);
|
||||
}
|
||||
|
||||
transformRequest(model, body, stream, credentials) {
|
||||
const transformed = { ...body };
|
||||
if (this.requiresMaxCompletionTokens(model) && transformed.max_tokens !== undefined) {
|
||||
transformed.max_completion_tokens = transformed.max_tokens;
|
||||
delete transformed.max_tokens;
|
||||
}
|
||||
return transformed;
|
||||
}
|
||||
|
||||
async execute(options) {
|
||||
const { model, log } = options;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue