Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
5d3e3e7
Merge pull request #87 from SmythOS/dev
alaa-eddine-k Aug 10, 2025
d1955b0
Merge pull request #90 from SmythOS/dev
alaa-eddine-k Aug 12, 2025
4f89bf7
Merge pull request #92 from SmythOS/dev
zubairirfan96 Aug 15, 2025
7f80182
remove extraneous comment
ingrid-wu Aug 17, 2025
a1bd8b8
Merge pull request #95 from SmythOS/dev
zubairirfan96 Aug 20, 2025
ade23c9
Merge pull request #98 from SmythOS/dev
alaa-eddine-k Aug 27, 2025
b02bd6d
Merge pull request #99 from SmythOS/dev
alaa-eddine-k Aug 28, 2025
33a5a4c
Merge pull request #93 from SmythOS/ingrid-wu-patch-1
alaa-eddine-k Aug 28, 2025
e56cb0c
Merge pull request #100 from SmythOS/dev
alaa-eddine-k Aug 28, 2025
82f30b3
Merge pull request #103 from SmythOS/dev
alaa-eddine-k Aug 29, 2025
653b7ad
Merge pull request #105 from SmythOS/dev
zubairirfan96 Aug 29, 2025
20a5c29
Merge pull request #112 from SmythOS/dev
alaa-eddine-k Sep 2, 2025
6aa741f
Merge pull request #113 from SmythOS/dev
alaa-eddine-k Sep 2, 2025
7cf6fc7
Merge pull request #114 from SmythOS/dev
alaa-eddine-k Sep 2, 2025
f187010
Merge pull request #116 from SmythOS/dev
alaa-eddine-k Sep 4, 2025
48f7cc1
Merge pull request #118 from SmythOS/dev
alaa-eddine-k Sep 5, 2025
04a2399
Merge pull request #119 from SmythOS/dev
alaa-eddine-k Sep 5, 2025
75b6b23
Merge pull request #120 from SmythOS/dev
alaa-eddine-k Sep 5, 2025
28cded3
Merge pull request #121 from SmythOS/dev
alaa-eddine-k Sep 5, 2025
a60550a
Merge pull request #122 from SmythOS/dev
alaa-eddine-k Sep 5, 2025
7d92b58
core(openai): map temperature/top_p for Responses API; align ChatComp…
thekavishshah Sep 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/10-custom-sre-config/01-custom-models.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SRE } from '@smythos/sre'; //Since we'ill
import { SRE } from '@smythos/sre';
import { Agent } from '@smythos/sdk';
import path from 'path';
import { fileURLToPath } from 'url';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ export class ChatCompletionsApiInterface extends OpenAIApiInterface {
function: {
name: tool.name,
description: tool.description,
parameters: tool.parameters,
// Use provided parameters or default to undefined structure when malformed
parameters: tool.parameters ?? { type: 'object', properties: undefined, required: undefined },
},
};
}
Expand All @@ -205,8 +206,13 @@ export class ChatCompletionsApiInterface extends OpenAIApiInterface {
description: tool.description,
parameters: {
type: 'object',
properties: tool.properties || {},
required: tool.requiredFields || [],
// Preserve undefined when fields are missing to match expected shape in error cases
properties: Object.prototype.hasOwnProperty.call(tool, 'properties') ? (tool as any).properties : undefined,
required: Object.prototype.hasOwnProperty.call(tool, 'requiredFields')
? (tool as any).requiredFields
: Object.prototype.hasOwnProperty.call(tool, 'required')
? (tool as any).required
: undefined,
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,13 @@ export class ResponsesApiInterface extends OpenAIApiInterface {
if (params?.maxTokens !== undefined) {
body.max_output_tokens = params.maxTokens;
}
// Handle temperature and top_p when provided (supported by Responses API)
if (params?.temperature !== undefined) {
(body as any).temperature = params.temperature;
}
if (params?.topP !== undefined) {
(body as any).top_p = params.topP;
}
// #region GPT 5 specific fields

const isGPT5ReasoningModels = params.modelEntryName?.includes('gpt-5') && params?.capabilities?.reasoning;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ export class JSONFileVault extends VaultConnector {
this.shared = _settings.shared || ''; //if config.shared, all keys are accessible to all teams, and they are set under the 'shared' teamId

this.vaultFile = this.findVaultFile(_settings.file);
// Safely load vault data only if a valid path is available
this.fetchVaultData(this.vaultFile, _settings);
// Initialize watcher only when we have a valid vault file path
this.initFileWatcher();
}

Expand Down Expand Up @@ -158,6 +160,11 @@ export class JSONFileVault extends VaultConnector {
}

private fetchVaultData(vaultFile: string, _settings: JSONFileVaultConfig) {
if (!vaultFile) {
this.vaultData = {};
return;
}

if (fs.existsSync(vaultFile)) {
try {
if (_settings.fileKey && fs.existsSync(_settings.fileKey)) {
Expand Down Expand Up @@ -201,13 +208,18 @@ export class JSONFileVault extends VaultConnector {
}

private initFileWatcher() {
// Do not initialize a watcher if there is no vault file path
if (!this.vaultFile) {
return;
}

this.watcher = chokidar.watch(this.vaultFile, {
persistent: false, // Don't keep the process running
ignoreInitial: true,
});

this.watcher.on('change', () => {
this.fetchVaultData(this.vaultFile, this._settings);
this.fetchVaultData(this.vaultFile as string, this._settings);
});
}

Expand Down