feat(openai): pass through code_interpreter tool in Responses API - #1
Open
OmarGoubail wants to merge 1 commit into
Open
feat(openai): pass through code_interpreter tool in Responses API#1OmarGoubail wants to merge 1 commit into
OmarGoubail wants to merge 1 commit into
Conversation
OmarGoubail
force-pushed
the
code-interpreter-passthrough
branch
from
June 23, 2026 12:45
909d33e to
f7e6af5
Compare
svrdlans
approved these changes
Jun 23, 2026
|
|
||
| defp extract_code_interpreter_items(_), do: [] | ||
|
|
||
| defp code_interpreter_item?(%{"type" => type}) when is_binary(type) do |
There was a problem hiding this comment.
couldn't these this be a match clause with %{"type" => "code_interpreter" <> _}
maybe add it as a module attribute instead of literal
| String.starts_with?(type, "code_interpreter") | ||
| end | ||
|
|
||
| defp code_interpreter_item?(%{type: type}) when is_binary(type) do |
OmarGoubail
force-pushed
the
code-interpreter-passthrough
branch
2 times, most recently
from
June 23, 2026 13:15
20fef34 to
3d2f511
Compare
OmarGoubail
force-pushed
the
code-interpreter-passthrough
branch
from
June 24, 2026 09:24
3d2f511 to
01fbc6c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds minimal Code Interpreter passthrough support to ReqLLM's OpenAI Responses API provider.
Callers can now pass
%{"type" => "code_interpreter", "container" => ...}intools:and ReqLLM will forward the tool map unchanged to OpenAI.Raw
code_interpreter_*output items (code_interpreter_call,code_interpreter_logs,code_interpreter_interpretation, etc.) can be accessed inresponse.provider_meta["code_interpreter"]["items"]and are excluded from normal text/function tool-call extraction.Both object containers (
%{"type" => "auto", "memory_limit" => "4g"}) and explicit string container IDs ("cntr_abc123") are supported.Notes:
ChatCompletionFunctionToolParam) only supportstype: "function", so code_interpreter is not supported there.ReqLLM.Providers.OpenAI.ResponsesAPI, so this change will passcode_interpreterthrough automatically. However, Azure OpenAI's Responses API may not expose Code Interpreter; I am unable to confirm this through the docs though. I am working on trying to test it.Type of Change
Breaking Changes
Testing
mix test)mix quality)lib/req_llm/streaming/http2_duplex_session.ex:83, it's unrelated to my changes though, fixing it is straightforward but not within the scope of this pr, if it's ignored mix quality passesLive verification:
Screen.Recording.2026-06-23.at.3.16.58.PM.mov
Checklist
CHANGELOG.md(it is auto-generated by git_ops)Related Issues
Closes #