You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #71 added Code Interpreter support for OpenAI in the Chat class: activation through enableCodeInterpreter(containerId?), OpenAI payload construction, generated-file metadata extraction, container file download support, and public helper methods.
The goal is to extend the same capability to Gemini so that Gemini-based chat workflows can also execute code and expose generated artifacts where the Gemini API supports it.
Goal
Add Code Interpreter support for Gemini while keeping the existing public Chat API as consistent as possible with the OpenAI implementation:
enableCodeInterpreter(containerId?)
getGeneratedFiles()
downloadGeneratedFile(fileIdOrIndex) when Gemini exposes downloadable generated files or an equivalent artifact mechanism
getContainerId() or a documented Gemini-specific equivalent if the concept exists
Technical notes
Identify the Gemini payload format required to enable Code Interpreter.
Update Gemini payload construction so the tool is included when _codeInterpreterEnabled is enabled.
Handle Gemini/OpenAI differences, such as container IDs, file citation formats, generated artifact metadata, and download endpoints.
Extend response parsing so Gemini-generated files or artifacts are collected without changing existing OpenAI behavior.
Update JSDoc/documentation if behavior differs by provider.
Context
PR #71 added Code Interpreter support for OpenAI in the
Chatclass: activation throughenableCodeInterpreter(containerId?), OpenAI payload construction, generated-file metadata extraction, container file download support, and public helper methods.The goal is to extend the same capability to Gemini so that Gemini-based chat workflows can also execute code and expose generated artifacts where the Gemini API supports it.
Goal
Add Code Interpreter support for Gemini while keeping the existing public
ChatAPI as consistent as possible with the OpenAI implementation:enableCodeInterpreter(containerId?)getGeneratedFiles()downloadGeneratedFile(fileIdOrIndex)when Gemini exposes downloadable generated files or an equivalent artifact mechanismgetContainerId()or a documented Gemini-specific equivalent if the concept existsTechnical notes
_codeInterpreterEnabledis enabled.Acceptance criteria
enableCodeInterpreter()without errors.getGeneratedFiles()when supported by the API.Reference
Reference PR: #71, which implemented the OpenAI-side Code Interpreter support.