🏞️ fix: Gemini Image Filenames and Add Tool Cache Safety (#11306)

* 🔧 fix: Handle undefined tool definitions in agent and assistant creation (#11295)

* Updated the tool fetching logic in createAgentHandler, createAssistant, and patchAssistant functions to use nullish coalescing, ensuring that an empty object is returned if no tools are available. This change improves robustness against undefined values in tool definitions across multiple controller files.

* Adjusted the ToolService to maintain consistency in tool definition handling.

* 🔧 fix: Update filename generation in createToolEndCallback function

* Modified the filename generation logic to remove the tool_call_id from the filename, simplifying the naming convention for saved images. This change enhances clarity and consistency in the generated filenames.
This commit is contained in:
Danny Avila 2026-01-12 09:01:23 -05:00 committed by GitHub
parent 2958fcd0c5
commit cdffdd2926
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 7 additions and 7 deletions

View file

@ -79,7 +79,7 @@ async function processRequiredActions(client, requiredActions) {
requiredActions,
);
const appConfig = client.req.config;
const toolDefinitions = await getCachedTools();
const toolDefinitions = (await getCachedTools()) ?? {};
const seenToolkits = new Set();
const tools = requiredActions
.map((action) => {